PDA

View Full Version : Accessing image bitmap pixels


paheikki
05-27-2009, 11:59 AM
Hi,

I am a newbie, as for AMS, so I am sorry if this is an irrelevant question or already answered somewhere I could not find.

I would like to modify the individual pixel values of an image or slideshow object. We develop some advanced image processing algorithms, and AMS seems like a great candidate to develop their test phase user interface, if (and only if) the answer to the following questions is positive:

1) Is there a simple way to access and change the pixel values of the image object inside AMS?

2) Is there a way to get the bitmap handle of an image object, and use that as an argument to a DLL that then modifies the pixel values (and the result, after calling the DLL, can be seen inside AMS again)?

Any simple examples of such bitmap / pixel level image / slideshow object operations would be greatly appreciated.

Thanks in advance.

Paheikki

MicroByte
05-27-2009, 01:42 PM
it can be done, im sure i saw a pixel edit dll on the forum somewhere but i cant find it, maybe someone has it zipped somewhere??

longedge
05-27-2009, 03:09 PM
it can be done, im sure i saw a pixel edit dll on the forum somewhere but i cant find it, maybe someone has it zipped somewhere??

I never tried it but possibly Sside's Image.dll (http://www.indigorose.com/forums/showthread.php?t=20571#56) ?

Imagine Programming
05-27-2009, 04:34 PM
I also believe GDLua was somewhere on here, it's fully capable of editing images.

**EDIT
found it, GD-Lua thread

paheikki
05-28-2009, 12:04 PM
Hi,

Thanks a lot.

I tried both the two versions referenced above, and at first sight, they work as expected. The "Draw Triangles" does seem to crash though, but that is not necessarily a big issue. I use Vista which might be the culprit again...

I will study these futher, if they help in doing what we try to do here.

The other question: is there any way to get the bitmap handle of the AMS image or slideshow object, and pass that to a self-written DLL ?

Thanks again,

Paheikki

MicroByte
05-28-2009, 12:25 PM
The other question: is there any way to get the bitmap handle of the AMS image or slideshow object, and pass that to a self-written DLL ?

no, you would need to load the image inside your dll and obtain the bitmap handle yourself, LoadImage (http://msdn.microsoft.com/en-us/library/ms648045.aspx) API call will return the bitmap handle, if thats any help