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.

Dark GDK / Removing a Color from an Image

Author
Message
Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 22nd May 2008 04:03
im trying to remove a color from an image by setting the alpha to 0. Problem is....nothings happening does anyone have any idea why??

my Image Class:



Your signature has been erased by a mod - please reduce it to 600x120
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 22nd May 2008 04:15 Edited at: 22nd May 2008 04:19
Change 'dbWriteMemblockByte(1,by+4,255);' to 'dbWriteMemblockByte(1,by+4,0);' ?

Also it's faster is you get the address to the memblock before the loop then iterate through it, rather than calling the dbGetMemblockByte() function all the time.

Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 22nd May 2008 04:19
oh lol it was originally 0, it just changed it to 255 "just to make sure" that wasnet the problem...

Your signature has been erased by a mod - please reduce it to 600x120
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 22nd May 2008 05:34 Edited at: 22nd May 2008 05:35
I see, well upon closer inspection your for loop should begin with 'by' being a value of 12 rather than 13, and I'm not sure what:

'Red=dbMemblockDword(1,by+2);
Green=dbMemblockDword(1,by+1);
Blue=dbMemblockDword(1,by);'

does, you're better off just having:



Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 22nd May 2008 21:47
hmm okay ill try it once i get home thank you.

Your signature has been erased by a mod - please reduce it to 600x120

Login to post a reply

Server time is: 2024-09-29 21:33:35
Your offset time is: 2024-09-29 21:33:35