Greyscale plotting adjustment
When plotting greyscale, we should use luminance preservation for the image output (blues get washed out otherwise).
This commit is contained in:
@@ -424,8 +424,9 @@ void PDF_PLOTTER::PlotImage( const wxImage & aImage, const wxPoint& aPos,
|
||||
}
|
||||
else
|
||||
{
|
||||
// Grayscale conversion
|
||||
putc( (r + g + b) / 3, workFile );
|
||||
// Greyscale conversion (CIE 1931)
|
||||
unsigned char grey = KiROUND( r * 0.2126 + g * 0.7152 + b * 0.0722 );
|
||||
putc( grey, workFile );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user