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

@ -617,6 +617,8 @@ namespace LibCmo::CK2 {
WriteBufferNoSize_LEndian16(int, void*) Write buffer without size. -> WriteBufferNoSize(const void*, CKDWORD)
*/
// MARK: buf can be nullptr, but buf size must is 0. and WriteBuffer will only write a zero to indicate there is a zero buffer.
bool WriteBuffer(const void* buf, CKDWORD size_in_byte);
bool WriteBufferNoSize(const void* buf, CKDWORD size_in_byte);