Picture Datatype with DTST_MEMORY and memory pointer won't open.

Online Status

Hello,
Under OS 3.2.3
I'm trying to open a picture datatype from memory using:

DTA_SourceType,DTST_MEMORY,

instead of the default:
DTA_SourceType, DTST_FILE,

I tried a png and a gif version of a little 8 colors picture, both can be read and displayed with DTST_FILE init and file path. This work:

obj = NewDTObject( pFileName,
DTA_SourceType, DTST_FILE,

DTA_GroupID, GID_PICTURE,
OBP_Precision, PRECISION_IMAGE,
PDTA_FreeSourceBitMap, TRUE,
PDTA_Screen, pDestScreen,
PDTA_Remap, TRUE,
0
);

..As I want to have little gif or png icons linked in the binary, I have a converter that makes C char tables of the same files, that looks like:

unsigned char bpwizard_gif[] = {
0x47, 0x49, 0x46, 0x38, 0x39, ... };
unsigned int bpwizard_gif_size = 539;

.. which then I try to open with:

obj = NewDTObject( NULL,
DTA_SourceType, DTST_MEMORY,
DTA_SourceAddress,(ULONG)&bpwizard_gif[0],
DTA_SourceSize,bpwizard_gif_size,

DTA_GroupID, GID_PICTURE, // same as above.
OBP_Precision, PRECISION_IMAGE,
PDTA_FreeSourceBitMap, TRUE,
PDTA_Screen, pDestScreen,
PDTA_Remap, TRUE,
0
);
This always returns NULL, for the gif and the png, and even if I remove all options.
DTST_MEMORY is documented to work since OS3.9 (v44)

https://developer.amigaos3.net/autodocs/datatypes.library/NewDTObjectA…

Some idea ?

Online Status

... there seems to have a long history of things not working with this, all I can find is this forum:
https://www.amigans.net/modules/newbb/viewtopic.php?post_id=124452

Some people says that each datatype has to manage DTST_MEMORY, and others says, datatype.library is meant to create a fake file handle for DTST_MEMORY, so each datatypes actually just use file handles in all cases, and have no extra codes to do.

... and "no" I don't want my icons on the disk.
So basically I'm up to link a good old pnglib and do a BitMap converter.