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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.178.130 with SMTP id q124mr3237768ywh.103.1477602518642; Thu, 27 Oct 2016 14:08:38 -0700 (PDT) X-Received: by 10.157.33.166 with SMTP id s35mr1475100otb.10.1477602518603; Thu, 27 Oct 2016 14:08:38 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!z54no75523qtz.0!news-out.google.com!z32ni2107qtc.1!nntp.google.com!z54no75521qtz.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 27 Oct 2016 14:08:38 -0700 (PDT) In-Reply-To: <197b234f-c0e8-4b30-931e-0f97e8718168@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.218.37.33; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.218.37.33 References: <197b234f-c0e8-4b30-931e-0f97e8718168@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Scanner library Ada binding? From: Stephen Leake Injection-Date: Thu, 27 Oct 2016 21:08:38 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:32184 Date: 2016-10-27T14:08:38-07:00 List-Id: On Sunday, September 18, 2016 at 3:25:58 PM UTC-5, Stephen Leake wrote: > I'm scanning all the liner notes from my CDs (several hundred). ... > Does anyone have an Ada binding to the Windows TWAIN interface? I'm on 64= bit=20 > Windows 8.1, GNAT GPL 2016 (32 bit). I ended up implementing a Windows Metro app, starting from a scanner sample= app provided with Microsoft Visual Studio. It was a frustrating experience. The sample code uses C++ syntax that I cou= ld not find definitions for (I think "^" is some variant of pointer). The M= icrosoft code documentation makes the Google Android docs look wonderful :(= . There appear to be at least 2 separate sets of code; those for a Metro ap= p (called "the Windows Runtime") and those for a Desktop app (not clear wha= t that runtime is called). And no way to limit searches to one or the other= ! The low-level scan routines only return .BMP files. The only example code I= could find that would convert that to JPEG was for the Desktop runtime (th= e scan example is for the Metro runtime). I already have some Desktop Ada c= ode that incorporates the JPEG files into a PDF via latex, so I added more = Ada code to call ImageMagick 'convert' via GNAT.OS_Lib. It works, and it will save time, but what a pain!