PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Help! I'm going crazy... Using 6.4.1 and I can't get Trim() to work. All it does is return the same size image with the background color replaced with transparency. I would hope and want this function to crop the image to 208x104 (size of the bounding box). Here are my input and output files:
input.jpg
output.gif (view image properties to see that it's still 280x280)
I have had success with “Crop” by coding the statement this way.
It requires a little math to get the variable values, but it works for me.
width = width of the cropped area
height = height of the cropped area
x = horizontal offset of the cropped area from the original
y = vertical offset of the cropped area from the original
I found and tried Chop() but that behaves like Resize(). I can't find any functions that will allow me to change the canvas size (photoshop term) without affecting the image. I can't Trim, Crop or Chop pixels off the top, sides or bottom. In what version could you do $image->Crop(0x0) ? Maybe I'll revert to that and try it.
This is driving me crazy! what am I doing wrong?
BTW, I'm running perl on Windows if that makes a difference
$image->Trim();
$image->Set(page=>'0x0+0+0');
[code]
HUGE RELIEF! :D
Thanks to everyone who replied. Double thanks to El_supremo who got me googling for "page"!