Re-generate thumbnails?

Has anybody figured out a way to force attachment_fu to regenerate
thumbnails? I had some major issues with mini_magick not figuring out
the correct image sizes, and I’d like to re-try with rmagick.

But, I can’t re-upload all the files.




On 22-Jan-08, at 11:34 PM, photo matt wrote:

I came across this post recently - as I’ll need to do the same in the
near term

can you let me now if it works out for you?



I had seen that link before posting, and I’m not sure why it didn’t work
for me the first time around. Of more important info possibly is that
my server had ImageMagick 6.2.4, and it was (randomly) reporting widths
and heights of null, and wasn’t actually resizing the thumbnails.
Upgrading to 6.3.8 fixed this problem. Anyways, here’s my script which
I ran that fixed the data…

Photo.find(:all, :conditions=>[“width IS NULL and height IS NULL and
parent_id IS NULL”]).each do |p|
puts “Fixing #{p.filename}”
temp_file = p.create_temp_file
image = MiniMagick::Image.from_blob(temp_file.path)
p.width = image[:width]
p.height = image[:height]
p.attachment_options[:thumbnails].each { |suffix, size|
p.create_or_update_thumbnail(temp_file, suffix, *size)

On Sun, Aug 18, 2013 at 9:09 PM, danny thyui [email protected]

i always do such the work and i feel some professional software might be
able to do us a favor .Recently Im dealing thumbnail generation with vb
,it maybe another sulotion here .BTW, the info above give me more
choice, I got interested in make this out in different ways.
VB.NET Image: Program for Creating Thumbnail from Documents and Images

grep /(ruby|rails)/i then grok