Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Endianess of pixel data in a Python region for gimp 2.10.
#1
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.
Reply


Messages In This Thread
Endianess of pixel data in a Python region for gimp 2.10. - by teapot - 07-14-2025, 02:49 PM

Forum Jump: