mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-02-13 00:48:41 +00:00
started debugging, making endian change
This commit is contained in:
parent
e88840f0fa
commit
aec8cd9508
11
image/Png.h
11
image/Png.h
|
|
@ -419,14 +419,17 @@ bool image_png_generate(const FileBody* src_data, Image* image, RingMemory* ring
|
||||||
chunk.length = SWAP_ENDIAN_BIG(*((uint32 *) stream.pos));
|
chunk.length = SWAP_ENDIAN_BIG(*((uint32 *) stream.pos));
|
||||||
stream.pos += sizeof(chunk.length);
|
stream.pos += sizeof(chunk.length);
|
||||||
|
|
||||||
chunk.type = SWAP_ENDIAN_BIG(*((uint32 *) stream.pos));
|
chunk.type = *((uint32 *) stream.pos);
|
||||||
stream.pos += sizeof(chunk.type);
|
stream.pos += sizeof(chunk.type);
|
||||||
|
|
||||||
if (chunk.type == 'IEND') {
|
if (chunk.type == SWAP_ENDIAN_BIG('IEND')) {
|
||||||
// we arrived at the end of the file
|
// we arrived at the end of the file
|
||||||
break;
|
break;
|
||||||
} else if (chunk.type != 'IDAT') {
|
} else if (chunk.type != SWAP_ENDIAN_BIG('IDAT')) {
|
||||||
// some other data?!
|
// some other data
|
||||||
|
|
||||||
|
// Jump to next chunk
|
||||||
|
stream.pos += chunk.length + sizeof(chunk.crc);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user