On 9/13/06, Quentin Mathé <[EMAIL PROTECTED]> wrote:
Le 13 sept. 06 à 12:35, Nicolas Roard a écrit : > On 9/13/06, Yen-Ju Chen <[EMAIL PROTECTED]> wrote: >> Since Azalea need to read XPM image format, >> it may be better to wrap a general image library >> so that it can be used in other applications, like an image viewer. >> It seems that ImageMagick and GraphicsMagick are the only >> available choices. >> Any suggestion which one to use ? >> Does GNOME or KDE use any of them ? > > Frankly I think we should simply work on adding formats in GNUstep: > 1) it's not really difficult > 2) it would benefit _everybody_ instead of just one program :-) I agree with Nicolas on this point. It's better to extend NSImage rather than creating yet another API with a heavy dependency like ImageMagick which is itself in many cases just a wrapper around libtiff, libjpeg, libpng etc. Moreover I don't think it's possible to nicely hide ImageMagick behind NSImage, but I could be wrong. A a later point we could extract cropping, rotation etc. code implemented for this image viewer and package them in a standalone framework. We don't need to support many many formats, having read/write support for TIFF, JPEG, PNG, GIF, BMP, PDF, XPM is enough I think… We currently miss only : - PNG write support (but I wrote some code for IconKit) - GIF write - BMP read/write - PDF read/write (wrapping PopplerKit by implementing NSPDFImageRep is surely an easy task… perhaps it's even already done by PopplerKit) - XPM read/write In future adding support for some RAW formats would be nice, this could be achieve with a library like libopenraw. But it's not an urgent feature at all.
My plan is to wrap the image library as a subclass of NSBitmapImageRep. Therefore, it can go back into NSImage in the future. Curretly, NSImage does not dynamically load file format library. Therefore, it is easier to write one here now then integrate back later. And I am not sure GNUstep would like to have a dependency on ImageMagick or GraphicsMagick (MIT-license). And I only want to have a simple picture viewer, like eog from GNOME. PRICE is like a mini-photoshop. Preview and PhotoClip are both not too complicated to rewrite based on the functions. Most important issue I have in mind is that these applications are GPL license, and if we put some of the code into a framework, it has to be GPL, but LGPL or BSD. Since GNUstep provide good support on image as well as on text, I assume writing a simple image viewer will just be like writing a simple text editor. :) So here are the options now: 1. ImageMagick 2. GraphicsMagick 3. a collection of basic libraries (less favorable). Any comment ? By the way, I prefer to avoid glib runloop at this stage. :D Yen-Ju
Cheers, Quentin. -- Quentin Mathé [EMAIL PROTECTED] _______________________________________________ Etoile-discuss mailing list Etoile-discuss@gna.org https://mail.gna.org/listinfo/etoile-discuss
_______________________________________________ Etoile-discuss mailing list Etoile-discuss@gna.org https://mail.gna.org/listinfo/etoile-discuss