Initialize density to 0, so that in case it is unset (72dpi) it is not a random value in case the struct is not zeroed

This commit is contained in:
Riccardo Mottola 2017-08-25 14:20:58 +02:00
parent 02af4bbcd9
commit 78be5ef0ea
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2017-08-25 Riccardo Mottola <rm@gnu.org>
* Source/NSBitmapImageRep.m
Initialize density to 0, so that in case it is unset (72dpi) it is not a random value in case the struct is not zeroed.
2017-08-09 Svetlana Tkachenko
* ColorPickers/Russian.lproj/StandardPicker.strings

View file

@ -2016,6 +2016,8 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
info->samplesPerPixel = _numColors;
// resolution/density
info->xdpi = 0;
info->ydpi = 0;
if (_pixelsWide != (int)(_size.width) || _pixelsHigh != (int)(_size.height))
{
float x_density, y_density;