pngsave: ensure 8-bit palette images can be created (#3031)
This commit is contained in:
parent
fc01771454
commit
b58b7bd416
@ -145,9 +145,9 @@ vips_foreign_save_png_build( VipsObject *object )
|
|||||||
png->bitdepth < 8 )
|
png->bitdepth < 8 )
|
||||||
png->palette = TRUE;
|
png->palette = TRUE;
|
||||||
|
|
||||||
/* Disable palettization for >8 bit save.
|
/* Disable palettization for >8 bit save.
|
||||||
*/
|
*/
|
||||||
if( png->bitdepth >= 8 )
|
if( png->bitdepth > 8 )
|
||||||
png->palette = FALSE;
|
png->palette = FALSE;
|
||||||
|
|
||||||
if( vips__png_write_target( in, png->target,
|
if( vips__png_write_target( in, png->target,
|
||||||
|
@ -613,9 +613,9 @@ vips_foreign_save_spng_build( VipsObject *object )
|
|||||||
spng->bitdepth < 8 )
|
spng->bitdepth < 8 )
|
||||||
spng->palette = TRUE;
|
spng->palette = TRUE;
|
||||||
|
|
||||||
/* Disable palettization for >8 bit save.
|
/* Disable palettization for >8 bit save.
|
||||||
*/
|
*/
|
||||||
if( spng->bitdepth >= 8 )
|
if( spng->bitdepth > 8 )
|
||||||
spng->palette = FALSE;
|
spng->palette = FALSE;
|
||||||
|
|
||||||
if( vips_foreign_save_spng_write( spng, in ) ) {
|
if( vips_foreign_save_spng_write( spng, in ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user