Installed flex_image yesterday for the first time, great and useful plugin. However, the quality option doesn''t seem to work, I can resize, add border ... etc but can''t change the quality of the image. Environment: Windows XP ruby 1.8.4 (2006-04-14) [i386-mswin32] Rails 1.2.1 RadRails + Webrick installed plugin using the following command: ruby script/plugin install http://beautifulpixel.com/svn/plugins/flex_image/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Installed flex_image yesterday for the first time, great and useful > plugin. However, the quality option doesn''t seem to work, I can > resize, add border ... etc but can''t change the quality of the image.What image type are you outputting? I''m outputting a JPEG and :quality works fine for me. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Do you pull the original photo from the database then reduce the quality before you output it to the client? What I''m trying to do is reduce the quality before saving so I will have a smaller file in my database. So, what I have in my model is this pre_process_image :size => ''600x600'', :quality => 50, :border => {:size => 5, :color => ''white''} the size is reduced and the border is applied but the quality doesn''t change. On Jan 31, 9:10 pm, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote:> > Installed flex_image yesterday for the first time, great and useful > > plugin. However, the quality option doesn''t seem to work, I can > > resize, add border ... etc but can''t change the quality of the image. > > What image type are you outputting? I''m outputting a JPEG and :quality > works fine for me.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Do you pull the original photo from the database then reduce the > quality before you output it to the client? > What I''m trying to do is reduce the quality before saving so I will > have a smaller file in my database. So, what I have in my model is > thisAh, I do it after that... when displaying to the client...> > pre_process_image :size => ''600x600'', > :quality => 50, > :border => {:size => 5, :color => ''white''} > > the size is reduced and the border is applied but the quality doesn''t > change. > > > On Jan 31, 9:10 pm, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: >>> Installed flex_image yesterday for the first time, great and useful >>> plugin. However, the quality option doesn''t seem to work, I can >>> resize, add border ... etc but can''t change the quality of the image. >> >> What image type are you outputting? I''m outputting a JPEG and :quality >> works fine for me. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Why would you do that Philip, is it required that you have the original image in the DB? and what about performance, are you caching? I''m only thinking of doing the thumbnails on the run and I''m still concerned about having performance issues. Can you share your experience? On Feb 1, 2:42 am, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote:> > Do you pull the original photo from the database then reduce the > > quality before you output it to the client? > > What I''m trying to do is reduce the quality before saving so I will > > have a smaller file in my database. So, what I have in my model is > > this > > Ah, I do it after that... when displaying to the client... > > > > > pre_process_image :size => ''600x600'', > > :quality => 50, > > :border => {:size => 5, :color => ''white''} > > > the size is reduced and the border is applied but the quality doesn''t > > change. > > > On Jan 31, 9:10 pm, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: > >>> Installed flex_image yesterday for the first time, great and useful > >>> plugin. However, the quality option doesn''t seem to work, I can > >>> resize, add border ... etc but can''t change the quality of the image. > > >> What image type are you outputting? I''m outputting a JPEG and :quality > >> works fine for me.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ahmad wrote:> Installed flex_image yesterday for the first time, great and useful > plugin. However, the quality option doesn''t seem to work, I can > resize, add border ... etc but can''t change the quality of the image. > > Environment: > Windows XP > ruby 1.8.4 (2006-04-14) [i386-mswin32] > Rails 1.2.1 > RadRails + Webrick > installed plugin using the following command: > ruby script/plugin install > http://beautifulpixel.com/svn/plugins/flex_image/The latest version of flex_image actually stores the file as a PNG in the database/filesystem. The idea is prevent double compression of the images, which can introduce some nasty artifacts along with higher file sizes than necessary. I obviously see the merit in your request, however. Therefore, PNG storage format for master images, but now you can choose JPG instead. I just checked in a feature that allows you to do this: class FooPicture < FlexImage::Model self.storage_format = :jpg end That should greatly reduce the size of the master image files. -Alex -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you Alex. Works perfectly I have 60K file now instead of 500K in my DB. On Feb 1, 9:05 pm, Alex Wayne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Ahmad wrote: > > Installed flex_image yesterday for the first time, great and useful > > plugin. However, the quality option doesn''t seem to work, I can > > resize, add border ... etc but can''t change the quality of the image. > > > Environment: > > Windows XP > > ruby 1.8.4 (2006-04-14) [i386-mswin32] > > Rails 1.2.1 > > RadRails + Webrick > > installed plugin using the following command: > > ruby script/plugin install > >http://beautifulpixel.com/svn/plugins/flex_image/ > > The latest version of flex_image actually stores the file as a PNG in > the database/filesystem. The idea is prevent double compression of the > images, which can introduce some nasty artifacts along with higher file > sizes than necessary. > > I obviously see the merit in your request, however. Therefore, PNG > storage format for master images, but now you can choose JPG instead. I > just checked in a feature that allows you to do this: > > class FooPicture < FlexImage::Model > self.storage_format = :jpg > end > > That should greatly reduce the size of the master image files. > > -Alex > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Why would you do that Philip, is it required that you have the > original image in the DB? and what about performance, are you caching? > I''m only thinking of doing the thumbnails on the run and I''m still > concerned about having performance issues. Can you share your > experience?I don''t store them in the DB, but in the filesystem, and I cache them when displayed so for me, I want the original simply so I have the best possible image to work with should I decide later on to display them even larger, etc... -p> > > > On Feb 1, 2:42 am, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: >>> Do you pull the original photo from the database then reduce the >>> quality before you output it to the client? >>> What I''m trying to do is reduce the quality before saving so I will >>> have a smaller file in my database. So, what I have in my model is >>> this >> >> Ah, I do it after that... when displaying to the client... >> >> >> >>> pre_process_image :size => ''600x600'', >>> :quality => 50, >>> :border => {:size => 5, :color => ''white''} >> >>> the size is reduced and the border is applied but the quality doesn''t >>> change. >> >>> On Jan 31, 9:10 pm, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: >>>>> Installed flex_image yesterday for the first time, great and useful >>>>> plugin. However, the quality option doesn''t seem to work, I can >>>>> resize, add border ... etc but can''t change the quality of the image. >> >>>> What image type are you outputting? I''m outputting a JPEG and :quality >>>> works fine for me. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---