another display image question

Graham Samuel livfoss at mac.com
Sun Sep 2 09:10:20 EDT 2012


As a Digest reader, I see that your question has been ably answered by the usual suspects… I just wanted to add that I have an app where a user is allowed to extract a rectangular area from a larger image, with the added twist that the original image may be too large to display, so that the extraction (a kind of cookie-cutter approach) is done on the scaled-down image, but what gets saved is the corresponding extract from the unscaled image, if you see what I mean. Turns out it can all be done fairly neatly in LC. If this is of interest I can explain more - if not, not much bandwidth lost.

Graham

On Sat, 1 Sep 2012 15:04:22 -0700, Timothy Miller <gandalf at DOCTORTIMOTHYMILLER.COM> wrote:
> 
> Hello,
> 
> This is a follow-up to another question on a similar topic, posted just a few minutes ago.
> 
> I'm wondering how to crop the display of an image in an "image area." The original is a .jpg or .png saved on the hard disk.
> 
> I could do that with with overlying opaque fields, moving them around as needed, but that sounds cumbersome.
> 
> There might be other ways. If so, would someone be so kind as to describe briefly how this is done?
> 
> I'm vaguely aware that LC makes it possible to alter images pixel by pixel. I assume this would alter the displayed image not the original, but I'm feeling my way in the dark here. Presumably, one would change the color of rows or columns of pixels to black, white or some other background color, to simulate cropping. If that's accurate, does someone have a ready-made script I could adapt to my own needs?
> 
> Finally, once an image is cropped, does LC offer a way to save the altered image? I suppose it could take a screen shot. Is there any other way?
> 
> Thanks in advance,
> 
> 
> Tim




More information about the use-livecode mailing list