|
1 | 1 | /* JPEG class wrapper to ijg jpeg library |
2 | 2 |
|
3 | | - Copyright (C) 2000-2024 Ruven Pillay |
| 3 | + Copyright (C) 2000-2026 Ruven Pillay |
4 | 4 |
|
5 | 5 | This program is free software; you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
@@ -220,18 +220,18 @@ void JPEGCompressor::InitCompression( const RawTile& rawtile, unsigned int strip |
220 | 220 |
|
221 | 221 | jpeg_start_compress( &cinfo, TRUE ); |
222 | 222 |
|
223 | | - // Add an identifying comment |
224 | | - const char *comment = "iipsrv/" VERSION; |
225 | | - jpeg_write_marker( &cinfo, JPEG_COM, (const JOCTET*) comment, strlen(comment) ); |
226 | | - |
227 | | - // Embed ICC profile if one is supplied |
228 | | - writeICCProfile(); |
| 223 | + // Add EXIF metadata |
| 224 | + writeExifMetadata(); |
229 | 225 |
|
230 | 226 | // Add XMP metadata |
231 | 227 | writeXMPMetadata(); |
232 | 228 |
|
233 | | - // Add EXIF metadata |
234 | | - writeExifMetadata(); |
| 229 | + // Embed ICC profile if one is supplied |
| 230 | + writeICCProfile(); |
| 231 | + |
| 232 | + // Add an identifying comment |
| 233 | + const char *comment = "iipsrv/" VERSION; |
| 234 | + jpeg_write_marker( &cinfo, JPEG_COM, (const JOCTET*) comment, strlen(comment) ); |
235 | 235 |
|
236 | 236 | // Copy the encoded JPEG header data to a separate buffer |
237 | 237 | size_t datacount = dest->source_size - dest->pub.free_in_buffer; |
@@ -370,20 +370,19 @@ unsigned int JPEGCompressor::Compress( RawTile& rawtile ) |
370 | 370 | jpeg_set_quality( &cinfo, Q, TRUE ); |
371 | 371 |
|
372 | 372 | jpeg_start_compress( &cinfo, TRUE ); |
373 | | - |
374 | | - // Add an identifying comment |
375 | | - const char *comment = "iipsrv/" VERSION; |
376 | | - jpeg_write_marker( &cinfo, JPEG_COM, (const JOCTET*) comment, strlen(comment) ); |
377 | 373 |
|
378 | | - // Embed ICC profile if one is supplied |
379 | | - writeICCProfile(); |
| 374 | + // Add EXIF metadata |
| 375 | + writeExifMetadata(); |
380 | 376 |
|
381 | 377 | // Add XMP metadata |
382 | 378 | writeXMPMetadata(); |
383 | 379 |
|
384 | | - // Add EXIF metadata |
385 | | - writeExifMetadata(); |
| 380 | + // Embed ICC profile if one is supplied |
| 381 | + writeICCProfile(); |
386 | 382 |
|
| 383 | + // Add an identifying comment |
| 384 | + const char *comment = "iipsrv/" VERSION; |
| 385 | + jpeg_write_marker( &cinfo, JPEG_COM, (const JOCTET*) comment, strlen(comment) ); |
387 | 386 |
|
388 | 387 | // Compress the image line by line |
389 | 388 | JSAMPROW row[1]; |
|
0 commit comments