When we Clone we memcpy the header. This way a view into a external bitmap, wich has ext_bits and ext_pitch set, after Clone will still have these fields pointing to the external bitmap.
To fix, reset the fields:
((FREEIMAGEHEADER *)new_dib->data)->ext_bits = NULL;
((FREEIMAGEHEADER *)new_dib->data)->ext_pitch = 0;
This is serious bug, because if one clones a view, in hopes to get unique data, then modifies the new bitmap, it will still modify the original image!
Anonymous
Hi Mihail,
Thanks for pointing this bug. It is now fixed in the CVS.
Hervé
It is "
external_...", rather than "ext_...", is not it?Fixed in release 3.18.0