Android-TiffBitmapFactory icon indicating copy to clipboard operation
Android-TiffBitmapFactory copied to clipboard

i decode a large tiff with area,but it's very slow

Open archko opened this issue 1 year ago • 0 comments

i load a large tiff, 300mb/2gb,and set decodearea(1000,100,1080,1600),samplesize=1 i discovery decode cos 7seconds in method: jint *NativeDecoder::getSampledRasterFromStripWithBounds(int inSampleSize, int *bitmapwidth,int *bitmapheight) { //start for (int i = 0; (i < stripMax * rowPerStrip || i > boundY + boundHeight); i += rowPerStrip) { } //end cos 7seconds }

i don't decode a fullsize image. this is log: 09:14:25.302 System.out I width==67704, height=2036, ori:0 09:14:25.303 LibTiff I param directoryCount:0 09:14:25.303 LibTiff I Tiff is open 09:14:25.303 LibTiff I Decode bounds present 09:14:25.303 LibTiff I Decode sampleSize:1, X:1000, y:100, w:1080, h:1600 09:14:25.304 LibTiff I Orientation:1 09:14:25.304 LibTiff I xres:8, yres:410763344 09:14:25.304 LibTiff I planar config:1 09:14:25.304 LibTiff I compression:5 09:14:25.304 LibTiff I bit per sample:8 09:14:25.304 LibTiff I sample per pixel:3 09:14:25.304 LibTiff I row per strip:1 09:14:25.304 LibTiff I strip size:203112 09:14:25.304 LibTiff I number of strips:2036 09:14:25.304 LibTiff I photometric:2 09:14:25.304 LibTiff I fill Order:0 09:14:25.304 LibTiff I sofrware:585735536 09:14:25.305 LibTiff I RPS:1, stripSize:203112, stripMax:2036 09:14:25.305 LibTiff I Decode method:3 09:14:25.305 LibTiff I width:67704, h:2036 09:14:25.305 LibTiff I new width:67704, h:1600 09:14:25.305 LibTiff I strip size:203112, stripMax:2036 09:14:25.305 LibTiff I rowsperstrip:1 "for" cos 7seconds 09:14:32.606 LibTiff I Decoding finished. Free memmory

could you have a idea? i think decode a area is fast than a fullsize image. i use mupdf decode tiff ,cos less than 50ms on the same area... but mupdf can't decode a tiff large than 2gb.

archko avatar Jul 04 '24 01:07 archko