Skip to content

Commit 595f5a1

Browse files
committed
make autosubsample more consistent
always disable subsample for Q>=90, and update docs too
1 parent a16c0c0 commit 595f5a1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

libvips/foreign/heifsave.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ vips_foreign_save_heif_build( VipsObject *object )
370370

371371
chroma = heif->subsample_mode == VIPS_FOREIGN_SUBSAMPLE_OFF ||
372372
( heif->subsample_mode == VIPS_FOREIGN_SUBSAMPLE_AUTO &&
373-
heif->Q > 90 ) ? "444" : "420";
373+
heif->Q >= 90 ) ? "444" : "420";
374374
error = heif_encoder_set_parameter_string( heif->encoder,
375375
"chroma", chroma );
376376
if( error.code &&
@@ -727,7 +727,7 @@ vips_foreign_save_heif_target_init( VipsForeignSaveHeifTarget *target )
727727
* Use @speed to control the CPU effort spent improving compression.
728728
* This is currently only applicable to AV1 encoders, defaults to 5.
729729
*
730-
* Chroma subsampling is normally automatically disabled for Q > 90. You can
730+
* Chroma subsampling is normally automatically disabled for Q >= 90. You can
731731
* force the subsampling mode with @subsample_mode.
732732
*
733733
* See also: vips_image_write_to_file(), vips_heifload().

libvips/foreign/jp2ksave.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ vips_foreign_save_jp2k_target_init( VipsForeignSaveJp2kTarget *target )
10761076
*
10771077
* Use @tile_width and @tile_height to set the tile size. The default is 512.
10781078
*
1079-
* Chroma subsampling is normally automatically disabled for Q > 90. You can
1079+
* Chroma subsampling is normally automatically disabled for Q >= 90. You can
10801080
* force the subsampling mode with @subsample_mode.
10811081
*
10821082
* This operation always writes a pyramid.

libvips/foreign/jpegsave.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ vips_foreign_save_jpeg_mime_init( VipsForeignSaveJpegMime *mime )
557557
* If @strip is set, no EXIF data, IPTC data, ICC profile or XMP metadata is
558558
* written into the output file.
559559
*
560-
* Chroma subsampling is normally automatically disabled for Q > 90. You can
560+
* Chroma subsampling is normally automatically disabled for Q >= 90. You can
561561
* force the subsampling mode with @subsample_mode.
562562
*
563563
* If @trellis_quant is set and the version of libjpeg supports it

libvips/include/vips/foreign.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ int vips_openslideload_source( VipsSource *source, VipsImage **out, ... )
372372

373373
/**
374374
* VipsForeignSubsample:
375-
* @VIPS_FOREIGN_SUBSAMPLE_AUTO: prevent subsampling when quality > 90
375+
* @VIPS_FOREIGN_SUBSAMPLE_AUTO: prevent subsampling when quality >= 90
376376
* @VIPS_FOREIGN_SUBSAMPLE_ON: always perform subsampling
377377
* @VIPS_FOREIGN_SUBSAMPLE_OFF: never perform subsampling
378378
*

0 commit comments

Comments
 (0)