Giter Site home page Giter Site logo

Comments (9)

fnordware avatar fnordware commented on September 8, 2024

Another thing: when using the commit that makes a functioning exrdisplay, deeptile files look different from deepscanline. For example, these files should look the same:

http://www.fnordware.com/downloads/deep_test.exr
http://www.fnordware.com/downloads/deeptile_test.exr

Brendan

from openexr.

peterhillman avatar peterhillman commented on September 8, 2024
Apologies for the late reply.
That file appears to be corrupt: the file flags indicate that the
image is a regular image, not a deep image, but the data itself
appears to be written as a deep image. Perhaps you didn't explicitly
set the type of the file to 'deepscanline' before writing. The
latest EXR library will silently fix this for you and ensure the
file flags are written correctly.On 26/07/13 10:10, Brendan Bolles
  wrote:

  I wrote this deepscanline file using the latest commit (34f5447) from the master
    branch:
  http://www.fnordware.com/downloads/deep_test.exr
  If build exrdisplay from HEAD (34f5447) and try to preview
    it I get an error: "Unexpected data block y coordinate". An
    older commit I'm using (e941cc4) doesn't have this
    problem.
  —
    Reply to this email directly or view it on
      GitHub.

from openexr.

fnordware avatar fnordware commented on September 8, 2024

I am using the most recent commit from the master branch, which sets the type for you when you use DeepScanLineOutputFile or any other *OutputFile. Moreover, if I run exrheader, the files show the correct type.

from openexr.

peterhillman avatar peterhillman commented on September 8, 2024

If I run exrheader from the most recent commit, it shows the type being
scanlineimage, since the "nonimage" bit isn't set in the flags field.
(Deep images should have flags 0x800, your image has flags 0x0)

The following code run with an old version of the library creates a file
with the wrong flags, but with the current HEAD creates the file
correctly. I suspect that's the problem you have.

{
Header h;
h.compression()=ZIPS_COMPRESSION;
DeepScanLineOutputFile fred("test.exr",h);
}

It is necessary that the flags take precedence over the type attribute
when they conflict, since it it possible to read an image with an
EXR-2.0.X library and write it with the EXR-1.7.X library. The older
library will write the correct flags but not the correct type attribute.
The new release enforces this precedence.

from openexr.

fnordware avatar fnordware commented on September 8, 2024

As far as I can tell, I'm using the current HEAD. We're talking about the master branch, right?

I think I figured out the problem. In this version of the DeepScanLineOutputFile constructor:

DeepScanLineOutputFile::DeepScanLineOutputFile
(OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os,
const Header &header,
int numThreads)

writeMagicNumberAndVersionField is passed header instead of _data->header. Ditto for DeepTiledOutputFile. This gets confusing because header is passed to initialize(), but then that function sets the type for _data->header. Anyway, I changed header to _data->header in the constructor and it seems to work now on my machine.

So I'm seeing this bug because I'm using the OStream version instead of the const char * version.

It also looks like the logic in GenericOutputFile::writeMagicNumberAndVersionField() will set the deep flag (NON_IMAGE_FLAG) or the tiled flag (TILED_FLAG), but not both (as you might for deeptiled). Is that intentional?

from openexr.

pstanczyk avatar pstanczyk commented on September 8, 2024

Taking a look - but the develop branch is the most up to date stable branch. The master branch typically points to the current released version.
Feature branches are off the develop branch.

  • Piotr
    From: Brendan Bolles [[email protected]]
    Sent: 16 August 2013 07:34
    To: openexr/openexr
    Subject: Re: [openexr] exrdisplay error when reading deepscanline (#68)

As far as I can tell, I'm using the current HEAD. We're talking about the master branch, right?

I think I figured out the problem. In this version of the DeepScanLineOutputFile constructor:

DeepScanLineOutputFile::DeepScanLineOutputFile
(OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os,
const Header &header,
int numThreads)

writeMagicNumberAndVersionField is passed header instead of _data->header. Ditto for DeepTiledOutputFile. This gets confusing because header is passed to initialize(), but then that function sets the type for _data->header. Anyway, I changed header to _data->header in the constructor and it seems to work now on my machine.

So I'm seeing this bug because I'm using the OStream version instead of the const char * version.

It also looks like the logic in GenericOutputFile::writeMagicNumberAndVersionField() will set the deep flag (NON_IMAGE_FLAG) or the tiled flag (TILED_FLAG), but not both (as you might for deeptiled). Is that intentional?


Reply to this email directly or view it on GitHubhttps://github.com//issues/68#issuecomment-22769390.

from openexr.

fnordware avatar fnordware commented on September 8, 2024

I submitted a pull request with the fix for the constructors. So files are written properly and exrdisplay does not complain.

I still have the problem with exrdisplay - it seems to show deeptiled files incorrectly. As mentioned before, I believe these two files should appear identical in exrdisplay, but they don't:

http://www.fnordware.com/downloads/deep_test.exr
http://www.fnordware.com/downloads/deeptile_test.exr

from openexr.

pstanczyk avatar pstanczyk commented on September 8, 2024

Brendan,

Indeed, the deep tiled output looks a little odd. Let me take a closer look at what is happening here ...

  • Piotr
    From: Brendan Bolles [[email protected]]
    Sent: 02 September 2013 16:25
    To: openexr/openexr
    Cc: Piotr Stanczyk
    Subject: Re: [openexr] exrdisplay error when reading deepscanline (#68)

I submitted a pull requesthttps://github.com//pull/72 with the fix for the constructors. So files are written properly and exrdisplay does not complain.

I still have the problem with exrdisplay - it seems to show deeptiled files incorrectly. As mentioned before, I believe these two files should appear identical in exrdisplay, but they don't:

http://www.fnordware.com/downloads/deep_test.exr
http://www.fnordware.com/downloads/deeptile_test.exr


Reply to this email directly or view it on GitHubhttps://github.com//issues/68#issuecomment-23682931.

from openexr.

fnordware avatar fnordware commented on September 8, 2024

exrdisplay fixes (or at least workarounds) in commit e3dc410, merged into develop branch with f359a02.

Thanks, Piotr!

from openexr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.