octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ImageMagick error during 'make check'


From: Carnë Draug
Subject: Re: ImageMagick error during 'make check'
Date: Mon, 5 Aug 2013 19:01:31 +0100

On 5 August 2013 18:53, Rik <address@hidden> wrote:
> On 08/05/2013 05:11 AM, Carnė Draug wrote:
>> On 4 August 2013 23:02, Rik <address@hidden> wrote:
>>> 8/4/13
>>>
>>> Carnė,
>>>
>>> I'm getting this nasty looking error while running 'make check'
>>>
>>>>>>>> processing
>>>>>>>> /home/rik/wip/Projects_Mine/octave-dev/scripts/plot/ishghandle.m
>>>   ***** test
>>>  hf = figure ("visible", "off");
>>>  unwind_protect
>>>    assert (ishghandle (hf));
>>>    assert (! ishghandle (-hf));
>>>    l = line;
>>>    ax = gca;
>>>    assert (ishghandle (ax));
>>>    assert (! ishghandle (-ax));
>>>    assert (ishghandle (l));
>>>    assert (! ishghandle (-l));
>>>    p = patch;
>>>    assert (ishghandle (p));
>>>    assert (! ishghandle (-p));
>>>    s = surface;
>>>    assert (ishghandle (s));
>>>    assert (! ishghandle (-s));
>>>    t = text;
>>>    assert (ishghandle (t));
>>>    assert (! ishghandle (-t));
>>>    i = image;
>>>    assert (ishghandle (i));
>>>    assert (! ishghandle (-i));
>>>    hg = hggroup;
>>>    assert (ishghandle (hg));
>>>    assert (! ishghandle (-hg));
>>>  unwind_protect_cleanup
>>>    close (hf);
>>>  end_unwind_protect
>>> !!!!! test failed
>>> Magick++ exception: Magick: No decode delegate for this image format
>>> (/home/rik/wip/Projects_Mine/octave-dev/scripts/image/default.img) reported
>>> by magick/constitute.c:8285 (ReadImage)
>>>
>>> The problem is the line "i = image" which I think needs to create a default
>>> image object, possibly with no data as the text () command does.
>>>
>>> The backtrace is
>>> octave:4> i = image
>>> error: Magick++ exception: Magick: No decode delegate for this image format
>>> (/home/rik/wip/Projects_Mine/octave-dev/scripts/image/default.img) reported
>>> by magick/constitute.c:8285 (ReadImage)
>>> error: called from:
>>> error:
>>> /home/rik/wip/Projects_Mine/octave-dev/scripts/image/private/__imfinfo__.m
>>> at line 63, column 10
>>> error:
>>> /home/rik/wip/Projects_Mine/octave-dev/scripts/image/private/imageIO.m at
>>> line 64, column 26
>>> error:   /home/rik/wip/Projects_Mine/octave-dev/scripts/image/imfinfo.m at
>>> line 123, column 8
>>> error:
>>> /home/rik/wip/Projects_Mine/octave-dev/scripts/image/private/__imread__.m at
>>> line 59, column 8
>>> error:
>>> /home/rik/wip/Projects_Mine/octave-dev/scripts/image/private/imageIO.m at
>>> line 64, column 26
>>> error:   /home/rik/wip/Projects_Mine/octave-dev/scripts/image/imread.m at
>>> line 102, column 24
>>> error:   /home/rik/wip/Projects_Mine/octave-dev/scripts/image/image.m at
>>> line 65, column 9
>>>
>>> Could you take a look at this?
>> The problem comes from default.img being an example of the native
>> octave image format that I have recently asked to deprecate. The part
>> that tries to read the image is around a try catch so it tries the
>> native format if it fails. However, I have been adding a bunch of
>> function options and need to call imfinfo to set defaults. I will
>> place that entire block of code in a try catch but then the test will
>> still issue a warning about the format being deprecated.
>>
>> If we wish to maintain the default.img as it is, and image()
>> displaying it as default image, then the best solution is to use the
>> following on line 65 (the line using imread with default.img) of image
>> function:
>>
>> img = load (file_in_path (IMAGE_PATH, "default.img")).X;
>>
>> Should I make this change?
> 8/5/13
>
> Carnė,
>
> I'm bringing this on to the Maintainer's list.
>
> What should the default behavior be if you call image() with no arguments?
> Does Matlab automatically invent an image?  Or does it create an image with
> no data?
>
> It seems like the sensible thing would be to either warn that the function
> was called incorrectly or to create a null image object in the same way
> that text() will create a valid text object, but with the string set to "".

This is an easter egg in both Octave and Matlab. Depending on the
version Matlab shows a different image that has some history behind
it, in some cases related to people who donates more [1].

What I would do would be to either change the format of default.img,
or stop treating default.img as an image file.

Carnë

[1] 
http://blogs.mathworks.com/steve/2006/10/17/the-story-behind-the-matlab-default-image/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]