I’m using Sun’s Java Advanced Imaging libraries for image manipulation on a personal project, as I’ve mentioned before.
Things were working swimmingly, but when I started testing with images from my phone’s camera the following exception started appearing:
Error: One factory fails for the operation “jpeg”
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException[...]
The problem was not how the image had been created, as I originally suspected, but actually the image size - this seems to be a rather obscure way of telling you I’m out of heap space!. Increase the heap space or try with smaller images, and it should work just fine.