Skip to content

PixelLayout

enum PixelLayout
Package: dev.joid.lib.utils.image · Module: core · Source: PixelLayout.java

Order of the four bytes of a pixel in a buffer, to convert between buffers and ARGB int pixels.

ReturnsSignatureSummary
int[]read(ByteBuffer source, int width, int height, boolean bottomUp)Returns the width × height pixels of source as ARGB int values, row after row from the top, reading from the position of the buffer without moving it.
ByteBufferwrite(int[] pixels, ByteBuffer target)Writes the ARGB pixels into target in this byte order, from its position without moving it, then returns target.
ValueSummary
RGBA8Red, green, blue, then alpha, one byte each.
BGRA8Blue, green, red, then alpha, one byte each.

int[] read(ByteBuffer source, int width, int height, boolean bottomUp)

Returns the width × height pixels of source as ARGB int values, row after row from the top, reading from the position of the buffer without moving it. With bottomUp, the buffer holds the bottom row first, as a GL read gives it.

ByteBuffer write(int[] pixels, ByteBuffer target)

Writes the ARGB pixels into target in this byte order, from its position without moving it, then returns target.

RGBA8

Red, green, blue, then alpha, one byte each.

BGRA8

Blue, green, red, then alpha, one byte each.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page