finish CKBitmapData writer.

- finish spec fmt image writer and raw bitmap writer.
- fix a possible fatal issue in ReadBuffer(). return nullptr simply rather than allocate a blank buf. otherwise the process of use nullptr to check result will be broken.
- add CanSaveAlpha() method in CKBitmapHandler.
This commit is contained in:
2023-09-29 23:09:01 +08:00
parent 1575186c69
commit 3195a9682f
5 changed files with 195 additions and 9 deletions

View File

@ -310,10 +310,9 @@ namespace LibCmo::CK2 {
return false;
}
// if it is empty buffer, create a fake buffer
// and simply return it.
// if it is empty buffer,
// simply return it but need return true to notify read okey.
if (*size_in_byte == 0) {
*ppData = new CKBYTE[1];
return true;
}