I want to convert uploaded images that are not jpegs or pngs to to be jpegs or pngs using paperclip. Problem is i dont want to convert jpegs to pngs or pngs to jpegs, just leave them as the file type they are.
Is this possible ? If so how do i create the styles all in jpeg or png ?
Also what is the best file type to save as? I cant convert some pngs to jpg开发者_Python百科s as if they had transparency in that gets lost / changed. Also if i change all to png is not bigger and alos i am using Prawn pdf outputting these images so cant use gif.
Any pointers anyone ?
Thanks alot Rick
In order to do this you will need to create a custom Paperclip::Processor
. You can probably subclass the Paperclip::Thumbnail
in doing so.
精彩评论