C

Qt Quick Ultralite imagedecoder Example

/****************************************************************************** ** ** Copyright (C) 2023 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Ultralite module. ** ** $QT_BEGIN_LICENSE:COMM$ ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** $QT_END_LICENSE$ ** ******************************************************************************/
#include "board_config.h" #include "buffer_config.h" #include "stmimagedecoder.h" #include <qul/application.h> #include "stm32_mcu_specific.h" JPEG_HandleTypeDef JPEG_Handle; extern "C" { void JPEG_InitColorTables(); } void ConfigureBoard() { initJpegOutputBuffers(); /* Init The JPEG Color Look Up Tables used for YCbCr to RGB conversion */ JPEG_InitColorTables(); /* Init the HAL JPEG driver */ JPEG_Handle.Instance = JPEG; if (HAL_JPEG_Init(&JPEG_Handle) != HAL_OK) Qul::PlatformInterface::log("HAL_JPEG_Init failed\n"); static StmImageDecoder imagedecoder; Qul::Application::addImageDecoder(&imagedecoder); }