[erlang-questions] mochi/erl_img
Evan Miller
emmiller@REDACTED
Mon Mar 5 18:20:27 CET 2012
Hi Loris,
Tony Rogvall implemented JPEG read support for erl_img a while back.
I've incorporated it into my branch of erl_img which you can find
here:
https://github.com/evanmiller/erl_img
That branch also includes some basic image manipulation functions
(crop and scale) as well as PNG write support. Hope you find it
helpful.
Evan
On Mon, Mar 5, 2012 at 10:11 AM, Loris Fichera <loris.fichera@REDACTED> wrote:
> 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list