The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
When you set a negative offset in MagickExtentImage the resulting image becomes blank on a 64 bit OS. The same exact code on a 32 bit OS works perfectly.
The MagickExtentImage is broken on 64 bit period. I did some tests and the results change randomly depending on if you do some image manipulation before or after the MagickExtentImage call. For example this code will always return a blank canvas:
4 years later, and it's still the issue in recent pkgs on ubuntu/fedora.
Moreover, Magick++ supports gravity for extent, and, while doing the same (eg. calling ExtentImage) as MagickExtentImage produces proper image with same arguments.
Sadly, i'm writing lua binding, so doing wrapper for a wrapper in a wrapper is, well, a no-go.
I am sorry but I have no clue what you are trying to tell or ask us. But here is an attempt to answer you:
Magick++ uses 'GravityAdjustGeometry' before calling ExtentImage when the overload with gravity is called. This will recalculate the x and y of the Geometry. You will have to do the same in your wrapper if you want to force that behavior.
1) MagickExtentImage ignores gravity
2) passing negative offsets (which i get from 'GravityAdjustGeometry') to MagickExtentImage results in blank image
2) Duh. Let's say i have 50x50 image. If i do MagickExtentImage(wand, 200,200, 10,10) image will be shifted 10px left and up (to the outside of canvas) - that works fine. If i do MagickExtentImage(wand, 200,200, -1,-1) - i'll get blank image (while, obviously, it should just shift 1px to the right and down)
Erm. Okay. Calling MagickExtentImage from pure c with negative offsets works. Calling it from lua (and i've checked by adding printf with passed parameters inside MagickExtentImage) with same offsets doesn't. Not sure what happens here.
Anyway, sorry, as it seems i was wrong.