Corrupt image Error with RMagick, was: Validating an Image f


#1

On Jul 18, 2007, at 7:28 PM, Tim H. wrote:

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 J.


#2

John J. wrote:

the performance of all the RMagick resizing methods.

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 J.

Can you read the image with ImageMagick? Try

identify path/to/image.png