imgwrite/imfinfo fail in octave 3.2.x

View: New views
6 Messages — Rating Filter:   Alert me  

imgwrite/imfinfo fail in octave 3.2.x

by Benjamin Lindner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am building a 3.2.2 mingw32 binary and during testing I get the
following error when calling imwrite.

octave.exe:1> a = uint16([12340,12341,12342]);
octave.exe:2> imwrite("test16.tif", a);
error: `__magick_write__' undefined near line 124 column 7
error: called from:
error:
D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\image\imwrite.m
at line 124, column 7

indeed there is no file __magick_write__.oct, but an __magick_read__.oct.
and the PKG_ADD file contains the line

autoload ("magick_write", "__magick_read__.oct");

but imwrite.m calls a function "__magick_write__".
Interestingly "help magick_write" states the function name to be
"__magick_write__"

 > help magick_write
`magick_write' is a function from the file
D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\libexec\octave\3.2.2\oct\i686-pc-mingw32\__magick_read__.oct

  -- Function File:  __magick_write__(FNAME, FMT, IMG)
  -- Function File:  __magick_write__(FNAME, FMT, IMG, MAP)
      Write images with ImageMagick++.  In general you should not be
      using this function.  Instead you should use `imwrite'.

      See also: imread


So I'm confused as to what to fix. Should it be "__magick_write__" or
"magick_write".

The same goes for "magick_finfo" vs. "__magick_finfo__".
The script imfinfo.m calls "__magick_finfo__", however the PKG_ADD file
only autoloads

autoload ("magick_finfo", "__magick_read__.oct");

so a call to imfinfo also fails.

octave.exe:5> imfinfo('c:\windows\winnt.bmp')
error: `__magick_finfo__' undefined near line 129 column 12
error: called from:
error:
D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\
image\imfinfo.m at line 134, column 5


benjamin

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: imgwrite/imfinfo fail in octave 3.2.x

by Tatsuro MATSUOKA-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

In my case,

GNU Octave, version 3.2.2
 :
octave.exe:1> cd D:\usr\Tatsu\program\Octave\test2
octave.exe:2>  a = uint16([12340,12341,12342]);
octave.exe:3> imwrite("test16.tif", a);
error: Invalid call to imwrite.  Correct usage is:

 -- Function File:  imwrite (IMG, FILENAME, FMT, P1, V1, ...)
 -- Function File:  imwrite (IMG, MAP, FILENAME, FMT, P1, V1, ...)


Additional help for built-in functions and operators is
available in the on-line version of the manual.  Use the command
`doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the help@...
mailing list.
octave.exe:3> imwrite(a,"test16.tif");
octave.exe:4> imread("test16.tif")
octave.exe:5> b=imread("test16.tif")
b =

  12339  12340  12341

I have used graphicsmagick  configured with  --with-quantum-depth=16.

Regards

Tatsuro

--- Benjamin Lindner wrote:

> Hello,
>
> I am building a 3.2.2 mingw32 binary and during testing I get the
> following error when calling imwrite.
>
> octave.exe:1> a = uint16([12340,12341,12342]);
> octave.exe:2> imwrite("test16.tif", a);
> error: `__magick_write__' undefined near line 124 column 7
> error: called from:
> error:
>
D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\image\imwrite.m

