mirror of
https://git.checksum.fail/alec/filepng.git
synced 2026-05-29 19:11:51 +00:00
Add Endian.HC functions from minexew's SnailNet library
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
U16 htons(U16 h) {
|
||||
return ((h >> 8) | (h << 8)) & 0xffff;
|
||||
}
|
||||
|
||||
U16 ntohs(U16 h) {
|
||||
return ((h >> 8) | (h << 8)) & 0xffff;
|
||||
}
|
||||
|
||||
U32 htonl(U32 h) {
|
||||
return ((h >> 24) | ((h & 0x00ff0000) >> 8) | ((h & 0x0000ff00) << 8) | (h << 24)) & 0xffffffff;
|
||||
}
|
||||
|
||||
U32 ntohl(U32 h) {
|
||||
return ((h >> 24) | ((h & 0x00ff0000) >> 8) | ((h & 0x0000ff00) << 8) | (h << 24)) & 0xffffffff;
|
||||
}
|
||||
+1
-1
@@ -234,7 +234,7 @@ public I64 PNGWrite(U8 *filename,CDC *dc,I64 bits=4)
|
||||
FileWrite(filename,png,size);
|
||||
Free(png);
|
||||
return size;
|
||||
}
|
||||
}
|
||||
|
||||
#help_index "Graphics/PNG Files;Graphics/Scrn"
|
||||
public I64 PNGScrnCapture(U8 *filename,I64 bits=4,Bool include_zoom=TRUE)
|
||||
|
||||
Reference in New Issue
Block a user