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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John J. (Guest)
on 2007-07-24 02:20
(Received via mailing list)
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.
Tim H. (Guest)
on 2007-07-24 02:31
(Received via mailing list)
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
This topic is locked and can not be replied to.