@@ -373,6 +373,33 @@ im_RGB162GREY16 in
373
373
im_GREY162RGB16 in
374
374
= image_set_type Image_type.RGB16 (in ++ in ++ in);
375
375
376
+ /* The vips8 scRGB functions.
377
+ */
378
+
379
+ im_sRGB2scRGB in
380
+ = out
381
+ {
382
+ [out] = vips_call "sRGB2scRGB" [in] [];
383
+ }
384
+
385
+ im_scRGB2sRGB in
386
+ = out
387
+ {
388
+ [out] = vips_call "scRGB2sRGB" [in] [];
389
+ }
390
+
391
+ im_scRGB2XYZ in
392
+ = out
393
+ {
394
+ [out] = vips_call "scRGB2XYZ" [in] [];
395
+ }
396
+
397
+ im_XYZ2scRGB in
398
+ = out
399
+ {
400
+ [out] = vips_call "XYZ2scRGB" [in] [];
401
+ }
402
+
376
403
/* apply a func to an image ... make it 1 or 3 bands, and reapply other bands
377
404
* on the way out. Except if it's LABPACK.
378
405
*/
@@ -457,6 +484,7 @@ _colour_conversion_table = [
457
484
[B_W, UCS, im_XYZ2UCS @ im_sRGB2XYZ @ im_mono2sRGB @ im_clip],
458
485
[B_W, RGB, im_XYZ2disp @ im_sRGB2XYZ @ im_mono2sRGB @ im_clip],
459
486
[B_W, sRGB, im_mono2sRGB @ im_clip],
487
+ [B_W, scRGB, im_sRGB2scRGB @ im_mono2sRGB @ im_clip],
460
488
[B_W, RGB16, image_set_type RGB16 @ im_8216 @ im_mono2sRGB],
461
489
[B_W, GREY16, image_set_type GREY16 @ im_8216],
462
490
[B_W, LABQ, im_Lab2LabQ @ im_sRGB2Lab @ im_mono2sRGB @ im_clip],
@@ -471,6 +499,7 @@ _colour_conversion_table = [
471
499
[XYZ, UCS, im_XYZ2UCS @ im_clip2f],
472
500
[XYZ, RGB, im_XYZ2disp @ im_clip2f],
473
501
[XYZ, sRGB, im_XYZ2sRGB @ im_clip2f],
502
+ [XYZ, scRGB, im_XYZ2scRGB @ im_clip2f],
474
503
[XYZ, LABQ, im_Lab2LabQ @ im_XYZ2Lab @ im_clip2f],
475
504
[XYZ, LABS, im_LabQ2LabS @ im_Lab2LabQ @ im_XYZ2Lab @ im_clip2f],
476
505
@@ -482,6 +511,7 @@ _colour_conversion_table = [
482
511
[YXY, UCS, im_XYZ2UCS @ im_Yxy2XYZ @ im_clip2f],
483
512
[YXY, RGB, im_XYZ2disp @ im_Yxy2XYZ @ im_clip2f],
484
513
[YXY, sRGB, im_XYZ2sRGB @ im_Yxy2XYZ @ im_clip2f],
514
+ [YXY, scRGB, im_XYZ2scRGB @ im_Yxy2XYZ @ im_clip2f],
485
515
[YXY, LABQ, im_Lab2LabQ @ im_XYZ2Lab @ im_Yxy2XYZ @ im_clip2f],
486
516
[YXY, LABS, im_LabQ2LabS @ im_Lab2LabQ @ im_XYZ2Lab @ im_Yxy2XYZ @
487
517
im_clip2f],
@@ -494,6 +524,7 @@ _colour_conversion_table = [
494
524
[LAB, UCS, im_Lab2UCS @ im_clip2f],
495
525
[LAB, RGB, im_Lab2disp @ im_clip2f],
496
526
[LAB, sRGB, im_Lab2sRGB @ im_clip2f],
527
+ [LAB, scRGB, im_XYZ2scRGB @ im_Lab2XYZ @ im_clip2f],
497
528
[LAB, LABQ, im_Lab2LabQ @ im_clip2f],
498
529
[LAB, LABS, im_Lab2LabS @ im_clip2f],
499
530
@@ -505,6 +536,7 @@ _colour_conversion_table = [
505
536
[LCH, UCS, im_LCh2UCS @ im_clip2f],
506
537
[LCH, RGB, im_Lab2disp @ im_LCh2Lab @ im_clip2f],
507
538
[LCH, sRGB, im_Lab2sRGB @ im_LCh2Lab @ im_clip2f],
539
+ [LCH, scRGB, im_XYZ2scRGB @ im_Lab2XYZ @ im_LCh2Lab @ im_clip2f],
508
540
[LCH, LABQ, im_Lab2LabQ @ im_LCh2Lab @ im_clip2f],
509
541
[LCH, LABS, im_LabQ2LabS @ im_Lab2LabQ @ im_LCh2Lab @ im_clip2f],
510
542
@@ -516,6 +548,7 @@ _colour_conversion_table = [
516
548
[UCS, UCS, image_set_type UCS],
517
549
[UCS, RGB, im_Lab2disp @ im_UCS2Lab @ im_clip2f],
518
550
[UCS, sRGB, im_Lab2sRGB @ im_UCS2Lab @ im_clip2f],
551
+ [UCS, scRGB, im_XYZ2scRGB @ im_Lab2XYZ @ im_UCS2Lab @ im_clip2f],
519
552
[UCS, LABQ, im_Lab2LabQ @ im_UCS2Lab @ im_clip2f],
520
553
[UCS, LABS, im_LabQ2LabS @ im_Lab2LabQ @ im_UCS2Lab @ im_clip2f],
521
554
@@ -527,6 +560,7 @@ _colour_conversion_table = [
527
560
[RGB, UCS, im_Lab2UCS @ im_disp2Lab @ im_clip],
528
561
[RGB, RGB, image_set_type RGB],
529
562
[RGB, sRGB, im_XYZ2sRGB @ im_disp2XYZ @ im_clip],
563
+ [RGB, scRGB, im_XYZ2scRGB @ im_disp2XYZ @ im_clip],
530
564
[RGB, RGB16, image_set_type RGB16 @ im_8216],
531
565
[RGB, GREY16, image_set_type GREY16 @ im_8216 @ im_sRGB2mono],
532
566
[RGB, LABQ, im_Lab2LabQ @ im_disp2Lab @ im_clip],
@@ -540,21 +574,39 @@ _colour_conversion_table = [
540
574
[sRGB, UCS, im_XYZ2UCS @ im_sRGB2XYZ @ im_clip],
541
575
[sRGB, RGB, im_XYZ2disp @ im_sRGB2XYZ @ im_clip],
542
576
[sRGB, sRGB, image_set_type sRGB],
577
+ [sRGB, scRGB, im_sRGB2scRGB @ im_clip],
543
578
[sRGB, RGB16, image_set_type RGB16 @ im_8216],
544
579
[sRGB, GREY16, image_set_type GREY16 @ im_8216 @ im_sRGB2mono],
545
580
[sRGB, LABQ, im_Lab2LabQ @ im_sRGB2Lab @ im_clip],
546
- [sRGB, LABS, im_LabQ2LabS @ im_Lab2LabQ @ im_sRGB2Lab @ im_clip],
581
+ [sRGB, LABS, im_Lab2LabS @ im_sRGB2Lab @ im_clip],
582
+
583
+ [scRGB, B_W, im_sRGB2mono @ im_scRGB2sRGB],
584
+ [scRGB, XYZ, im_scRGB2XYZ],
585
+ [scRGB, YXY, im_XYZ2Yxy @ im_scRGB2XYZ],
586
+ [scRGB, LAB, im_XYZ2Lab @ im_scRGB2XYZ],
587
+ [scRGB, LCH, im_Lab2LCh @ im_XYZ2Lab @ im_scRGB2XYZ],
588
+ [scRGB, UCS, im_XYZ2UCS @ im_scRGB2XYZ],
589
+ [scRGB, RGB, im_XYZ2disp @ im_scRGB2XYZ],
590
+ [scRGB, sRGB, im_scRGB2sRGB],
591
+ [scRGB, scRGB, image_set_type scRGB],
592
+ [scRGB, RGB16, image_set_type RGB16 @ im_8216 @ im_scRGB2sRGB],
593
+ [scRGB, GREY16, image_set_type GREY16 @ im_8216 @ im_sRGB2mono @
594
+ im_scRGB2sRGB],
595
+ [scRGB, LABQ, im_Lab2LabQ @ im_XYZ2Lab @ im_scRGB2XYZ],
596
+ [scRGB, LABS, im_Lab2LabS @ im_XYZ2Lab @ im_scRGB2XYZ],
547
597
548
598
[RGB16, B_W, im_1628 @ im_sRGB2mono],
549
599
[RGB16, RGB, image_set_type RGB @ im_1628],
550
600
[RGB16, sRGB, image_set_type sRGB @ im_1628],
601
+ [RGB16, scRGB, im_sRGB2scRGB],
551
602
[RGB16, RGB16, image_set_type RGB16],
552
603
[RGB16, GREY16, im_RGB162GREY16],
553
604
[RGB16, LABS, im_LabQ2LabS @ im_Lab2LabQ @ im_sRGB2Lab],
554
605
555
606
[GREY16, B_W, image_set_type B_W @ im_1628],
556
607
[GREY16, RGB, im_mono2sRGB @ im_1628],
557
608
[GREY16, sRGB, im_mono2sRGB @ im_1628],
609
+ [GREY16, scRGB, im_sRGB2scRGB @ im_mono2sRGB],
558
610
[GREY16, RGB16, im_GREY162RGB16],
559
611
[GREY16, GREY16, image_set_type GREY16],
560
612
@@ -566,6 +618,7 @@ _colour_conversion_table = [
566
618
[LABQ, UCS, im_Lab2UCS @ im_LabQ2Lab],
567
619
[LABQ, RGB, im_LabQ2disp],
568
620
[LABQ, sRGB, im_Lab2sRGB @ im_LabQ2Lab],
621
+ [LABQ, scRGB, im_XYZ2scRGB @ im_Lab2XYZ @ im_LabQ2Lab],
569
622
[LABQ, LABQ, image_set_type LABQ],
570
623
[LABQ, LABS, im_LabQ2LabS],
571
624
@@ -578,8 +631,8 @@ _colour_conversion_table = [
578
631
[LABS, LCH, im_Lab2LCh @ im_LabQ2Lab @ im_LabS2LabQ @ im_clip2s],
579
632
[LABS, UCS, im_Lab2UCS @ im_LabQ2Lab @ im_LabS2LabQ @ im_clip2s],
580
633
[LABS, RGB, im_LabQ2disp @ im_LabS2LabQ @ im_clip2s],
581
- [LABS, sRGB, im_XYZ2sRGB @
582
- im_Lab2XYZ @ im_LabQ2Lab @ im_LabS2LabQ @ im_clip2s],
634
+ [LABS, sRGB, im_XYZ2sRGB @ im_Lab2XYZ @ im_LabS2Lab @ im_clip2s],
635
+ [LABS, scRGB, im_XYZ2scRGB @ im_Lab2XYZ @ im_LabS2Lab @ im_clip2s],
583
636
[LABS, LABQ, im_LabS2LabQ @ im_clip2s],
584
637
[LABS, LABS, image_set_type LABS]
585
638
]
@@ -595,6 +648,7 @@ _colour_conversion_table = [
595
648
UCS = 18;
596
649
RGB = 17;
597
650
sRGB = 22;
651
+ scRGB = 28;
598
652
RGB16 = 25;
599
653
GREY16 = 26;
600
654
LABQ = 16;
0 commit comments