Image->crop produces black bands?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Image->crop produces black bands?

Marc Pinnell-3
Trying to use the ImageMagik stuff for the first time. Scaling,  
moving, changing format all seem to work fine. However, when I try to  
crop, I am getting black bands on the images where the image used to  
be and the image doesn't change size. In other words a 100 pixel tall  
image cropped to 70 pixels, stays 100 pixels tall, but now has 15 pix  
black borders top and bottom. Here's the code (this creates identical  
sized thumbnails regardless of orientation):

[Var: 'MyImage' =(Image: $SubAlbum_Location+$OrigImageName)]
[$MyImage->(Scale: -Width='190', -Thumbnail)]
[var: 'ImageHeight' = ($MyImage->Height)]
[if: $ImageHeight > 125]
        [var: 'CropVertOffset' = (integer:(($ImageHeight-125)/2))]
        [$MyImage->(Crop: -Left=0, -top=$CropVertOffset, -Width=190, -
[$MyImage->(Convert: 'GIF', -Quality=50)]
[$OrigImageName = (String_RemoveTrailing: -Pattern='.jpg',  
[$MyImage->(Save: $SubAlbum_Location + 'Thumbs/' +$OrigImageName
+'.gif', -Quality=50)]

I've been looking at this too long, this should work, right?


Lasso Support:
Search the list archives:
Manage your list subscription: