[erlang-questions] mochi/erl_img

Loris Fichera loris.fichera@REDACTED
Mon Mar 5 17:11:57 CET 2012


Hello list,

I was looking for a library able to read (and, possibly, author) images
in various formats and I decided to give erl_img [1] a try.
Apparently, it perfectly suits my needs. Anyway, I'm not able to read
jpeg images, that is:

1> erl_img:load ("/home/loris/shuttle_iss.jpg").
{ok,{erl_image,image_jpeg,undefined,
"/home/loris/shuttle_iss.jpg",undefined,undefined,undefined,
undefined,[],undefined,6048,4032,8,3,1,[],upper_left, undefined,[]}}

As you can see, the last field of the #erl_image record (which,
according to [2] should be the 'pixmap') is set to be the empty list.

Having a look at the code, it seems the 'image_jpeg:read' function,
which should be the responsible for reading the content of the image,
does nothing more than return the empty #erl_image [3].

Am I missing something really basic?
Thanks in advance.

  Loris.

[1] https://github.com/mochi/erl_img
[2] https://github.com/mochi/erl_img/blob/master/include/erl_img.hrl
[3] https://github.com/mochi/erl_img/blob/master/src/image_jpeg.erl#L55



More information about the erlang-questions mailing list