C
Qt Quick Ultralite imagedecoder Example
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <qul/private/global.h>
#include <platforminterface/imagedecoder.h>
#include "r_jcua_api.h"
class Rh850ImageDecoder : public Qul::PlatformInterface::ImageDecoder
{
public:
Rh850ImageDecoder();
~Rh850ImageDecoder();
bool imageInformation(RequestDataCallback &callback,
int16_t *width,
int16_t *height,
Qul::PixelFormat *actualPixelFormat,
Qul::PixelFormat optimalOpaquePixelFormat,
Qul::PixelFormat optimalAlphaPixelFormat) QUL_DECL_OVERRIDE;
int16_t bytesPerLine() const QUL_DECL_OVERRIDE;
int decodeImage(RequestDataCallback &callback,
unsigned char *outbuffer,
uint32_t outbufferSize,
Qul::PixelFormat pixelFormat,
uint32_t requiredBytesPerLine) QUL_DECL_OVERRIDE;
private:
void setJpegInfo(r_jcua_JpegFormat_t format, int16_t width, int16_t height, uint8_t bytesPerPixel);
r_jcua_ImageInfo_t m_jpegInfo;
};