Skip to content

Commit 9ab6784

Browse files
authored
heifsave: reject multiband images (#4392)
1 parent ae14d97 commit 9ab6784

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- invertlut: fix final value in some cases
2323
- matrixload: fix file format detect for some matrix types
2424
- radload: improve sanity check of colour-related headers [lovell]
25+
- heifsave: reject multiband images [lovell]
2526

2627
10/10/24 8.16.0
2728

libvips/foreign/heifsave.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,15 @@ vips_foreign_save_heif_build(VipsObject *object)
689689
return -1;
690690
}
691691

692+
/* Reject multiband images.
693+
*/
694+
if (save->ready->Type == VIPS_INTERPRETATION_MULTIBAND) {
695+
vips_error("heifsave", _("Unsupported interpretation: %s"),
696+
vips_enum_nick(VIPS_TYPE_INTERPRETATION,
697+
save->ready->Type));
698+
return -1;
699+
}
700+
692701
/* Make a heif image the size of a page. We send sink_disc() output
693702
* here and write a frame each time it fills.
694703
*/

0 commit comments

Comments
 (0)