I have a camera module that only supports the RGB565 format and does not natively capture images in JPEG format. To work around this, I first capture the image in RGB565 and then encode it into JPEG.
I know about the demo example. My question is how do I use this library example in my own code. It requires me to have JPEGENC library so how I structure those files in my workspace/folder accordingly.
If the library is not available from the Arduino IDE Library Manager then download the .zip file from GitHub then in the IDE use Sketch/Include Library/ Add .ZIP file and the library will be installed and accessible from the IDE
Hi @bidhant. The first thing to do is to install the library. You can do that using the Arduino IDE Library Manager. I'll provide instructions:
Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
Type JPEGENC in the "Filter your search..." field.
Scroll down through the list of libraries until you see the "JPEGENC" entry.
You will see an "INSTALL" button at the bottom of the entry. Click the button.
Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
ⓘ Successfully installed library ...
You will now find the example sketches for the library under the File > Examples > JPEGENC menu in Arduino IDE. Study those examples to learn how to use the library in your own sketches.
Yes this worked for me. Also I found that the "esp_camera.h" had a built in library which could decode the rgb565 images to jpeg easily. I just had to use "frame2jpg()" to get it done. Thanks for the help community.