openexr-devel
[Top][All Lists]
Advanced

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

Re: [Openexr-devel] partial image


From: Ken McGaugh
Subject: Re: [Openexr-devel] partial image
Date: Fri, 23 Apr 2004 21:14:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Florian Kainz wrote:
Ken McGaugh wrote:

Hey all, does anybody have any suggestions how to
tell if an exr is incomplete without loading the
whole thing?

It would be easy to check the lineOffsets list, but
it is buried deep in a private data member.

Would there be much of a performance hit to try and
read just the last scanline and see if an exception
is thrown?

Thanks.
--Ken


Trying to read the last scan line (bottom for INCREASING_Y, top for
DECREASING_Y) might be the fastest way to tell if a file is complete.

Missing scan lines are detected early during a readPixels() call; the
lineOffsets table is checked before any data are read from the file.
If the scan line is missing, an Iex::InputExc exception is thrown.

With some operating systems, for example, Irix, processing the first
exception thrown by a particular process can be fairly slow because
it requires loading additional information from the executable file,
but after that, exception handling tends to be fast.

Florian




Thanks Florian.  I did this and it works nicely.

--Ken





reply via email to

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