From cccfebb3ec43ea38ad6b9a0594735e9d3c7ae890 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 15 Sep 2024 08:58:08 -0400 Subject: [PATCH] to do: write pixel data in YCBCR subsampled format --- coders/tiff.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/coders/tiff.c b/coders/tiff.c index 0d1cb655c..57620b5fb 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -3602,7 +3602,9 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, flags; sampling_factor=(const char *) NULL; - value=GetImageProperty(image,"jpeg:sampling-factor"); + value=GetImageOption(image_info,"jpeg:sampling-factor"); + if (value == (char *) NULL) + value=GetImageProperty(image,"jpeg:sampling-factor"); if (value != (char *) NULL) { sampling_factor=value; @@ -3617,8 +3619,12 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, flags=ParseGeometry(sampling_factor,&geometry_info); if ((flags & SigmaValue) == 0) geometry_info.sigma=geometry_info.rho; - (void) TIFFSetField(tiff,TIFFTAG_YCBCRSUBSAMPLING,(uint16) - geometry_info.rho,(uint16) geometry_info.sigma); + /* + To do: write pixel data in YCBCR subsampled format. + + (void) TIFFSetField(tiff,TIFFTAG_YCBCRSUBSAMPLING,(uint16) + geometry_info.rho,(uint16) geometry_info.sigma); + */ } } (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_BITSPERSAMPLE,