[erlang-questions] Re: Reading JPEG images in Erlang

Tony Rogvall tony@REDACTED
Tue Aug 3 18:28:42 CEST 2010


Hi!

I have written a JPEG reader in Erlang (for erl_img), but as you noticed it is not yet commited.
It currently only support the basic format but I will see if I can polish it a bit to handle
more types of JPEG's. It's not very fast but I have seen DCT implemented in openCL that can
be handy if one uses the openCL binding (git@REDACTED:tonyrog/cl.git ;-)

/Tony




On 3 aug 2010, at 18.03, Zvi wrote:

> 
> 
> On Aug 3, 5:38 pm, Bob Ippolito <b...@REDACTED> wrote:
>> On Tue, Aug 3, 2010 at 10:59 PM, Zvi <zvi.avra...@REDACTED> wrote:
>>> Hi,
>> 
>>> I trying to parse JPEG file in Erlang. I tried jungerl erl_img
>>> library, it seems to be working for other image formats, but not for
>>> JPEG.
>>> I prefer native Erlang code, but if not available, I would use binding
>>> to some C library.
>>> Any pointers?
>> 
>> Try using a different one, some of the versions of erl_img out there e
>> just broken. I think this is the branch we use internally:http://github.com/emad/erl_img
>> 
>> -bob
> 
> This is the one I using.
> The problem is, unlike for other file formats, like PNG or GIF, it
> doesn't load pixels.
> For example:
> 
> 1> erl_img:load("/home/me/some.jpg").
> {ok,{erl_image,image_jpeg,undefined,
>               "/home/me/some.jpg",undefined,undefined,
>               undefined,undefined,[],undefined,200,200,8,3,1,[],
>               upper_left,undefined,[]}}
> 
> Compare it to PNG:
> 
> 2> erl_img:load("/home/me/some.png").
> {ok,{erl_image,image_png,undefined,
>               "/home/me/some.png",undefined,undefined,
>               undefined,undefined,[],r8g8b8a8,200,200,8,3,1,
>               [{'Physical',{5906,5906,meter}},
>                {'ColorType',6},
>                {'Compression',0},
>                {'Filter',0},
>                {'Interlace',0}],
>               left_to_right,undefined,
>               [{erl_pixmap,0,0,200,200,undefined,r8g8b8a8,...}]}}
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> 



More information about the erlang-questions mailing list