Commit Graph

44 Commits

Author SHA1 Message Date
Andrew Murray
ab8f465f1a Use transparency info when converting from RGB to LA 2024-03-26 19:55:22 +11:00
Andrew Murray
8b6a182815 Support conversion from RGB to RGBa 2024-03-21 16:25:40 +11:00
Richard Barnes
38cec87c93
Fix shift-sign issue in Convert.c (#7838)
* Fix shift-sign issue in Convert.c

Fixes
```
libImaging/Convert.c:513:25: error: signed shift result (0xFF000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Werror,-Wshift-sign-overflow]
    UINT32 trns = (0xff << 24) | ((b & 0xff) << 16) | ((g & 0xff) << 8) | (r & 0xff);
                   ~~~~ ^  ~~
```

---------

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-03-09 17:52:00 +11:00
Andrew Murray
d6a3f89e27 Open 16-bit grayscale PNGs as I;16 2024-03-02 15:39:43 +11:00
Andrew Murray
d682c18ded Use "gray" more consistently 2023-10-19 19:12:01 +11:00
Andrew Murray
b8c30655cc Include CMYK to RGB convert as unpacker 2023-10-06 16:05:03 +11:00
Andrew Murray
fd310512b9 Set C palette to be empty by default 2023-07-17 23:04:43 +10:00
Andrew Murray
f8d93267e1 Merge branch 'main' into i16n 2023-03-13 14:33:26 +11:00
Andrew Murray
700a8e98da Support converting between I;16N and L 2022-12-28 17:47:15 +11:00
Andrew Murray
5b4703d615 Added conversion from RGBa to RGB 2022-11-01 08:39:02 +11:00
Christoph Gohlke
4ab80f663e
Remove backup implementation of Round for Windows platforms 2022-10-27 08:15:36 -07:00
Andrew Murray
8a60db322f Copy palette when converting from P to PA 2022-08-17 17:05:53 +10:00
Andrew Murray
b84816c02f Added pa2p 2022-08-16 22:45:55 +10:00
Davide Consalvo
6a071f81d7 fixed p2pa conversion 2022-05-27 12:24:19 +02:00
Hugo van Kemenade
652542c770
Merge pull request #6112 from radarhere/i_i16_conversion
Clip I;16 to be unsigned, not signed
2022-03-10 19:56:45 +02:00
Andrew Murray
c8b69a78f3 Clip I;16 to be unsigned, not signed 2022-03-05 13:42:39 +11:00
Andrew Murray
e2b007f0c2 Use transparency info key when converting to LA 2022-03-01 20:25:25 +11:00
Andrew Murray
341802c2dc Removed unused argument 2022-02-19 10:50:07 +11:00
Hugo van Kemenade
0aca22e863
Merge pull request #6052 from radarhere/p2pa 2022-02-17 09:39:39 +02:00
Andrew Murray
41a9975377 Moved strcmp outside of loop 2022-02-14 21:50:19 +11:00
Andrew Murray
5411263d92 Simplified code 2022-02-14 19:24:47 +11:00
Andrew Murray
83d4f451fa Ensure image is opaque after converting P to PA with RGB palette 2022-02-14 16:10:59 +11:00
Andrew Murray
bb6212a332 Added rounding when converting P and PA 2021-11-10 08:00:58 +11:00
Andrew Murray
518ee3722a Use snprintf instead of sprintf 2021-06-30 23:52:56 +10:00
Andrew Murray
5f4504bb03 Limit sprintf modes to 10 characters 2021-06-30 19:35:09 +10:00
Andrew Murray
46b7e86bab Format with ClangFormat 2021-01-03 14:17:51 +11:00
Andrew Murray
3a75e843f4 Added braces 2020-05-11 07:46:12 +10:00
Andrew Murray
c1d9931adc Added braces 2020-05-10 19:56:36 +10:00
Alexander
d68147ce89 Fix rounding error on RGB to L conversion 2019-12-31 03:35:47 +03:00
Andrew Murray
76e5bd0f0f Added brackets 2019-09-06 20:07:23 +10:00
Andrew Murray
27d6fc7bc5 Improved HSV conversion 2019-08-12 06:50:18 +10:00
Rolf Eike Beer
0e0afd4acf fix bad loop increments in p2i() and p2f()
Fixes: 7a4af2b767
2019-07-01 20:25:52 +02:00
Rolf Eike Beer
7a4af2b767 fix unaligned accesses by using memcpy() 2019-06-29 21:04:11 +02:00
Andrew Murray
231fe4d62a Revert "Merge pull request #3838 from radarhere/i_conversion"
This reverts commit 41f3e7c8bd, reversing
changes made to 2f84482871.
2019-06-11 19:28:31 +10:00
Andrew Murray
8a035b8c5d Improved I mode conversion 2019-05-08 21:58:33 +10:00
Andrew Murray
4f3b44960f Resolved segfaults 2019-04-02 09:25:27 +11:00
Andrew Murray
54272c902f Improved converters 2019-03-30 11:18:08 +11:00
Andrew Murray
819b8acd26 Improved PA conversion 2019-03-29 23:13:07 +11:00
Hugo
0572983104
Merge pull request #3726 from radarhere/pa
Promote P images to PA in putalpha
2019-03-28 11:44:52 +02:00
Andrew Murray
4a5666f1f4 Added transparency for all PNG greyscale modes 2019-03-27 07:41:33 +11:00
Andrew Murray
f61828acdc Promote P images to PA in putalpha 2019-03-19 11:13:58 +11:00
Andrew Murray
57c7a51b51 Renamed CLIP to CLIP8 2018-04-21 18:14:05 +10:00
Andrew Murray
99dcc57720 Moved CLIP definitions into ImagingUtils.h 2018-04-21 16:35:58 +10:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00