comparison OrthancFramework/Sources/Images/JpegWriter.cpp @ 5548:ca8442691f16

fix for armel
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 Mar 2024 21:53:41 +0100
parents 17dd8b26d0ec
children dcbf0c776945
comparison
equal deleted inserted replaced
5547:dca738d7846b 5548:ca8442691f16
175 memset(&cinfo, 0, sizeof(struct jpeg_compress_struct)); 175 memset(&cinfo, 0, sizeof(struct jpeg_compress_struct));
176 176
177 Internals::JpegErrorManager jerr; 177 Internals::JpegErrorManager jerr;
178 178
179 unsigned char* data = NULL; 179 unsigned char* data = NULL;
180 size_t size; 180 unsigned long size; // jpeg_mem_dest() uses "unsigned long*" instead of "size_t*"
181 181
182 if (setjmp(jerr.GetJumpBuffer())) 182 if (setjmp(jerr.GetJumpBuffer()))
183 { 183 {
184 jpeg_destroy_compress(&cinfo); 184 jpeg_destroy_compress(&cinfo);
185 185
200 200
201 Compress(cinfo, lines, width, height, format, quality_); 201 Compress(cinfo, lines, width, height, format, quality_);
202 202
203 // Everything went fine, "setjmp()" didn't get called 203 // Everything went fine, "setjmp()" didn't get called
204 204
205 jpeg.assign(reinterpret_cast<const char*>(data), size); 205 jpeg.assign(reinterpret_cast<const char*>(data), static_cast<size_t>(size));
206 free(data); 206 free(data);
207 } 207 }
208 208
209 uint8_t JpegWriter::GetQuality() const 209 uint8_t JpegWriter::GetQuality() const
210 { 210 {