Drawing into a loaded image

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ukimiku
Posts: 101
Joined: Thu Oct 22, 2009 10:45 am

Drawing into a loaded image

Post by ukimiku » Sun Oct 25, 2009 12:58 am

I would like to draw a couple of black lines into an image I loaded in a RunRev script. This image is displayed in an Image Area on a card.

1) How can I set points/draw lines/shapes into this image?
I want the change only on-screen, not in the file displayed.

Thanks!

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sun Oct 25, 2009 12:27 pm

It will probably be easiest to layer graphic controls on top of the image. If you need to write out the combination of the image and the graphics, you can always group them and export a snapshot of the group.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

ukimiku
Posts: 101
Joined: Thu Oct 22, 2009 10:45 am

Post by ukimiku » Sun Oct 25, 2009 1:52 pm

Jan,

thanks, understood. In fact, I will need to group the painted image and the overlaid graphics controls as I must extract rectangular portions of the combined image afterwards.

Sorry, I forgot to pose one question concerning the painted image (only, not the graphics controls): is there a way in RunRev to adjust brightness and contrast of the loaded image?

Thank you!

Regards

hliljegren
Posts: 111
Joined: Sun Aug 23, 2009 7:48 am
Contact:

Post by hliljegren » Sun Oct 25, 2009 4:36 pm

AFAIK it's not possible to do that directly in Revolution. But there is a tutorial about how you can implement it as an external here

ukimiku
Posts: 101
Joined: Thu Oct 22, 2009 10:45 am

Post by ukimiku » Sun Oct 25, 2009 9:48 pm

Thanks. I'll have a look. Looks a bit complicated at first glance, though.
Regards,

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Mon Oct 26, 2009 3:36 am

But check out the blend property of an image to see if that will get you what you want, i.e.,

Code: Select all

set the blendlevel of image 1 to 50

ukimiku
Posts: 101
Joined: Thu Oct 22, 2009 10:45 am

Post by ukimiku » Mon Oct 26, 2009 8:36 pm

Thanks mwieder,

that was one of my ideas also. Unfortunately the image doesn't lose enough contrast this way. It seems I will have to work out my own brightness and contrast routine, which of course will be fun, too. I plan to do that as a RunRev function, not as an external. Let's see about the speed. The program is a puzzle for my little daughter, and she's quite patient... :)

Regards,

Post Reply