Skip to content

Commit

Permalink
Write JFIF header when saving JPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed May 23, 2020
1 parent 7fb21bc commit 150360d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libImaging/JpegEncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ ImagingJpegEncode(Imaging im, ImagingCodecState state, UINT8* buf, int bytes)
context->cinfo.smoothing_factor = context->smooth;
context->cinfo.optimize_coding = (boolean) context->optimize;
if (context->xdpi > 0 && context->ydpi > 0) {
context->cinfo.write_JFIF_header = TRUE;
context->cinfo.density_unit = 1; /* dots per inch */
context->cinfo.X_density = context->xdpi;
context->cinfo.Y_density = context->ydpi;
Expand Down

0 comments on commit 150360d

Please sign in to comment.