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.
1c0cd550766a3ee3e4a9c495926e4603?d=identicon&s=25 John Joyce (Guest)
on 2007-07-24 00:20
(Received via mailing list)
On Jul 18, 2007, at 7:28 PM, Tim Hunter 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 Joyce
3afd3e5e05dc9310c89aa5762cc8dd1d?d=identicon&s=25 Tim Hunter (Guest)
on 2007-07-24 00:31
(Received via mailing list)
John Joyce 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 Joyce
>
Can you read the image with ImageMagick? Try

identify path/to/image.png
This topic is locked and can not be replied to.