OLD | NEW |
1 /* | 1 /* |
2 * iccprofile.h | 2 * iccprofile.h |
3 * | 3 * |
4 * This file provides code to read and write International Color Consortium | 4 * This file provides code to read and write International Color Consortium |
5 * (ICC) device profiles embedded in JFIF JPEG image files. The ICC has | 5 * (ICC) device profiles embedded in JFIF JPEG image files. The ICC has |
6 * defined a standard format for including such data in JPEG "APP2" markers. | 6 * defined a standard format for including such data in JPEG "APP2" markers. |
7 * The code given here does not know anything about the internal structure | 7 * The code given here does not know anything about the internal structure |
8 * of the ICC profile data; it just knows how to put the profile data into | 8 * of the ICC profile data; it just knows how to put the profile data into |
9 * a JPEG file being written, or get it back out when reading. | 9 * a JPEG file being written, or get it back out when reading. |
10 * | 10 * |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 * and must be freed by the caller with free() when the caller no longer | 69 * and must be freed by the caller with free() when the caller no longer |
70 * needs it. (Alternatively, we could write this routine to use the | 70 * needs it. (Alternatively, we could write this routine to use the |
71 * IJG library's memory allocator, so that the data would be freed implicitly | 71 * IJG library's memory allocator, so that the data would be freed implicitly |
72 * at jpeg_finish_decompress() time. But it seems likely that many apps | 72 * at jpeg_finish_decompress() time. But it seems likely that many apps |
73 * will prefer to have the data stick around after decompression finishes.) | 73 * will prefer to have the data stick around after decompression finishes.) |
74 */ | 74 */ |
75 | 75 |
76 extern boolean read_icc_profile JPP((j_decompress_ptr cinfo, | 76 extern boolean read_icc_profile JPP((j_decompress_ptr cinfo, |
77 JOCTET **icc_data_ptr, | 77 JOCTET **icc_data_ptr, |
78 unsigned int *icc_data_len)); | 78 unsigned int *icc_data_len)); |
| 79 |
| 80 |
| 81 /* |
| 82 * Write the given ICCbis profile data into a JPEG file. |
| 83 * It *must* be called AFTER calling jpeg_start_compress() and BEFORE |
| 84 * the first call to jpeg_write_scanlines(). |
| 85 * (This ordering ensures that the APP2 marker(s) will appear after the |
| 86 * SOI and JFIF or Adobe markers, but before all else.) |
| 87 */ |
| 88 |
| 89 extern void write_icc_profile_bis JPP((j_compress_ptr cinfo, |
| 90 JOCTET profile, |
| 91 JOCTET intent)); |
| 92 |
| 93 |
| 94 /* |
| 95 * See if there was an ICCbis profile in the JPEG file being read; the |
| 96 * ICCbis profile is returned (0 for invalid / not found). If found, |
| 97 * write the rendering-intent to *intent (if given). |
| 98 */ |
| 99 |
| 100 extern unsigned int read_icc_profile_bis JPP((j_decompress_ptr cinfo, |
| 101 unsigned int *intent)); |
| 102 |
| 103 |
| 104 /* |
| 105 * Known ICCbis profiles are non-zero: |
| 106 */ |
| 107 |
| 108 #define ICCBISsRGB 0x01 |
| 109 #define ICCBISadobeRGB1998 0x02 |
OLD | NEW |