8000 fix alpha shift during colourspace conversion (#4302) · libvips/libvips@3ba36ce · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ba36ce

Browse files
authored
fix alpha shift during colourspace conversion (#4302)
* fix alpha shift during colourspace conversion The colour functions were not shifting alpha channels, just casting them, so operations which changed depth, like `icc_transform --depth 8` on a 16-bit image, could have an incorrectly scaled alpha. See #4301 Thanks frederikrosenberg * credit in changelog
1 parent c9d16c8 commit 3ba36ce

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- fix SZI write with openslide4 [goran-hc]
1010
- heifsave: prevent use of AV1 intra block copy feature [lovell]
1111
- threadpool: improve cooperative downsizing [kleisauke]
12+
- fix alpha shift during colourspace conversions [frederikrosenberg]
1213

1314
10/10/24 8.16.0
1415

libvips/colour/colour.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ vips_colour_build(VipsObject *object)
371371
*/
372372

373373
if (vips_cast(extra_bands[i], &t1, out->BandFmt,
374+
"shift", TRUE,
374375
NULL)) {
375376
g_object_unref(out);
376377
return -1;

0 commit comments

Comments
 (0)
0