# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/blender/hotfix-jpeg.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- blender-4.2.0/source/blender/imbuf/intern/jpeg.cc.coco 2024-06-05 14:47:57.000000000 +0300 +++ blender-4.2.0/source/blender/imbuf/intern/jpeg.cc 2024-07-18 20:40:16.478908632 +0300 @@ -113,7 +113,7 @@ src->terminal[0] = (JOCTET)0xFF; src->terminal[1] = (JOCTET)JPEG_EOI; - return true; + return TRUE; } static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) @@ -221,12 +221,12 @@ INPUT_VARS(cinfo); - INPUT_2BYTES(cinfo, length, return false); + INPUT_2BYTES(cinfo, length, return FALSE); length -= 2; if (length < 16) { for (i = 0; i < length; i++) { - INPUT_BYTE(cinfo, neogeo[i], return false); + INPUT_BYTE(cinfo, neogeo[i], return FALSE); } length = 0; if (STRPREFIX(neogeo, "NeoGeo")) { @@ -238,7 +238,7 @@ if (length > 0) { (*cinfo->src->skip_input_data)(cinfo, length); } - return true; + return TRUE; } static ImBuf *ibJpegImageFromCinfo( @@ -259,7 +259,7 @@ cinfo->dct_method = JDCT_FLOAT; jpeg_save_markers(cinfo, JPEG_COM, 0xffff); - if (jpeg_read_header(cinfo, false) == JPEG_HEADER_OK) { + if (jpeg_read_header(cinfo, FALSE) == JPEG_HEADER_OK) { depth = cinfo->num_components; if (cinfo->jpeg_color_space == JCS_YCCK) { @@ -562,7 +562,7 @@ char neogeo[128]; NeoGeo_Word *neogeo_word; - jpeg_start_compress(cinfo, true); + jpeg_start_compress(cinfo, TRUE); STRNCPY(neogeo, "NeoGeo"); neogeo_word = (NeoGeo_Word *)(neogeo + 6); @@ -704,7 +704,7 @@ /* own settings */ cinfo->dct_method = JDCT_FLOAT; - jpeg_set_quality(cinfo, quality, true); + jpeg_set_quality(cinfo, quality, TRUE); return 0; }