i am using file_column to upload images in my scaffold.
:
example of my code:
file_column :name, :magick => {
:versions => {"iphone" => "1024x768", "thumb" => "60x60"},
:attributes => { :size => 100, :quality => 100 }
}
but it is not working very properly. if i upload images of 500 Kb – 1 Mb my results “iphone” image size is only 20-30 KB and the image is very much blurred. The images of high quality 3MB, also has the same problem. The image is of very poor quality in this case also.
I dont know what was the problem, the code worked when I changed
"iphone"to:iphone(i.e. made the keys of versions hash from string to symbol). The working code is shown here:In the previous case, it was resizing the image to
thumbsize first, and then resizing thethumbimage to1024X768size, I guess (hence the loss in quality). Very weird though.