imread fails with unknown datatype for Region option error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

imread fails with unknown datatype for Region option error

henryleinhos
Hi,

I'm using octave 4.2.2 on Ubuntu 18.04, and I am having trouble loading
images using the image package and imread().

I can't seem to read any image format.  I've tried the Ubuntu octave-image
package as well as the latest from octave-forge (2.10.0) and get the same
error:

>> im = imread('mypic.jpg');
error: __magick_read__: unknown datatype for Region option
error: called from
    __imread__ at line 131 column 24
    imageIO at line 117 column 26
    imread at line 106 column 30

I have imagemagick 6.9.7.4 installed (16-bit channel depth version).

Any help would be appreciated.



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: imread fails with unknown datatype for Region option error

Spilskinanke
I am going to bump this thread, I have been having a very similar problem on
Fedora 30, and have no idea how to fix it. Description of the error is
pretty much exact to what the original posted described. Someone please
Help!



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: imread fails with unknown datatype for Region option error

Spilskinanke
In reply to this post by henryleinhos
I found the solution to this error! If you open GNU Octave with the
--traditional argument, this error occurs. I removed the --traditional and
opened Octave normally, and my images now load!

I hope this is a problem that gets fixed in the near future. Very annoying
to have the --traditional argument actually cause problems when importing
matlab code, as my imread worked perfectly fine in matlab and
non-traditional Octave.

Now if only the publish function didn't cause a core dump...



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: imread fails with unknown datatype for Region option error

siko1056
On 11/1/19 1:21 AM, Spilskinanke wrote:

> I found the solution to this error! If you open GNU Octave with the
> --traditional argument, this error occurs. I removed the --traditional and
> opened Octave normally, and my images now load!
>
> I hope this is a problem that gets fixed in the near future. Very annoying
> to have the --traditional argument actually cause problems when importing
> matlab code, as my imread worked perfectly fine in matlab and
> non-traditional Octave.
>
> Now if only the publish function didn't cause a core dump...
>
This bumped thread suffers a lot from missing information.  Please post
a small but meaningful portion of your code, leading to any errors.
This includes any pictures (or similar small ones) you try to load and a
verbose explanation of your Octave (method of installation,
Distribution, snap, flatpak, ...) and used+loaded Octave Forge package
versions (see "ver") and which operating system you are using.  And as
you mention "--traditional", please explain in detail all your
modifications to the standard settings, as well.

Best,
Kai


Reply | Threaded
Open this post in threaded view
|

Re: imread fails with unknown datatype for Region option error

siko1056


On 11/1/19 11:14 AM, Sagarmatha wrote:

>
> On Thu, Oct 31, 2019 at 11:23 PM Kai Torben Ohlhus <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 11/1/19 1:21 AM, Spilskinanke wrote:
>     > I found the solution to this error! If you open GNU Octave with the
>     > --traditional argument, this error occurs. I removed the
>     --traditional and
>     > opened Octave normally, and my images now load!
>     >
>     > I hope this is a problem that gets fixed in the near future. Very
>     annoying
>     > to have the --traditional argument actually cause problems when
>     importing
>     > matlab code, as my imread worked perfectly fine in matlab and
>     > non-traditional Octave.
>     >
>     > Now if only the publish function didn't cause a core dump...
>     >
>     This bumped thread suffers a lot from missing information.  Please post
>     a small but meaningful portion of your code, leading to any errors.
>     This includes any pictures (or similar small ones) you try to load and a
>     verbose explanation of your Octave (method of installation,
>     Distribution, snap, flatpak, ...) and used+loaded Octave Forge package
>     versions (see "ver") and which operating system you are using.  And as
>     you mention "--traditional", please explain in detail all your
>     modifications to the standard settings, as well.
>
>     Best,
>     Kai
>
> The code in question was a simple binding that read
>
> pic_1 = imread("drawing_bw.bmp");
>
> This is what would cause the region error without fail. This would occur
> on any script that ran the function imread, where imread is being
> called, regardless of what came before or after it. I've tested this
> with multiple tiny script files that only contained the imread function.
> Octave version is 4.4.1 and was installed using the dnf package manager;
> sudo dnf install octave
> and I did not install any additional packages with it. The only argument
> I had when opening Octave was --traditional. I'm on Fedora 30 64bit.


Thank you for the detailed answer.  Please keep the mailing list in the
CC, so others may benefit from our conversation as well and answer at
the bottom of the email (bottom-posting [1]) to facilitate our conversation.

Where can I find "drawing_bw.bmp"?  Or do you say it happens with any
possible BMP-file?  The following code works for me using Octave 4.4.1
on openSUSE 15.1 and GraphicsMagick 1.3.29 installed:

  pic_1_name = "w3c_home.bmp";
  pic_1_file = ...
    urlwrite ( ...

"https://www.w3.org/People/mimasa/test/imgformat/img/w3c_home.bmp", ...
      pic_1_name);
  pic_1 = imread(pic_1_file);
  imshow (pic_1);

The original post you refer to was:

> [...] get the same error:
>
> >> im = imread('mypic.jpg');
> error: __magick_read__: unknown datatype for Region option
> error: called from
>    __imread__ at line 131 column 24
>    imageIO at line 117 column 26
>    imread at line 106 column 30
>
> I have imagemagick 6.9.7.4 installed (16-bit channel depth version).

Kai

[1] https://en.wikipedia.org/wiki/Posting_style#Bottom-posting