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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,50b378dbbc6317de X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 24 May 2010 15:51:30 -0500 From: Stephen Sangwine Newsgroups: comp.lang.ada Date: Mon, 24 May 2010 21:51:30 +0100 Message-ID: <2010052421513016807-sjs@essexacuk> References: <0fe40ae3-7582-424c-9b72-9d6d0cb351e2@y36g2000yqm.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: A generic image decoder - specification design User-Agent: Unison/1.8.1 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-piaD43tdmv07RWquEwKIgDaBLOMcVwtRX2M3T6c3Ab5kCEoV09YvFnHiVwhj6o4ov0Hb8iLiOCig4c2!ouU1Jx+Vh6qfXIsMN+HrQZWV3ftMMpo//aAI6C1eal2NXrUMU7IHsy/dtfiE/Ba9AUk= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Xref: g2news2.google.com comp.lang.ada:11935 Date: 2010-05-24T21:51:30+01:00 List-Id: On 2010-05-01 18:03:18 +0100, Gautier write-only said: > Hello, > I've just started a generic image decoder package project. > You can read the specification here: > http://gen-img-dec.svn.sourceforge.net/viewvc/gen-img-dec/gid.ads?revision=1&view=markup Before > > going on with the implementation, I would be glad to get any > comment on it. > From typos, naming, to possible performance considerations related to > generics, or image formats, or what else ?... > TIA > ______________________________________________________________ > Gautier's Ada programming -- http://gautiersblog.blogspot.com/ > NB: For a direct answer, e-mail address on the following web site: > http://www.fechtenafz.ethz.ch/wm_email.htm Interesting idea. What you are proposing looks to me like a sort of binding to various image libraries, in that you provide basic image reading/writing to a variety of formats. Of course, you can't handle all the special features of each image format, but for an application that just needs to read or write the pixels and a few other basics like palettes, alpha etc, the approach would be useful. I can speak from experience of developing PNG_IO to say that handling any non-trivial format is not a small task. BMP is pretty easy - TIFF is probably the hardest to handle. In both PNG and TIFF the pixel data is stored in disparate pieces within the file - not as a single block of pixel data. In the case of PNG the compression runs across these blocks, not within each block. What this means is that code for handling the pixel data can't easily be common to different types of image file. You have available an Ada package for PNG already in PNG_IO. I've thought about GIF as a student project now that the compression is no longer subject to patent protection, but no work has been done on it yet. Steve Sangwine