Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Paperclip plugin changing original image extension
Tony Tony
11/10/2008 3:30:00 AM
Hi guys,
I got what I assume is a pretty simple question.
I need to convert the original image filename from a paperclip plugin
upload to be .png. So all files uploaded (.jpg or .gif) will be
converted to .png WITHOUT changing the original image size/proportions.
I've been able to do this with thumbnails with the following code under
styles:
:thumb=> ["50x50#", :png]
but if I try to do :original => :png it won't work. Again, I'm sure this
is super simple but I can't find the answer for the life of me.
Thanks in advance!
-Tony
--
Posted via
http://www.ruby-...
.
1 Answer
Tony Tony
11/10/2008 4:11:00 AM
0
I decided to just add a maximum image file size for the original image.
I already have a maximum attachment size of 1mb but it's still nice to
keep things a bit under control.
So I just added the following to the styles:
:original => ["800x600>", :png]
and it works as intended (resizing if over 800x600 AND converts to png).
Still would be nice to know what the code is to change the extension of
the original file though for future reference. Again, I know it's
probably simple but my mind is running on E right now.
Thanks again and hope this helps someone in the future!
-Tony
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Paperclip plugin changing original image extension
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password