WriteBlob Failed

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
aletaziar

WriteBlob Failed

Post by aletaziar »

Trying to convert an image to stdout fails with

Code: Select all

WriteBlog Failed '-' @ error/png.c/PNGErrorHandler/1437
Here's the image.
Here's the command line:

Code: Select all

convert.exe before.png -resize "600x600>" -quality 100 png:- | pngout.exe - after.png /V
Using Windows 7x64 Ultimate with ImageMagick-6.6.2-3-Q16-windows-x64-dll.

Thanks for this program, just discovered it and am overwhelmed with possibilities :D
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: WriteBlob Failed

Post by snibgo »

I don't have pngout, but this works for me, Windows7 64, IM 6.6.0-8:

Code: Select all

convert.exe ..\before.png -resize "600x600>" -quality 100 png:- | convert - after.png
(It's a good idea to reduce the report to the minimum that creates the problem.)
snibgo's IM pages: im.snibgo.com
aletaziar

Re: WriteBlob Failed

Post by aletaziar »

I'm not sure why it's failing for me, but I just split the commands so I no longer use std, and I'm going to work with that. Thanks for testing though.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: WriteBlob Failed

Post by Drarakel »

I'm getting the error, too when using pngout this way (and also 'broken pipe' errors). But I don't think that ImageMagick has any fault here.
If you're interested in why the command was failing, we could ask in the forums for pngout. I have started a bug report.

Edit:
@aletaziar: The command from your first post works now - with the latest pngout. But - as Ken Silverman said - it's really not recommended to use pngout with stdin/stdout.

By the way: If I'm not mistaken, "-quality 100" doesn't make much sense with PNG as output. (It seems that ImageMagick is using quality 90 then.) See PNG compression.
rmicone
Posts: 2
Joined: 2012-08-13T12:34:05-07:00
Authentication code: 67789

Re: WriteBlob Failed

Post by rmicone »

For me, this error was really frustrating me, and in the end after writing an entire program to work around it... this post helped me realize that windows and "FORFILES" was interpreting the hex character sequence that I had accidentally put as my image folder name.

In other words:
convert.exe D:\images3000x3000 ... D:\images3000x3000png

was taking the "0x30" part of that path and mangling it making the path "images300000" (eating the 0x30 part)
I accidentally created a bad folder name!!!
thanks for the nudge in the right direction!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: WriteBlob Failed

Post by fmw42 »

If you put your file names inside double quotes, does that avoid the problem?

convert.exe "D:\images3000x3000" ... "D:\images3000x3000png"
rmicone
Posts: 2
Joined: 2012-08-13T12:34:05-07:00
Authentication code: 67789

Re: WriteBlob Failed

Post by rmicone »

Interestingly enough, no... which is why it was so hard to track down...
here's the original command that was working with other paths, but this path wouldn't work

Code: Select all

FORFILES /P D:\Image_Archive_SuperHiRes_3000x3000_JPGs\_staging\ /S /M *.png /C "cmd /c convert.exe @path -quality 70 -resize 3000 D:\Image_Archive_SuperHiRes_3000x3000_JPGs\_resized\\@file"
I could have tried to use the hex value to try and encode the command, but changing the filepath to not include a 0x character group was an acceptable fix for me
Post Reply