search for: image_just_uploaded

Displaying 1 result from an estimated 1 matches for "image_just_uploaded".

2005 Nov 16
0
image conversion w/ file column
...a much better format (in smaller dimensions) than jpg or gif. This is what i have in my model (using rmagick for the conversion): file_column :image, :magick => {:versions => { "thumb" => "50x50" }} before_validation :convert_to_png def convert_to_png if self.image_just_uploaded? imgpath = self.image() img = ImageList.new(imgpath) imgpath = imgpath.sub(/(jpg)$/, ''png'') img.write(imgpath) end end Which manages to save a png version of the original image in the final dir but the thumb is still being derived from the jpg. Any...