Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to read image in Ada?

270 views
Skip to first unread message

Nahro Nadir

unread,
Oct 3, 2014, 7:46:56 AM10/3/14
to
I'm new in Ada programming language, I want to read and manipulate images in Ada without binding other libraries like opencv. Is there any way to read images in Ada? Or convert it to pixel values (RGB) especially bitmap images.

Anatoly Chernyshev

unread,
Oct 3, 2014, 8:44:47 AM10/3/14
to
On Saturday, October 4, 2014 12:46:56 AM UTC+13, Nahro Nadir wrote:
> I'm new in Ada programming language, I want to read and manipulate images in Ada without binding other libraries like opencv. Is there any way to read images in Ada? Or convert it to pixel values (RGB) especially bitmap images.

For png there's a library, it worked fine for me:
http://sourceforge.net/projects/png-io/
Message has been deleted

Nahro Nadir

unread,
Oct 6, 2014, 3:36:46 AM10/6/14
to
On Saturday, October 4, 2014 10:04:26 PM UTC+2, Dennis Lee Bieber wrote:
> On Fri, 3 Oct 2014 04:46:55 -0700 (PDT), Nahro Nadir <nahr...@gmail.com>
>
> declaimed the following:
>
>
>
> >I'm new in Ada programming language, I want to read and manipulate images in Ada without binding other libraries like opencv. Is there any way to read images in Ada? Or convert it to pixel values (RGB) especially bitmap images.
>
>
>
> Well, technically, they are all just binary files...
>
>
>
> The problem is, each format encodes the data in a different way, and
>
> you'd need to read the specification for those formats and write code that
>
> translates them to whatever you want...
>
>
>
> There is a big difference between a format using RLE vs JPEG vs ILBM.
>
> (The Amiga native graphics were bit-plane oriented, so one had a matrix of
>
> all the least-significant bits, followed by a matrix of next significant
>
> bits, etc. until the most-significant bits; other formats have all bits for
>
> one pixel packed as a single item)
>
>
>
> Or use a library that someone else has already created to do the same
>
> thing <G>
>
>
>
>
>
> --
>
> Wulfraed Dennis Lee Bieber AF6VN
>
> wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Well i couldn't found a library which is written in Ada and i dont want to use binding to other languages because its very slow.

gautier...@hotmail.com

unread,
Oct 6, 2014, 3:48:20 AM10/6/14
to
Le vendredi 3 octobre 2014 13:46:56 UTC+2, Nahro Nadir a écrit :

> I'm new in Ada programming language, I want to read and manipulate images in Ada without binding other libraries like opencv. Is there any way to read images in Ada? Or convert it to pixel values (RGB) especially bitmap images.

Here is what you need:

http://gen-img-dec.sf.net/

Full Ada, standalone, no bindings.
Enjoy!
_________________________
Gautier's Ada programming
http://www.openhub.net/accounts/gautier_bd

Simon Wright

unread,
Oct 6, 2014, 4:30:10 AM10/6/14
to
Nahro Nadir <nahr...@gmail.com> writes:

> Well i couldn't found a library which is written in Ada and i dont
> want to use binding to other languages because its very slow.

I don't see why that has to be true.

I've been lokking at binding EasyBMP[1], which is written in C++; there
are issues, but it's doable. I'll write it up some time (and report the
GNAT bugs I found, too!).

But I think you'll be more interested in Gautier's offering.

[1] http://easybmp.sourceforge.net

Nahro Nadir

unread,
Oct 6, 2014, 8:16:50 AM10/6/14
to
On Monday, October 6, 2014 10:30:10 AM UTC+2, Simon Wright wrote:
> Nahro Nadir <nahr...@gmail.com> writes:
>
>
>
> > Well i couldn't found a library which is written in Ada and i dont
>
> > want to use binding to other languages because its very slow.
>
>
>
> I don't see why that has to be true.
>
> Because im gonna to do some image processing on Gimme2 board and i tested binding opencv wich is a powerful library but it was very slow.
>
> I've been lokking at binding EasyBMP[1], which is written in C++; there
>
> are issues, but it's doable. I'll write it up some time (and report the
>
> GNAT bugs I found, too!).
>
>
>
> But I think you'll be more interested in Gautier's offering.
>
> If wanted to use binding i would prefer opencv.
>
> [1] http://easybmp.sourceforge.net
thnx for your comment.

Nahro Nadir

unread,
Oct 6, 2014, 8:19:40 AM10/6/14
to
Thank you i will try it.
0 new messages