>
> at line 124, column 7
>
> indeed there is no file __magick_write__.oct, but an __magick_read__.oct.
> and the PKG_ADD file contains the line
>
> autoload ("magick_write", "__magick_read__.oct");
>
> but imwrite.m calls a function "__magick_write__".
> Interestingly "help magick_write" states the function name to be
> "__magick_write__"
>
>  > help magick_write
> `magick_write' is a function from the file
>
D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\libexec\octave\3.2.2\oct\i686-pc-mingw32\__magick_read__.oct

>
>   -- Function File:  __magick_write__(FNAME, FMT, IMG)
>   -- Function File:  __magick_write__(FNAME, FMT, IMG, MAP)
>       Write images with ImageMagick++.  In general you should not be
>       using this function.  Instead you should use `imwrite'.
>
>       See also: imread
>
>
> So I'm confused as to what to fix. Should it be "__magick_write__" or
> "magick_write".
>
> The same goes for "magick_finfo" vs. "__magick_finfo__".
> The script imfinfo.m calls "__magick_finfo__", however the PKG_ADD file
> only autoloads
>
> autoload ("magick_finfo", "__magick_read__.oct");
>
> so a call to imfinfo also fails.
>
> octave.exe:5> imfinfo('c:\windows\winnt.bmp')
> error: `__magick_finfo__' undefined near line 129 column 12
> error: called from:
> error:
> D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\
> image\imfinfo.m at line 134, column 5
>
>
> benjamin
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>


--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: imgwrite/imfinfo fail in octave 3.2.x

by Benjamin Lindner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tatsuro MATSUOKA wrote:

> Hello
>
> In my case,
>
> GNU Octave, version 3.2.2
>  :
> octave.exe:1> cd D:\usr\Tatsu\program\Octave\test2
> octave.exe:2>  a = uint16([12340,12341,12342]);
> octave.exe:3> imwrite("test16.tif", a);
> error: Invalid call to imwrite.  Correct usage is:
>
>  -- Function File:  imwrite (IMG, FILENAME, FMT, P1, V1, ...)
>  -- Function File:  imwrite (IMG, MAP, FILENAME, FMT, P1, V1, ...)
>

You are of course right, stupid copy-from-console-and-paste-into-emailer
error.

> --- Benjamin Lindner wrote:
>
>> Hello,
>>
>> I am building a 3.2.2 mingw32 binary and during testing I get the
>> following error when calling imwrite.
>>
>> octave.exe:1> a = uint16([12340,12341,12342]);
>> octave.exe:2> imwrite("test16.tif", a);
                  ^^^^^^^^^^^^^^^^^^^^^^^^

this should read of course
octave.exe:2> imwrite(a, "test16.tif");

>> error: `__magick_write__' undefined near line 124 column 7
>> error: called from:
>> error:
>>
> D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\image\imwrite.m
>> at line 124, column 7
>>
>> indeed there is no file __magick_write__.oct, but an __magick_read__.oct.
>> and the PKG_ADD file contains the line
>>
>> autoload ("magick_write", "__magick_read__.oct");
>>
>> but imwrite.m calls a function "__magick_write__".
>> Interestingly "help magick_write" states the function name to be
>> "__magick_write__"
>>
>>  > help magick_write
>> `magick_write' is a function from the file
>>
> D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\libexec\octave\3.2.2\oct\i686-pc-mingw32\__magick_read__.oct
>>   -- Function File:  __magick_write__(FNAME, FMT, IMG)
>>   -- Function File:  __magick_write__(FNAME, FMT, IMG, MAP)
>>       Write images with ImageMagick++.  In general you should not be
>>       using this function.  Instead you should use `imwrite'.
>>
>>       See also: imread
>>
>>
>> So I'm confused as to what to fix. Should it be "__magick_write__" or
>> "magick_write".
>>
>> The same goes for "magick_finfo" vs. "__magick_finfo__".
>> The script imfinfo.m calls "__magick_finfo__", however the PKG_ADD file
>> only autoloads
>>
>> autoload ("magick_finfo", "__magick_read__.oct");
>>
>> so a call to imfinfo also fails.
>>
>> octave.exe:5> imfinfo('c:\windows\winnt.bmp')
>> error: `__magick_finfo__' undefined near line 129 column 12
>> error: called from:
>> error:
>> D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\
>> image\imfinfo.m at line 134, column 5
>>
>>
>> benjamin

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: imgwrite/imfinfo fail in octave 3.2.x

by Benjamin Lindner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Benjamin Lindner wrote:

>>> Hello,
>>>
>>> I am building a 3.2.2 mingw32 binary and during testing I get the
>>> following error when calling imwrite.
>>>
>>> octave.exe:1> a = uint16([12340,12341,12342]);
>>> octave.exe:2> imwrite("test16.tif", a);
>                   ^^^^^^^^^^^^^^^^^^^^^^^^
>
> this should read of course
> octave.exe:2> imwrite(a, "test16.tif");
>
>>> error: `__magick_write__' undefined near line 124 column 7
>>> error: called from:
>>> error:
>>>
>> D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\image\imwrite.m
>>> at line 124, column 7
>>>

The problem is the following changeset
http://hg.tw-math.de/release-3-2-x/rev/44300eb51817
which changes the names of the DLD functions in __magick_read__.cc but
does not appropriately change the function names in the scripts where
they are called.
It changes, however, in imread.m the call to __magick_read__ into a call
to magick_read_internal, which seems wrong.

Now on the development branch, the unintended changes were undone by the
two changesets

http://hg.savannah.gnu.org/hgweb/octave/rev/3ca88e72f0e8
http://hg.savannah.gnu.org/hgweb/octave/rev/5302df15ad76

So these two should also be transplanted to the 3.2.x branch!

benjamin


_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: imgwrite/imfinfo fail in octave 3.2.x

by Jaroslav Hajek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Aug 17, 2009 at 3:10 PM, Benjamin Lindner<lindnerben@...> wrote:

> Benjamin Lindner wrote:
>>>> Hello,
>>>>
>>>> I am building a 3.2.2 mingw32 binary and during testing I get the
>>>> following error when calling imwrite.
>>>>
>>>> octave.exe:1> a = uint16([12340,12341,12342]);
>>>> octave.exe:2> imwrite("test16.tif", a);
>>                   ^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> this should read of course
>> octave.exe:2> imwrite(a, "test16.tif");
>>
>>>> error: `__magick_write__' undefined near line 124 column 7
>>>> error: called from:
>>>> error:
>>>>
>>> D:\build\octave32\3.2.x\msys\opt\octave_mingw32_gcc-4.3.0-dw2\3.2.x-3\share\octave\3.2.2\m\image\imwrite.m
>>>> at line 124, column 7
>>>>
>
> The problem is the following changeset
> http://hg.tw-math.de/release-3-2-x/rev/44300eb51817
> which changes the names of the DLD functions in __magick_read__.cc but
> does not appropriately change the function names in the scripts where
> they are called.
> It changes, however, in imread.m the call to __magick_read__ into a call
> to magick_read_internal, which seems wrong.
>
> Now on the development branch, the unintended changes were undone by the
> two changesets
>
> http://hg.savannah.gnu.org/hgweb/octave/rev/3ca88e72f0e8
> http://hg.savannah.gnu.org/hgweb/octave/rev/5302df15ad76
>
> So these two should also be transplanted to the 3.2.x branch!
>
> benjamin
>

Transplanted. Please CC me when a conclusion like this for 3.2.x is
reached in a message.

thanks

--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave

Re: imgwrite/imfinfo fail in octave 3.2.x

by Benjamin Lindner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>
> Transplanted. Please CC me when a conclusion like this for 3.2.x is
> reached in a message.
>

thanks.
I'll try to remember next time :)

benjamin

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave