Unable to repage (using page) - Throws Unexpected Error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mankyd

Unable to repage (using page) - Throws Unexpected Error

Post 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?
mankyd

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

Post 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!
Post Reply