No clue. Sorry.
Post by Ivan Ooijust tested your way. init TJCompressor 1 time. and reuse it.
1st time i call
tjc_byte = tjc.compress( ii_compress_flags );
tjc.compress( tjc_byte, ii_compress_flags );
and every time i will call tjc.close();
but still no luck...
still, 33 photos only and out of heap size...
You're doing exactly what I would do. Not sure why the garbage
(1) Allocate the TJCompressor instance statically and reuse it for
every subsequent image.
(2) If you know that the output image will never exceed a particular
size, then allocate it statically with size TJ.bufSize(maxWidth,
maxHeight, TJ.SAMP_420) and reuse the same output buffer for every image
(compress(byte[] dstBuf, int flags).) Even if the image size is
variable, then you could allocate the buffer statically with the
dimensions of the first image and re-allocate it only when a subsequent
image exceeds those dimensions.
Post by Ivan OoiHi all,
I'm try to use TJCompressor to compress more than 300 images but it is
easily out of memory heap size.
Is there anyway to over come this issues ?
Thanks
Ivan
TJCompressor tjc = new TJCompressor();
tjc.setSourceImage(abi_image,0,0,abi_image.getWidth(),
abi_image.getHeight() );
tjc.setJPEGQuality(70);
tjc.setSubsamp(TJ.SAMP_420);
byte lbyt_image2[] = tjc.compress( ii_compress_flags );
tjc.close();
tjc = null ;
System.gc();
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Libjpeg-turbo-users mailing list
https://lists.sourceforge.net/lists/listinfo/libjpeg-turbo-users
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Libjpeg-turbo-users mailing list
https://lists.sourceforge.net/lists/listinfo/libjpeg-turbo-users