[erlang-questions] mochi/erl_img

nx <>
Mon Mar 5 21:51:23 CET 2012


You may also want to check out erl_gm, which is an Erlang wrapper for the GraphicsMagick command line application:

https://github.com/nuex/erl_gm

It supports getting all image characteristics defined in GraphicsMagick "format" option and currently has a few image manipulation options like crop, resize, magnify, blur and more.

On Mon, 5 Mar 2012 11:20:27 -0600
Evan Miller <> wrote:

> 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 <> 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
> > 
> > http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions


-- 
nx <>



More information about the erlang-questions mailing list