Commit 07ee76e
committed
feat: Refactor writing color space metadata to unify behavior
This adds new functions to get and set colorspaces in a ImageSpace, to
make logic between file formats more consistent.
* pvt::set_colorspace_srgb and pvt::is_colorspace_srgb
* pvt::get_colorspace_rec709_gamma
* pvt::get_colorspace_icc_profile
* pvt::set_colorspace_cicp and pvt::get_colorspace_cicp
This fixes an issue where tga and rla were incorrectly using g22_rec709
and g18_rec709 without _scene suffix, and not handling g24_rec709.
There is existing consistency in that some file formats assume an empty
oiio:ColorSpace to mean sRGB, and some don't. This inconsistency is
preserved.
Signed-off-by: Brecht Van Lommel <[email protected]>1 parent 9229cf3 commit 07ee76e
File tree
30 files changed
+306
-274
lines changed- src
- bmp.imageio
- dds.imageio
- dpx.imageio
- ffmpeg.imageio
- gif.imageio
- heif.imageio
- iconvert
- include
- OpenImageIO
- iv
- jpeg.imageio
- jpeg2000.imageio
- jpegxl.imageio
- libOpenImageIO
- png.imageio
- raw.imageio
- rla.imageio
- targa.imageio
- tiff.imageio
- webp.imageio
30 files changed
+306
-274
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
262 | 264 | | |
263 | 265 | | |
264 | 266 | | |
265 | | - | |
| 267 | + | |
| 268 | + | |
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
828 | 830 | | |
829 | 831 | | |
830 | 832 | | |
831 | | - | |
| 833 | + | |
832 | 834 | | |
833 | 835 | | |
834 | 836 | | |
| |||
838 | 840 | | |
839 | 841 | | |
840 | 842 | | |
841 | | - | |
842 | | - | |
843 | | - | |
| 843 | + | |
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
853 | 854 | | |
854 | 855 | | |
855 | 856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
317 | | - | |
| 319 | + | |
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
436 | 438 | | |
437 | 439 | | |
438 | 440 | | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 441 | + | |
| 442 | + | |
444 | 443 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
449 | 447 | | |
450 | | - | |
| 448 | + | |
451 | 449 | | |
452 | 450 | | |
453 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
| 553 | + | |
557 | 554 | | |
558 | 555 | | |
559 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
262 | | - | |
| 264 | + | |
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
276 | | - | |
| 278 | + | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| |||
292 | 294 | | |
293 | 295 | | |
294 | 296 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 297 | + | |
301 | 298 | | |
302 | 299 | | |
303 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 255 | + | |
259 | 256 | | |
260 | 257 | | |
261 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | | - | |
| 229 | + | |
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4198 | 4198 | | |
4199 | 4199 | | |
4200 | 4200 | | |
4201 | | - | |
4202 | 4201 | | |
4203 | 4202 | | |
4204 | 4203 | | |
| |||
0 commit comments