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.

DarkBASIC Professional Discussion / [Image Kit] What is the channel DWORD?

Author
Message
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 17th Feb 2011 04:35 Edited at: 17th Feb 2011 05:28
I'm hoping to use the IK SET IMAGE CHANNEL command to change the color of an image, but I'm not sure how it works, or if it even IS the command I should use.

What does CHANNEL mean in this command?

And what values would be used for the DWORD for those channels?

I'm looking for something similar to SET SPRITE DIFFUSE, but for an image that I'm going to paste.

TIA

Well, never mind about the color changing - IK SET IMAGE BRIGHTNESS works for my needs. But I'm still curious about IK SET IMAGE CHANNEL - what does it do?

Jimpo
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location:
Posted: 17th Feb 2011 16:58
The channels are red, green, blue, and alpha. This command will fill the entire channel with the specified color between 0 and 255.

For example, "IK Set Image Channel imgNum, CHANNEL_ALPHA, 125" will make your image partially transparent by setting the alpha value of every pixel to 125.

Image Kit has a set of constants you can include in your program. These are the channel constants:


Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 17th Feb 2011 18:10
Jimpo, thanks for that info!

I'll play around with the command to see what effect the other channels have on the image.

Login to post a reply

Server time is: 2026-07-17 13:57:13
Your offset time is: 2026-07-17 13:57:13