Re: Image->crop produces black bands? -SOLVED

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

Re: Image->crop produces black bands? -SOLVED

Marc Pinnell-3
Answered my own question.

After the crop command, issue:

[$MyImage->(Execute: 'mogrify +repage')]

That resets the page size information. Apparently only needed if you  
save to gif format.

Marc


On Jun 4, 2006, at 10:15 AM, Marc Pinnell wrote:

> 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, -
> Height=125)]
> [/if]
> [$MyImage->(Convert: 'GIF', -Quality=50)]
> [$OrigImageName = (String_RemoveTrailing: -Pattern='.jpg',  
> $OrigImageName)]
> [$MyImage->(Save: $SubAlbum_Location + 'Thumbs/' +$OrigImageName
> +'.gif', -Quality=50)]
>
> I've been looking at this too long, this should work, right?
>
> TIA,
> Marc
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage