* Source/tiff.m:

* Source/nsimage-tiff.h:
* Source/NSBitmapImageRep.m: Read DPI metadata in TIFF files and use this
to set the point size of the image rep


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32920 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ericwa 2011-04-21 22:19:06 +00:00
parent b145e686b0
commit cb94c73601
4 changed files with 36 additions and 0 deletions

View file

@ -1930,6 +1930,13 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
[_properties setObject: [NSNumber numberWithFloat: _comp_factor]
forKey: NSImageCompressionFactor];
if (info->xdpi > 0 && info->ydpi > 0)
{
NSSize pointSize = NSMakeSize((info->width / info->xdpi) * 72.0,
(info->height / info->ydpi) * 72.0);
[self setSize: pointSize];
}
if (NSTiffRead(image, info, [self bitmapData]))
{
free(info);