Skip to content

Commit

Permalink
to do: write pixel data in YCBCR subsampled format
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Sep 15, 2024
1 parent bf69fec commit cccfebb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions coders/tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down

0 comments on commit cccfebb

Please sign in to comment.