Re: Graphic Images


Subject: Re: Graphic Images
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Fri Apr 20 2001 - 04:02:25 CDT


> > JPEG->RGBA->PNG->RGBA->SCREEN (much like the BPM loader code) which
>
>That is what I'm doing because Abiword does not support JPEG internally.

Ick, ick, ick!

>Sure but if JPEG is supported internally, I'll do like the PNG importer.

Internal support for just about any format becomes only a few LOC really.

>Currently the result of a JPEG import is stored as a PNG within Abiword and
>JPEG -> is done only once.
>See:
><d name="/home/hub/compile/jpeg-6b/testorig.jpg_0" mime-type="image/png"
>base64="yes">
>iVBORw0KGgoAAAANSUhEUgAAAOMAAACVCAIAAAAll9rHAAAgAElEQVR4nIy8aY8kS5IcKKJq

I've never disputed this.

> > Let me be the devil's advocate here for a second. (ignoring patent/other
> > issues) We want to load a GIF. Ok, so we want to turn a GIF into a PNG.
>So
> > what can we do? Well, we have libungif to disassemble the GIF, so we
>have to
> > learn that (or gif2png... quite a bit of code itself). Or maybe we don't
> > want libungif. So we go and write our own. Now we put the RGBA back
>together
> > into a PNG, meaning that we now have libungif linked to our binary as
>well
> > as libjpeg and libpng.
>
>Yes that what we can do. But this process only need to ne done at import
>time.
>Later on you no longer need to conmvert from GIF since it would have been
>stored
>as PNG within the file.

Who cares when it is done? I'm arguing that this is tons of added code and
lots of low-level APIs that we just don't need to learn. Am I not making
this point clear? I feel like I'm being quite explicit...

> > Now I want to do TIFF. Then XPM. Then XBM. Then &c... So for every
>useful
> > image format that we want to support, we end up adding 1 library on top
>of
> > those we already ship + a new low-level API that someone must now learn
>and
> > use and maintain code for. <sarcasm>Sounds pleasant</sarcasm>
>
>Same.
>That is where ImageMagick, QuickTime Be OS translator and al. can play the
>game:
>provide infrastructure to *import* the image. This is done only once.

Why draw the line there? Seems completely arbitrary to me.

> > Now, I ask, how is this better than IM or some other similar solution?
>If
> > for some reason we do want to support libjpeg, libungif, etc.. why don't
>we
> > use libungif to just extract RGBA data from the image and render that to
> > screen instead of all this middleware conversion stuff?
>
>Because you actually have to store that data to disk to be able to use it
>back
>again. That is why we are all using Word processing system instead of
>ancient mechanic typewriter that are rather noisy. No ?

Umm... perhaps you've missed my 50 other emails on this topic. I'm wasting
valuable keystrokes. I might give myself carpal-tunnel-syndrome...

Disgruntled,
Dom

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



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