Skip to content

Commit 982a835

Browse files
authored
spngsave: Don't shift indexed pixels (#3101)
1 parent e619836 commit 982a835

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libvips/foreign/spngsave.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ vips_foreign_save_spng_pack( VipsForeignSaveSpng *spng,
270270
VipsPel *q, VipsPel *p, size_t n )
271271
{
272272
int pixel_mask = 8 / spng->bitdepth - 1;
273-
int shift = 8 - spng->bitdepth;
273+
int shift = spng->palette ? 0 : 8 - spng->bitdepth;
274274

275275
VipsPel bits;
276276
size_t x;

0 commit comments

Comments
 (0)