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.