Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

There are many threads on this forum asking about encoding from various image formats into Jpeg (.jpg).

- Most threads simply say that I must write my own encoder.
- Some say to use ICAMERA_RecordSnapshot instead, even though that can only encode data from the camera
- Some of the threads point to the function IMEDIAUTIL_EncodeJPEG, which further research seems to indicate will not work.
- One or two threads mention a 3rd party Jpeg Encoder that may be available.
- There is also reference to undocumented OEM functionality that may or may not be available to the API.

Search for "Jpeg Encoder" or "IMEDIAUTIL_EncodeJPEG" in all of the Brew Forums to see the referenced threads.

I have an IDIB that is modified from camera data onboard a Brew 3.1 device and must be saved as .jpg so that it can be sent to our server.

Please tell me how to Encode Jpeg or where a Brew encoder can be purchased.

- Thank you, David Manpearl

I've had good results with libjpeg ([url]http://www.ijg.org/)[/url]. It's a fairly straightforward code base to port, and the integer-fast mode produces nice results.
With it, you should be able to spin up the encoder, write scan lines to your JPEG, and shut down your decoder. See http://www.jpegcameras.com/libjpeg/libjpeg-2.html for a description of how to encode an image using libjpeg.
Good luck!
R.

I've had good results with libjpeg ([url]http://www.ijg.org/)[/url]. It's a fairly straightforward code base to port, and the integer-fast mode produces nice results.
With it, you should be able to spin up the encoder, write scan lines to your JPEG, and shut down your decoder. See http://www.jpegcameras.com/libjpeg/libjpeg-2.html for a description of how to encode an image using libjpeg.
Good luck!
R.