[Image-SIG] Question about adding a BOB datatype (loader/saver)

Fredrik Lundh fredrik@pythonware.com
Thu, 30 Mar 2000 10:50:00 +0200

Brett Tribble wrote:
> I'm reworking one of the existing Image Plugins to load/save the BOB
> image format. This format is very simple. It consists of two longs
> representing Width, Height. 256 palette entries, the image data,
> and that's it!

that's not "simple", that's braindead.  image formats without any
kind of magic numbers are just plain evil.

> t does not contain an Identifier string of any sort. Can I return None =
> the _accept value, or is there another way of doing this?

given that there's no way to properly identify a BOB file based
on its contents only ("assert filesize =3D=3D width*height+256" isn't
strong enough), you cannot use the automatic open facilities
at all.  instead, people have to explicitly call a function in your
support module (see GdImageFile.py for an example).

you can still register a save function as usual, but as for automatic
open, you're SOL.

> After I have it working, where should I submit it to make it available
> for others?

post it somewhere, and post a link to this list and the vaults of
parnassus (see www.python.org for a pointer).  if you don't have
a website, post the code to this list, so it ends up in the archive.