The scanline start. Next scanline (if any) is returned pointer + pitchInBytes() bytes If the layout has a border, you can adress pixels with a X coordinate in: -borderWidth to width - 1 + borderWidth. Note: It is also valid to call scanline() and scanptr() for images that have zero width, zero height, and/or zero layer. Tags: #valid #data #plain
Returns a scanline pointer to the y nth line of pixels, in the given layer. scanptr is a shortcut to index the first layer (layer index 0). Only possible if the image has plain pixels. What pixel format it points to, depends on the image type().
For each scanline pointer, you can _always_ READ ptr[0..abs(pitchInBytes())] without memory error. However, WRITING to this scanline excess pixels doesn't guarantee anything by itself since the image could be a sub-image, and the underlying buffer could be shared.