Amigans Defender
Joined: 2006/11/17 22:40 Last Login
: Yesterday 22:43
From England
Group:
Registered Users Moderators
|
@TetiSoft
That's useful, except the number of colours changing is pretty much the first thing one of the datatypes does (not sure about the other one). The sequence is:
IDataTypes->SetDTAttrs(o, NULL, NULL, PDTA_NumColors,cols, TAG_END);
IDataTypes->GetDTAttrs(o, PDTA_ColorRegisters,&cmap, PDTA_CRegs,&cregs, TAG_END);
Followed by setting the colour registers, and then setting the depth parameter in the bitmap header. There is no other code relating to the colour palette.
The only thing that strikes me is that there should be no old palette for picture.datatype to copy - could this be the problem? Am I supposed to be initialising something else to stop this happening?
Chris
|