On Monday 25 February 2002 3:48 pm, Dekel Tsur wrote: > Don't try to code it your self. Just grab the code from some GPL project.
Two reasons not to: 1. "simple" cropping, rotation, scaling is easy and "simple" is enough for GImageXPM which is just a proof of concept image loader. The real image loaders will eventually be those provided by either xforms, gnome or qt2. 2. I want maintainable code. Have you looked at pnmscale.c? It's HORRIBLE. If it existed as a library, that'd be different. > Additionally, why not make ImageMagick do the scaling ? This is a possibility. Note, however, that there are issues (discussed ad nauseam on this list) with both convert and netpbm. It's for this reason that I tried "simple" cropping, rotation, scaling myself first. > This is especially true for viewing eps files: instead of converting to a > bitmap and then scaling the bitmap, it is more efficient to directly convert > the eps to a bitmap of the desired size. Note that the wrapper for the xforms image loader (proof of concopt code) is about 250 lines long with masses and masses of comments and white space and works fine. Looks like the whole GImageXPM class will become a white elephant sooner rather than later. Angus