mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-25 17:45:06 +03:00
android: jpeg: post_processor_jpeg: Embed thumbnail into Exif metadata
Embed a Jpeg-encoded thumbnail into Exif metadata using the Thumbnailer class that got introduced. Introduce a helper function in Exif class for setting the thumbnail data. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> [Kieran: Add todo comment, and Compression enum] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
f0421988dc
commit
b053384ffa
4 changed files with 77 additions and 2 deletions
|
@ -8,12 +8,13 @@
|
|||
#define __ANDROID_POST_PROCESSOR_JPEG_H__
|
||||
|
||||
#include "../post_processor.h"
|
||||
#include "encoder_libjpeg.h"
|
||||
#include "thumbnailer.h"
|
||||
|
||||
#include <libcamera/geometry.h>
|
||||
|
||||
#include "libcamera/internal/buffer.h"
|
||||
|
||||
class Encoder;
|
||||
class CameraDevice;
|
||||
|
||||
class PostProcessorJpeg : public PostProcessor
|
||||
|
@ -28,9 +29,14 @@ public:
|
|||
CameraMetadata *metadata) override;
|
||||
|
||||
private:
|
||||
void generateThumbnail(const libcamera::FrameBuffer &source,
|
||||
std::vector<unsigned char> *thumbnail);
|
||||
|
||||
CameraDevice *const cameraDevice_;
|
||||
std::unique_ptr<Encoder> encoder_;
|
||||
libcamera::Size streamSize_;
|
||||
EncoderLibJpeg thumbnailEncoder_;
|
||||
Thumbnailer thumbnailer_;
|
||||
};
|
||||
|
||||
#endif /* __ANDROID_POST_PROCESSOR_JPEG_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue