Forum: Ruby on Rails RMagick PNG issue

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bcb581c41b77afce0bd1a63ce2ff1b9c?d=identicon&s=25 Serdar Kılıç (Guest)
on 2007-03-19 04:51
(Received via mailing list)
Hello all,
I have a small routine to upload images from a browser and save them
on the server utilising RMagick (v1.15.3). Things are working well as
long as the image format is JPG, if I try using a PNG image it barfs
with a NoMethoError for the resize_to_fit! method.

The error is:
  You have a nil object when you didn't expect it!
  The error occurred while evaluating nil.resize_to_fit!

Here's a snippet of the code
        strimg =  Base64.encode64(
        img = Magick::Image::read_inline(strimg).first
        img.resize_to_fit! 640, 480

Any ideas?

Serdar Kilic
807e34b31d5463a9ac05d41458a9e537?d=identicon&s=25 Al Evans (al-evans)
on 2007-03-19 13:32
Serdar Kılıç wrote:

> Any ideas?

Are you sure the underlying ImageMagick/GraphicsMagick was built with

--Al Evans
This topic is locked and can not be replied to.