another display image question
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 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: another display image question
On 9/1/12 5:04 PM, Timothy Miller wrote: 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. There's a built-in "crop" command, see the dictionary. Basically you pass it a rectangle and the image gets cropped to that size. 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? No need, the crop command is permanent. There is no "undo", so if you make a mistake you'll need to re-import the original image and try again. BTW, the crop command won't work on referenced images, they must be imported into the stack. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: another display image question
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 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 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: another display image question
Generous, knowledgeable, clear and concise, as always. You are a gift from god, Jacque, Tim On Sep 1, 2012, at 8:25 PM, J. Landman Gay wrote: > There's a built-in "crop" command, see the dictionary. Basically you pass it > a rectangle and the image gets cropped to that size. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode