[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSImage oddity
From: |
Andreas Höschler |
Subject: |
NSImage oddity |
Date: |
Sat, 29 May 2004 21:14:58 +0200 |
Hi all,
Since the great change of Alexander and Adam in January GNUstep no
longer relies on on libwraster to load PNG (or other graphics
formats). If you have a recent installation of GNUstep, it should be
able to read PNG files as soon as libpng is installed and found during
the configure process. If this does not work for you, you should
recheck the configure log to see if something did go wrong at that
stage. Otherwise it may be with the data itself. I only tested this
functionality with PNG files, but it should work as well with data in
PNG data. If your data wont work you could send on a (small) example
file for tests.
I have played some more and found out the following:
NSString *path = ...
NSData *data = [NSData dataWithContentsOfFile:path];
NSImage *image = [[NSImage alloc] initWithData:data];
This works with gui.0.9.0 for a TIFF but not for a PNG (see above).
This works with gui.0.9.2 for a PNG but not for a TIFF.
Anybody tried to load a TIFF with the latest version 0.9.2? It does no
longer work for me. I get no NSImageRep in the NSImage, though the
NSImage itself is created.
Any hints?
Regards,
Andreas