[Libjpeg-turbo-devel] Help with java wrapper on mac
SIMD-accelerated libjpeg-compatible JPEG codec library
Brought to you by:
dcommander
From: <ma...@te...> - 2013-02-20 11:16:45
|
Ive installed libjpeg-turbo on my mac and added the jar and libs to my eclipse project. Im trying to create jpeg byte[] from my bufferedimage: TJCompressor tj = new TJCompressor(); tj.compress(image, TJ.PF_BGR); The error I get is: java.lang.Exception: tjBufSize(): Invalid argument I use a custom robot to create my bufferedimage with the type TYPE_3BYTE_BGR. I can create a byte[] using ImageIO but its to slow. I tried to find some tutorials on the java wrapper, but I havnt found any that encode a jpeg from a bufferedimage. I would be very grateful if someone could help me. |