ngageoint / tiff-java

Tagged Image File Format Java Library
https://ngageoint.github.io/tiff-java
MIT License
72 stars 34 forks source link

Used ByteBuffer instead of arrays in Rasters #19

Closed kipliklotrika closed 7 years ago

kipliklotrika commented 7 years ago

Used ByteBuffer instead of arrays in Raster objects to avoid usage of arrays and multidimensional arrays. This will allow us more optimized use of memory and possibility to use library in low-memory environment.

Jochen0x90h commented 7 years ago

With the current apporach of having Number[], millions of objects are created on the heap. This is a problem especially on Android. Therefore I'd like to see this pull request merged which replaces arrays of Number by ByteBuffer.