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.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
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. |
Values
Section titled “Values”| Value | Summary |
|---|---|
RGBA8 | Red, green, blue, then alpha, one byte each. |
BGRA8 | Blue, green, red, then alpha, one byte each. |
Method details
Section titled “Method details”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.
Value details
Section titled “Value details”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
