Menu ▾ ▴

#47 Fix for unnecessary EXR loading limitation

closed
None
5
2012-10-31
2010-06-27
No

Currently PluginEXR does not permit dataWindow with minimal bounds different form zero
These however are perfectly legal, but but allowing these images causes a crash for some images (Blobbies from the OpenEXR samples).

Here is the two line patch that fixes that:

First remove the checking:
Line 192 - remove the if((dataWindow.min.x > 0) || (dataWindow.min.x < 0) || (dataWindow.min.y > 0) || (dataWindow.min.y < 0)) statement

Then
Line 356 and 368 - add to the 'base' value, passed to Slice ctor "- dataWindow.min.x * bytespp - dataWindow.min.y * pitch"
The lines become:
Line 356: (char)(bits - dataWindow.min.x * bytespp - dataWindow.min.y * pitch), // base
Line 368: (char
)(bits + c * sizeof(float) - dataWindow.min.x * bytespp - dataWindow.min.y * pitch), // base

Note that bUseRgbaInterface already account for these.

Discussion

  • Hervé Drolon

    Hervé Drolon - 2010-06-29

    Thanks again,
    I've added your patch to the CVS.
    Hervé

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Anonymous
Anonymous

Add attachments
Cancel