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 / altering color hue of a sprite ?? how could this be done............

Author
Message
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 27th Mar 2009 21:56
Hello All does anyone know how you can alter the hue of color in a sprite. I know GDK has some color commands but this does not alter the colors in the way i need. I want to be able to alter hue like photoshop does. To give an instance consider a while tile with a red letter on it. Altering hue in photoshop will alter the color of the letter but NOT alter the white background. I have seached on forums for info but i have not been able to get any info about this. Any help would be appreciated

Regards :- Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Mar 2009 13:06
You can only do that by manipulating the colours in the image that the sprite uses.

You can access the image most easily by using dbMakeMemblockFromImage() and changing the memblock. You'll also need to decide whether you are going to use the HSL or the HSV colourspace, and you'll need to be able to convert between your choice and RGB.

stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 28th Mar 2009 20:14
After doing some research on the internet. I found that an include file exists that i believe is part of windows.

Part of its function is to convert HSL color values to RGB or vice versa. GREAT i thought maybe the answer to my prayers here.

After including the .H file - #include "shlwapi.h"
i am getting an error. I do not understand what this error is telling me . Please can someone explain what the problem is here.Perhaps GDK uses this include file somehow and thats the prob ?? DUNNO :-(

ERROR is as follows

1>Main.obj : error LNK2019: unresolved external symbol __imp__ColorRGBToHLS@16 referenced in function "void __cdecl DarkGDK(void)" (?DarkGDK@@YAXXZ)
1>Debug\Dark GDK - 2D Game11.exe : fatal error LNK1120: 1 unresolved externals

Any help would be appreciated.

Regards :- Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Mar 2009 16:49
That's a linker problem - the function you are using is held in a library that isn't included by default by the compiler, and you haven't included it in your project either.

Usually, the library will have the same name as the header file, but with .lib instead of .h as its suffix.

Login to post a reply

Server time is: 2024-09-30 21:33:41
Your offset time is: 2024-09-30 21:33:41