Skip to content

Make all accesses implement ArrayDataAccess#20

Open
Rylern wants to merge 1 commit intomainfrom
array-accesses
Open

Make all accesses implement ArrayDataAccess#20
Rylern wants to merge 1 commit intomainfrom
array-accesses

Conversation

@Rylern
Copy link
Copy Markdown
Contributor

@Rylern Rylern commented Apr 13, 2026

Change all DataAccess by making them implement ArrayDataAccess.

Before this PR, when a tile of an image was accessed for the first time, the corresponding BufferedImage (or Raster) was saved, and getting a pixel of this tile was fetching the pixel from the BufferedImage / Raster.

With this PR, when a tile of an image is accessed for the first time, an array is created and populated by all pixels of the corresponding BufferedImage / Raster. Getting a pixel of this tile is now simply an array access.

In terms of performance, with this PR, the first access to a pixel belonging to a tile is slower, but all subsequent access to pixels of the same tile are faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant