Skip to content

Commit

Permalink
PS: fix embedding of grayscale jpegs
Browse files Browse the repository at this point in the history
  • Loading branch information
Koji Otani authored and Adrian Johnson committed Nov 16, 2010
1 parent d565639 commit 653ceb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cairo-ps-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,11 +2377,12 @@ _cairo_ps_surface_emit_jpeg_image (cairo_ps_surface_t *surface,
" /Width %d def\n"
" /Height %d def\n"
" /BitsPerComponent %d def\n"
" /Decode [ 0 1 0 1 0 1 ] def\n",
" /Decode [ %s ] def\n",
info.num_components == 1 ? "DeviceGray" : "DeviceRGB",
info.width,
info.height,
info.bits_per_component);
info.bits_per_component,
info.num_components == 1 ? "0 1" : "0 1 0 1 0 1");

if (surface->use_string_datasource) {
_cairo_output_stream_printf (surface->stream,
Expand Down

0 comments on commit 653ceb5

Please sign in to comment.