openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] previews...


From: Florian Kainz
Subject: Re: [Openexr-devel] previews...
Date: Mon, 23 Jun 2003 12:33:26 -0700

Hi Wayney,

I agree that we should have a way to preview an image quickly; I will
look into this issue.  Rather than specifying the preview image as 
three separate attributes, I would prefer to use a single attribute 
with three fields: 

    struct PreviewImage
    {
        unsigned int    width;
        unsigned int    height;
        unsigned char * pixels;         // (width * height) RGB triples,
    };                                  // 0 == "black", 255 == "white",
                                        // gamma == 2.2

Storing the preview image as a single attribute simplifies error handling; 
there is no chance that, for example, the attribute for the preview image's 
width exists, but the preview pixels are missing.

The programming interface for OpenEXR files requires that the values of all 
attributes are specified when an image file is opened, but if a program 
generates an image incrementally, one scan line at a time, and each scan 
line is written as soon as it is available, then the preview image is not 
known when the file is opened for writing.  We will have to come up a way 
to store the preview image pixels in the file later, after the header, and 
possibly some or all of the pixel data have been written.

Florian



address@hidden wrote:
> 
> Hiya,
>         I was wondering if we could have a defined set of attributes for
> .exr files describing a preview image of the contained file? Obviously, due
> to the way the image header is structured, an application can define its own
> preview attributes. But a defined 'standard preview' means that we won't see
> many different preview formats that are incompatible across applications.
> 
> I was thinking of something along the lines of
> 
> Attribute name                  Description
> previewWidth                    Width of preview image in pixels
> previewHeight                   Height of preview image in pixels
> previewImage                    RGB triples, a scanline at a time.
> 
> Or similar, the preview is optional and may not be present. But should
> provide a reasonable representation of the full image (the gamma\exposure of
> the image is pre-baked).
> 
> I'm writing an application which will be using .exr as its main format, and
> I was going to add a Windows shell extension that showed the image preview
> whilst the user was browsing folders. With all the compression\decompression
> and format conversions required (HDRI to flat RGB, some arbitrary
> gamma\exposure that doesn't necessarily make full use of the image) having
> an optional pre-computed image preview would be very useful for reducing
> processing time required.
> 
> Just a standard, defined preview would be great as all applications can then
> remain compatible. And of course the above is a quick 'off the top of my
> head' list of attributes and could probably be improved with some thought.
> 
> Thanks,
> Wayney
> 
> -Virus scanned and cleared ok
> 
> _______________________________________________
> Openexr-devel mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/openexr-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]