Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Can you paste images over each other and sort of AND them...?

Author
Message
NeilF
18
Years of Service
User Offline
Joined: 2nd Aug 2006
Location:
Posted: 22nd Aug 2006 17:44
For example, if I paste one image over the top of another, if any of the pixels of the original image are brighter than the one going on top, I don't want them replaced by the darker pixels.

I suspect there's no way of doing this other than purpose written code to check images on a pixel basis, but I thought I'd just check first of all that there isn't some nice command in DBPro that will achieve this.

I've looked and can't see anything obvious...


Asus P4PE | P4@3.22(533) | 2G PC3200 | ATI800Pro/XT@570/570 | Audigy2
MatrixOrbital MX422 | XP Pro | 120Gb Maxtor Plus9IDE | 200Gb Barracuda.9Sata
Mr X
19
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 22nd Aug 2006 20:36
You could put out the images one at a time on the screen, and then check the color valur of every pixel in the image and store the resolts in an array. Then you could check which pixel (of course only the ones on top of each other) that is brighter using the "point" command and then draw out the brightest pixel using the "dot" command, or something like that. I've not tested the code and I don't know if it would work. But I hope it works.
NeilF
18
Years of Service
User Offline
Joined: 2nd Aug 2006
Location:
Posted: 22nd Aug 2006 21:52
Quote: "You could put out the images one at a time on the screen, and then check the color valur of every pixel in the image and store the resolts in an array. Then you could check which pixel (of course only the ones on top of each other) that is brighter using the "point" command and then draw out the brightest pixel using the "dot" command, or something like that. I've not tested the code and I don't know if it would work. But I hope it works."


That's exactly what I will have to due if there isn't some clever command/function to in effect automatically achieve this...


Asus P4PE | P4@3.22(533) | 2G PC3200 | ATI800Pro/XT@570/570 | Audigy2
MatrixOrbital MX422 | XP Pro | 120Gb Maxtor Plus9IDE | 200Gb Barracuda.9Sata
CreamPie
18
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 22nd Aug 2006 22:31
NeilF,

Do not use the point command! Use memblocks instead. The point command is slow and useless, and will bring down your fps drasticaly.

>-Formerly known as NanoBrain-<
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd Aug 2006 22:43
The best way is to use memblocks.
Convert the image to a memblock then perform a logical AND on each pixel before making an image from the memblock.


Login to post a reply

Server time is: 2024-11-26 14:43:31
Your offset time is: 2024-11-26 14:43:31