You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in line
# Gets the thumbnail name for a filename. 'foo.jpg' becomes 'foo_thumbnail.jpg'
def thumbnail_name_for(thumbnail = nil)
return filename if thumbnail.blank?
ext = nil
basename = filename.gsub /.\w+$/ do |s|
ext = s; ''
end
# ImageScience doesn't create gif thumbnails, only pngs
ext.sub!(/gif$/, 'png') if attachment_options[:processor] == "ImageScience"
"#{basename}_#{thumbnail}#{ext}"
end
attachment_options[:processor]
returns a symbol and the comparison fails
it works if you do...
ext.sub!(/gif$/, 'png') if attachment_options[:processor].to_s == "ImageScience"
The text was updated successfully, but these errors were encountered:
In ImageScience, gif thumbnails are saved in png
In
http://github.com/technoweenie/attachment_fu/blob/master/lib/technoweenie/attachment_fu.rb
There is a bug in line
# Gets the thumbnail name for a filename. 'foo.jpg' becomes 'foo_thumbnail.jpg'
def thumbnail_name_for(thumbnail = nil)
return filename if thumbnail.blank?
ext = nil
basename = filename.gsub /.\w+$/ do |s|
ext = s; ''
end
# ImageScience doesn't create gif thumbnails, only pngs
ext.sub!(/gif$/, 'png') if attachment_options[:processor] == "ImageScience"
"#{basename}_#{thumbnail}#{ext}"
end
attachment_options[:processor]
returns a symbol and the comparison fails
it works if you do...
ext.sub!(/gif$/, 'png') if attachment_options[:processor].to_s == "ImageScience"
The text was updated successfully, but these errors were encountered: