Hey there,
I have been trying to add a sort of watermark to my program by doing the folowing:
Array containing data of image (i used bin2c.exe, is there an alternative?):
const unsigned char WaterMarkLogo[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x01, 0xb5, 0x00, 0x00, 0x00, 0x6e,
0x08, 0x06, 0x00, 0x00, 0x00, 0xa0, 0x24, 0x8d, 0x85, 0x00, 0x00, 0x00,
0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8e, 0x7c, 0xfb, 0x51,
0x93, 0x00, 0x00, 0x00, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x00, 0x00, 0x87,
0x0f, 0x00, 0x00, 0x8c, 0x0f, 0x00, 0x00, 0xfd, 0x52, 0x00, 0x00, 0x81,
0x40, 0x00, 0x00, 0x7d, 0x79, 0x00, 0x00, 0xe9, 0x8b, 0x00, 0x00,
....................................................
0x3c, 0x9b, 0x17, 0xb2, 0x60, 0x2a, 0xc3, 0x7b, 0xdf, 0xda, 0x2d, 0xd3, 0x73,
0xf6, 0x95, 0x32, 0x46, 0x67, 0x48, 0xc0, 0x90, 0x80, 0x4c, 0x02, 0xff,
0x1f, 0x7d, 0x68, 0x27, 0xac, 0x97, 0x2e, 0x3d, 0xde, 0x00, 0x00, 0x00,
0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00,
};
//Create Memblock with Size of Array
dbMakeMemblock(1, sizeof(WaterMarkLogo));
//Get Memblock Pointer
DWORD ptr = dbGetMemblockPtr(1);
//Copy the data from the Array to the Pointer with Size of the Array
memcpy((void*)ptr, (const void*)WaterMarkLogo, sizeof(WaterMarkLogo));
//Create Image From Memblock
dbMakeImageFromMemblock(1, 1);
//Delete Memblock
dbDeleteMemblock(1);
After that I show it like this:
dbSprite(1,100,100,1); dbSync();
But it doesnt show anything, not a pixel!
Is this fixable? Or are there any other methods?
Thanks,
RedEye
Like = Follow!