Skip to content

Commit

Permalink
Fix dithering for PCL/bitmap output.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Sep 26, 2023
1 parent 655160d commit d14297d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tools/ipptransform.c
Original file line number Diff line number Diff line change
Expand Up @@ -4235,13 +4235,10 @@ xform_setup(xform_raster_t *ras, // I - Raster information
}
}

if (ras->header.cupsBitsPerPixel == 1)
{
if (!strcmp(options->print_color_mode, "bi-level") || !strcmp(options->print_color_mode, "process-bi-level"))
memset(ras->dither, 127, sizeof(ras->dither));
else
memcpy(ras->dither, threshold, sizeof(ras->dither));
}
if (!strcmp(options->print_color_mode, "bi-level") || !strcmp(options->print_color_mode, "process-bi-level"))
memset(ras->dither, 127, sizeof(ras->dither));
else
memcpy(ras->dither, threshold, sizeof(ras->dither));

ras->header.cupsInteger[CUPS_RASTER_PWG_TotalPageCount] = (unsigned)options->copies * pages;
ras->back_header.cupsInteger[CUPS_RASTER_PWG_TotalPageCount] = (unsigned)options->copies * pages;
Expand Down

0 comments on commit d14297d

Please sign in to comment.