File indexing completed on 2025-01-19 03:55:55
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-11-22 0007 * Description : some workaround functions to read jpeg 0008 * files without relying on libjpeg 0009 * 0010 * SPDX-FileCopyrightText: 2008 by Patrick Spendrin <ps ml at gmx dot de> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_JPEG_WIN_H 0017 #define DIGIKAM_JPEG_WIN_H 0018 0019 // C+ includes 0020 0021 #include <cstdio> 0022 #include <cstdlib> 0023 0024 // Local includes 0025 0026 extern "C" 0027 { 0028 #include "iccjpeg.h" 0029 } 0030 0031 namespace Digikam 0032 { 0033 0034 namespace JPEGUtils 0035 { 0036 0037 typedef struct 0038 { 0039 struct jpeg_source_mgr pub; 0040 JOCTET eoi[2]; 0041 } digikam_source_mgr; 0042 0043 void init_source (j_decompress_ptr cinfo); 0044 boolean fill_input_buffer (j_decompress_ptr cinfo); 0045 void skip_input_data (j_decompress_ptr cinfo, long nbytes); 0046 void term_source (j_decompress_ptr cinfo); 0047 void jpeg_memory_src (j_decompress_ptr cinfo, const JOCTET* buffer, size_t bufsize); 0048 0049 } // namespace JPEGUtils 0050 0051 } // namespace Digikam 0052 0053 #endif // DIGIKAM_JPEG_WIN_H