logic error

[email protected] Fri, 19 Aug 2011 04:09:57 +0000
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <[email protected]>
When attempting to write out an image to disk (using Magick* api, via menu
pulled-up from an image displayed vi [gm display fu.jpg], for example),
if an error occurs (non-writeable directory?), a potentially erroneous
error message is returned:

"Unable to write X image: ..."

The "..." portion is filled with the filename of the *current* image. If
one tries rewriting to a new filename, though (ie: write to "bar.jpg"),
an attempt to write bar.jpg will occur, and an error will be emitted
"Unable to write X image: fu.jpg". It's incorrect and confusing.

The code that performs this begins at line ~5408 in
magick/display.c. Unfortunately, it appears the renaming of the file
is carried out in a separate function, in a clone of the ImageInfo,
and this work will never get back to the scope that emits the error msg.

Without a larger overhaul, do you think skipping the politeness of
returning the (potentially incorrect) filename could be skipped from
the error msg?

-bch

-- 
Brad Harder
Method Logic Digital Consulting
http://methodlogic.net/
http://twitter.com/bcharder


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2