Re: Graphic Images


Subject: Re: Graphic Images
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Thu Apr 19 2001 - 15:17:47 CDT


>I'm convinced it is. We should support internally 3 image format. SVG
>for vectors, PNG for bitmaps, and JPEG for JPEG and arbitarly other
>lossy compression format. (yeah, it is a real waste to store JPEG as
>something else than JPEG).

I'm not seeing the argument for JPEG here. Is the argument here that storing
a JPEG as a PNG will take up a few extra bytes?

>>2) Use IM or some other lib to convert FOO->PNG. This kind-of sucks
>>because of the various overheads needed for the translation. Plus we
>>presumably could use this lib to render stuff to screen instead.
>
>This is the easiest way as the ABW file format, that will contains such
>images, will stay simple and limit itself to 3 image format. Have a look
>at the mess of RTF and Word. To fully support them, we need to support
>PICT, WMF, DIB, BMP, JPEG, GIF, PNG, etc. That is a real pain. In the 3
>format mentionned, handling the last 2 of them (PNG and JPEG) will be
>walk in the park given the fact that JPEGLib and libpng does the stuff,
>and that the various platform even have built in renderers (see
>gdk-pixbuf). SVG must be supported as XP, but more on this later.
>Conversion is done once (or twice, because of the preview in the open
>file dialog). That's all. Once imported it is in one of the 3 internally
>supported format that we know how to handle. Period.

#2 was the only option I was even going to consider. I don't see what's so
hard about storing a GIF or XXX in our file format.

<d mime-type="image/foo" ...>

But IMHO we have a serious problem/issue that we're going to have to deal
with embedded data in our file-format. No, I'm not just talking about
OLE2/Bonobo, but images too. We might need a streams API or Embedded
Filesystem concept. The way that we handle SVG in our file is interesting.

>Nope. That is the reason of 2. Convert the image on entry, like we
>ALREADY do for word processor. Yes, actually opening a file and saving
>it as RTF is not a safe (ie lossless) process. Same for all the other.

Converting the image on entry is the only way to go if we choose the #2
route. I'm just seriously wondering why:

1) We wouldn't want to take advantage of system libs inside of an XP
framework
2) We just don't embed data with a mime-type tag
3) We don't re-engineer a lot of our image framework. It seriously isn't
"passing muster" here...

And for the record, my GdkPixbuf work right now doesn't serve as anything
more than a replacement for our libpng rendering code. It doesn't (but could
easily) load other raster-graphics with a few modifications to XP code and
design.

Dom

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



This archive was generated by hypermail 2b25 : Thu Apr 19 2001 - 15:17:55 CDT