9 hours ago
For gimp 2.10, is my understanding correct?
Given a region's bytes from a layer ‘l’:
r = l.get_pixel_rgn(0, 0, w, h)
rb = r[:, :]
I think rb will hold the bytes of the channel's values in the machine's native endianess because:
- a region maps onto tiles,
- getting the tile's pixels uses a simple memcpy(), and
- a tile's pixels are in the native endianess.
I'm aware tile data in an XCF file is big-endian from
https://testing.developer.gimp.org/core/...ganization
But I'm interested in what's in memory and guaranteed to be seen through slicing a Python region into a string of bytes.
Given a region's bytes from a layer ‘l’:
r = l.get_pixel_rgn(0, 0, w, h)
rb = r[:, :]
I think rb will hold the bytes of the channel's values in the machine's native endianess because:
- a region maps onto tiles,
- getting the tile's pixels uses a simple memcpy(), and
- a tile's pixels are in the native endianess.
I'm aware tile data in an XCF file is big-endian from
https://testing.developer.gimp.org/core/...ganization
But I'm interested in what's in memory and guaranteed to be seen through slicing a Python region into a string of bytes.