Nick wrote:
> I suppose the reason why is that nobody has stated a use-case for 
> this nice little image storage format. "Store all my images in a 
> format I can understand and parse easily" seems reasonable to me, 
> and I would like the ability to do that for any image I happen to 
> value, regardless of colour depth or dimensions.

Storing these images on a hard drive is a bad idea because they are
too big.  IMO one shouldn't discard PNG or JPEG unless one is afraid
of losing one's decoders.

This little format is meant for pipes, where size is not an issue.  The
best use-case I can think of is loading images:

        #!/bin/sh
        # Take any image and output it as a simple format.
        w=`identify -format %w "$1"`
        h=`identify -format %h "$1"`
        printf 'imagefile %9d %9d ' $w $h
        convert "$1" rgba:-

You can exec() this and read the output.

A lot of Linux programs load images with all-encompassing libraries like
SDL_image or DevIL.  I think that results in monolithic programs and does
not fit well with the Unix philosophy.

Charlie Murphy


Reply via email to