Re: Linking against libjpeg ?


Subject: Re: Linking against libjpeg ?
From: Hubert Figuiere (hfiguiere@teaser.fr)
Date: Fri Apr 20 2001 - 04:08:19 CDT


According to Dom Lachowicz <cinamod@hotmail.com>:

> wc -l libjpeg/*.c libjpeg/*.h
> Big number. Is this bloat? What about libpng and all of our code that
> specificall manipulates and operates on PNGs? The BMP importer too. How many
> of these low-level classes must we create ourselves and ship libraries with
> until people realize that this is the *wrong* solution?

Actually we need to modify our current architecture to be able to render
a PNG or a JPEG (in case of JPEG support) by using either an XP
code that we already have or by rolling our own platform code that will
use platform provided services. The just must be done at *build* time.
Those PNG and JPEG will come from the Abiword document or the natively
from import. Any other bitmap image should be provided to the XP code as
a raw bitmap, that will be saved to PNG while actually saving the document.
(I'm against storing anything else but PNG, SVG or JPEG, when we talk about
images).
With this we will avoid the process of

FOO -> PNG -> Raw -> rendering

Instead we get
FOO -> Raw -> rendering

Loading a picture from the abiword document is nothing less than importing it.
BTW "raw format" can be abstracted to use platform render like gdk-pixbuf and al.
being confident that they'll have a caching mechanism to not decompress PNG
or JPEG each time it displays it.

> If you want to learn libjpeg, this is a great exercise. If we take this
> approach, we basically become an ImageMagik or GdkPixbuf which is *bad*
> because Abi is a word processor and not a graphics library. Please don't
> forget this...

I'm not forgetting. All I want is to be able to have the must versatile
solution, without being over engineered.

> [plug]
> wc -l GdkPixbufLoaderClass: 50
> wc -l ImlibLoaderClass: 50
> wc -l QuickTimeLoaderClass: 50
> wc -l IEComLoaderClass: 50
> wc -l BeosSystemLoaderClass: 50
> ...
> [/plug]

Actually it we be probably as much as the current JPEG importer. But yeah this is
a way to go, I'm pretty sure.

Hub



This archive was generated by hypermail 2b25 : Fri Apr 20 2001 - 04:09:23 CDT