Ignore density if unit is 0

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40429 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2017-03-31 15:35:46 +00:00
parent c774fd75c3
commit 90d793695b
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2017-03-31 Riccardo Mottola <rm@gnu.org>
* Source/NSBitmapImageRep+JPEG.m (-_initBitmapFromJPEG:errorMessage:)
Ignore density if unit is 0
2017-03-28 Riccardo Mottola <rm@gnu.org>
* Source/NSBitmapImageRep+JPEG.m (-_initBitmapFromJPEG:errorMessage:)

View file

@ -521,7 +521,8 @@ static void gs_jpeg_memory_dest_destroy (j_compress_ptr cinfo)
y_density = y_density * 2.54;
}
if (!(x_density == 72 && y_density == 72))
/* consider density only if we have a valid unit */
if (d_unit && !(x_density == 72 && y_density == 72))
{
NSSize pointSize;