Comments (9)
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.
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.
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.
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.
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.
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.
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.
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.
exrdisplay fixes (or at least workarounds) in commit e3dc410, merged into develop branch with f359a02.
Thanks, Piotr!
from openexr.
Related Issues (20)
- tarball at https://github.com/AcademySoftwareFoundation/openexr/releases/download/v3.2.4/openexr-v3.2.4.tar.gz extracts incorrectly HOT 3
- Python crashes when trying to write an output file HOT 2
- Is there any way to write a bigger image?
- [Need suggestions/recommendations] OpenEXR for high-speed images grabbing application scenario. HOT 7
- update metadata without rewriting the entire file HOT 4
- Bazel install target HOT 10
- fatal clang-format error on macOS can't upgrade/install via Homebrew HOT 13
- Cross-compiler target linking failure HOT 1
- Uninitialized sliceOptimizationData::type HOT 2
- [Usage recommendation request] Decompressing large EXRs in real-time. HOT 4
- OpenEXR.OutputFile Fails to Write to BytesIO Buffer HOT 1
- Install openexr 3.2.4 to macOS Big Sur 11.7.10 HOT 9
- Unit tests fail when building UB2 binaries on Mac. HOT 1
- CMP0107 issue
- OpenEXR static build not creating libIlmImf.a HOT 5
- Chromaticities should be a required attribute HOT 7
- terminate called after throwing an instance of `Iex_3_2::EioExc` in `OpenEXR.InputFile.channels` HOT 1
- AppleClang compiler warning with C++17
- std::atomic_*() overloads for shared_ptr are deprecated in C++20
- writing image from Python wrapper with xDensity gives "unknown attribute" warning
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openexr.