Can't output png

69 views
Skip to first unread message

Agachee

unread,
Jul 4, 2024, 8:03:55 AMJul 4
to gaffer-dev
I am trying to merge 2 images (tif and exr) and output them as png with the ImageWriter node, but I get an error. It creates the file on the disk but it's corrupted and empty. It worked fine before with exr + exr / hdr + exr, I think it might be the tif format that's doing something here (maybe I'm wrong). I can output them as jpg tho. Any ideas what to do?

ERROR   [Errors Occurred During Dispatch] Gaffer.ProcessException: Process_LgtTex.ConvertPNG.task : Could not open "/library/lgt/lgtTex/lgtTex00072/preview/00072_preview.01.png", error = PNG write error: profile 'Embedded Profile': 1h: too short
PNG write error: No IDATs written into file
Could not set PNG iCCP chunk

John Haddon

unread,
Jul 4, 2024, 11:41:28 AMJul 4
to gaffe...@googlegroups.com
Sounds like a bug, either in Gaffer's ImageWriter or in the underlying libraries (OIIO/PNG). Best thing to do would be to find a way we can reproduce it at our end. Can you share the images with us?
Cheers...
John

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/f9be85de-0fc7-4cde-8d11-f72c23d794ddn%40googlegroups.com.
Message has been deleted

Agachee

unread,
Jul 8, 2024, 7:45:25 PMJul 8
to gaffer-dev
Hey John, I couldn't upload it here for some reason it said the message was too long... But I managed to send it directly to you (I think). Can you confirm?

John Haddon

unread,
Jul 9, 2024, 5:58:58 AMJul 9
to gaffe...@googlegroups.com
On Tue, Jul 9, 2024 at 12:45 AM Agachee <angel...@gmail.com> wrote:
Hey John, I couldn't upload it here for some reason it said the message was too long... But I managed to send it directly to you (I think). Can you confirm?

Yes, I have received the test data thanks. It turns out this was actually a bug in the ImageReader - it was corrupting the ICCProfile metadata on loading, causing the ImageWriter to fail when trying to write that data to PNG. I've fixed it here :


In the meantime, you should be able to work around the problem using the DeleteImageMetadata node to delete the ICCProfile metadata before writing the image.

Cheers...
John

 
Reply all
Reply to author
Forward
0 new messages