From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e289b5ceae0f39c3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-11 23:37:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!freenix!wanadoo.fr!proxad.net!feeder2-1.proxad.net!news2-1.free.fr!not-for-mail From: "Patrice Freydiere" Subject: Re: Binding to C Date: Tue, 12 Aug 2003 08:40:21 +0200 User-Agent: Pan/0.13.0 (The whole remains beautiful) Message-ID: Newsgroups: comp.lang.ada References: <%VVZa.9764$Kx1.137096@newsfep4-glfd.server.ntli.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Organization: Guest of ProXad - France NNTP-Posting-Date: 12 Aug 2003 08:37:28 MEST NNTP-Posting-Host: 62.147.108.67 X-Trace: 1060670248 news2-1.free.fr 26403 62.147.108.67:32781 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.lang.ada:41333 Date: 2003-08-12T08:37:28+02:00 List-Id: On Tue, 12 Aug 2003 00:49:20 +0100, chris wrote: > Patrice Freydiere wrote: > >> so it can gives you some ideas for C binding from ADA. > > Thanks. > > >> ps: when i started writing the simplejpeglib binding for ADA. >> i had a lot of interfacing problems du to the portability macros of the >> jpeglib. (it's surely possible, but when i've started my binding, my C >> interfacing Skills from ADA was poor). >> So i decided in my design to build a simple C interface to make Ada >> binding easier. This permit me to be "C structure independent" and provide a >> more easy upgrade of the jpeglib. > > This is a problem... and I haven't found a *convienant* way to solve > this (other than wrapping it up as you and Warren pointed out - thanks). > Macros change this, that and the other. My ada code would need to be > changed at the spec level on different platforms, compilers, etc... > yuck. A more experienced Ada developer could probably organise it > better, but > > All I really want to do now is *decode* and encode (at various > qualities) a jpeg (in RBG). Later things might get more complicated, > but for now that's it. I'm going to look at your lib again now I've got > a bit more time. chris, it's difficult to add a quality parameter to SimpleJpegLib. The SimpleJpegLib, gives you the RGB values of an encoded JPEG File. Patrice