Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in ImageScience when it processes .gifs #15

Open
palidanx opened this issue May 6, 2010 · 1 comment
Open

bug in ImageScience when it processes .gifs #15

palidanx opened this issue May 6, 2010 · 1 comment

Comments

@palidanx
Copy link

palidanx commented May 6, 2010

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"

@palidanx
Copy link
Author

palidanx commented May 6, 2010

Further correction. in attachment.rb if you specify it as a symbol you get this problem only
:processor => :ImageScience,

j1wilmot pushed a commit to Punchbowl/attachment_fu that referenced this issue Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant