here's an improvement suggested from the following out of
SIP/Scilab-4.2 that you may want to consider.
Due to a simple "non-existence" of the image file stored in foo.png,
imfinfo() (and I suspect imread(), &c.) return this ugly error messge:
-->info = imfinfo("foo.png");
imfinfo: !--error 999
scilex: magick/image.c:1647: GetImageException: Assertion `image != (Image *) ((void *)0)' failed.
Process Scilab aborted
It would be nicer, I suppose, if imfinfo() returned something like
foo.png: file not found
and then returned instead.