Announcing JPEGKit for Android

Austin Kettner
CameraKit
2 min readJun 6, 2018

--

Among our various efforts to get CameraKit just right for our 1.0.0 release, and after months of feedback on our 0.12.x and 0.13.x releases, we realized the need for a isolated JPEG component.

We officially are calling this JPEGKit and its first release is available on GitHub: https://github.com/CameraKit/jpegkit-android

JPEGKit bridges the libjpeg-turbo C++ library into Android and wraps it with an easy-to-use class. Currently JPEGKit enables the following:

  • Retrieve metadata such as width and height
  • Rotate the JPEG 90, 180, or 270 degrees
  • Flip the JPEG horizontally
  • Flip the JPEG vertically
  • Crop the JPEG to any Rect

This is all done without decoding the JPEG to RGB. All operations on the JPEG are done in C++ space and do not touch the Java memory, allowing you to work with extremely large JPEGs without the risk of an OutOfMemoryException.

At CameraKit, our focus is make the Camera simpler, more capable, more reliable, and simply awesome. CameraKit sits on top of the Camera 1 and Camera 2 APIs, ensuring you get all the functions you want, but in a dependable and dev friendly way.

Everything we do is Open-source and we encourage you to take a look, suggest improvements, and subscribe on our website for more updates!

--

--