Page 1 of 1

Unable to repage (using page) - Throws Unexpected Error

Posted: 2007-02-03T16:34:29-07:00
by mankyd
I wrote up a function to do border removal using Magick++ the other day. (user) magick informed me that running page(0,0,0,0) was the same as running repage (for which there is no call in Magick++.)

This works great on my development server - a Gentoo box running 6.3.0.5. My production server - Centos 4 which only has 6.0.7.1 - is throwing errors at me when I run my function:
ImageMagick: geometry dimensions are zero `/tmp/magick-XXSIYmVc'

I traced it and discovered that it's the page() command that seems to be causing the problems. I don't, at this time, have the option to upgrade my installation of ImageMagick. Do I have any other available options, or am I out of luck?

Re: Unable to repage (using page) - Throws Unexpected Error

Posted: 2007-02-03T18:03:05-07:00
by mankyd
This seems to fix it:

Code: Select all

source_img->page(Geometry(source_img->columns(), source_img->rows()));
Please let me know if I am missing anything glaringly obvious. Thanks!