From: John Joyce Date: 2007-07-24T07:19:38+09:00 Subject: Corrupt image Error with RMagick, was: Validating an Image file is an image file On Jul 18, 2007, at 7:28 PM, Tim Hunter wrote: >> > Yes, you'll need to composite the scaled image on top of the > background of your desired size. See my article "Alpha Compositing > - Part 1" [http://rmagick.rubyforge.org/src_over.html]. If you're > making a lot of thumbnails you might also be interested in "Making > Thumbnails with RMagick" [http://rmagick.rubyforge.org/resizing- > methods.html], which compares the performance of all the RMagick > resizing methods. > > Also if you'll tell me which parts of the documentation are lacking > in clear examples I'll see what I can do to fix it. You can always > open a documentation bug in the RMagick bug tracker on RubyForge. > > -- > RMagick OS X Installer [http://rubyforge.org/projects/rmagick/] > RMagick Hints & Tips [http://rubyforge.org/forum/forum.php? > forum_id=1618] > RMagick Installation FAQ [http://rmagick.rubyforge.org/install- > faq.html] > > Hey Mr. Hunter, I'm using RMagick semi-successfully now, in a dumb Rails app, works like a charm with jpg files, but png files give me a Corrupt image `path/to/image.png' while using the same set of code as with jpg files: img = Image.read(image_to_alter)[0] This is the line called out with the error. Is it possible, since this was created with Photoshop CS2, that the png is somehow different from what RMagick expects to read? or is there something I'm missing with the fact that it contains a transparency? Regards, John Joyce