Exr crop fills with white pixel. #6719
Replies: 18 comments
-
When I list out all the possible Imagemagick compression types, it does not list DWAA. Perhaps that is why your command does not work?
|
Beta Was this translation helpful? Give feedback.
-
@fmw42 are you on the latest version?
Its a very recent addition ImageMagick/exr#1 |
Beta Was this translation helpful? Give feedback.
-
Yes, IM 6.9.10.68 and 7.0.8.68. But I listed above from IM 6. I see now that if I use IM 7 and list the compressions, it does list DWAA. Sorry about the confusion. |
Beta Was this translation helpful? Give feedback.
-
Looks like its not just the DWAA compression. Converting any EXR that has a crop, ImageMagick will fill the cropped pixels with white. |
Beta Was this translation helpful? Give feedback.
-
If you crop, try adding +repage after the crop to remove the virtual canvas geometry. Does that help? |
Beta Was this translation helpful? Give feedback.
-
Do you mean like the following? That still has the white pixel fill.
|
Beta Was this translation helpful? Give feedback.
-
Remove the
+repage should not be needed for JPG output, which does not support virtual canvas. So if your output is JPG and you have cropped your image, the cropped out area should not show. Post a link to an example exr image and the exact command line you are using. This command works just fine for me:
IM 7.0.8.68 Q16 Mac OSX Sierra. Perhaps I misunderstand your issue. Please clarify where the crop is done. Your command shows no cropping! |
Beta Was this translation helpful? Give feedback.
-
Yeah, I may not have been very clear. The exr is already cropped from Nuke with its autocrop feature. Here is an EXR cropped from Nuke; Using this command results in the cropped pixel to fill with white;
|
Beta Was this translation helpful? Give feedback.
-
Yes, Imagemagick is getting the wrong arguments for the size for the EXR image. Here is what I get from EXIFTOOL:
Note the ImageSize parameter near the bottom as 695x562. But Imagemagick is using:
1920x1080 which comes from what is shown in EXIFTOOL as:
So I believe there might be a bug that the Imagemagick developers will need to look into. |
Beta Was this translation helpful? Give feedback.
-
You can control the background color with
|
Beta Was this translation helpful? Give feedback.
-
Thanks @dlemstra! That'll work as a workaround atm. To be specific we need to specify the background and alpha:
It does remove the built-in cropping when converting between exrs, so not sure whether Image Magick want to look into this:
Personally I can live with the workaround solution. |
Beta Was this translation helpful? Give feedback.
-
What is the result that you are expecting? Do you want the cropped image instead? |
Beta Was this translation helpful? Give feedback.
-
I would expect the exrs to match when converting between different compressions.
We end up with a |
Beta Was this translation helpful? Give feedback.
-
It took me a while but I finally understand that you would like to preserve the DataWindow. ImageMagick currently does not preserve this. Would it help you if it would be possible to only read the DataWindow and get an image that is only the cropped area? |
Beta Was this translation helpful? Give feedback.
-
I would expect to preserve the DataWindow. BUT with the solution of flooding the background with black transparent pixels works for me, so consider this issue non-priority and just something to flag for the future if someone else are having the same issue. |
Beta Was this translation helpful? Give feedback.
-
For anyone following this or finding it later, you dont need
|
Beta Was this translation helpful? Give feedback.
-
In Imagemagick 7, use magick, not magick convert. The latter will give Imagemagick 6 behavior. |
Beta Was this translation helpful? Give feedback.
-
We would like to +1 this behaviour as incorrect. EXR's have a datawindow (autocrop) that needs to be preserved. In vfx we use this for various reasons, examples:
|
Beta Was this translation helpful? Give feedback.
-
Prerequisites
Description
When converting to the DWAA compression for EXRs, any cropped pixels get filled with white.
Steps to Reproduce
Convert any cropped EXR to a DWAA compression with the following command:
I have attached an image which contains a cropped roto shape (from Nuke), and an image convert with the above command to DWAA compression.
exr_compression.zip
System Configuration
Windows 10
Beta Was this translation helpful? Give feedback.
All reactions