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!news2.google.com!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: A generic image decoder - specification design Date: Sun, 2 May 2010 23:01:12 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <9itrt552ibsvfsp1ijcuej9725ra4kofmu@4ax.com> NNTP-Posting-Host: J4HSNf9Eqj44wTz1J3b8lQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Tom's custom newsreader Xref: g2news2.google.com comp.lang.ada:11298 Date: 2010-05-02T23:01:12+00:00 List-Id: > >I guess it might be more than 255 per fundamental color, but I got > >lost in the docs. > >Perhaps I should let this 255 boundary as a generic parameter as well. > > If it's not just for viewers, but also for photography and graphic arts, > it would be well worth supporting 16-bit per channel colour depths. Generic handling at the pixel level will surely be slower than direct coding that knows what it's operating on, and that will be an issue if there's any significant pixel level processing. CLAW uses tags to distinguish images with different memory layouts, so image processing dispatches to the correct code for the image at hand. Picture : Claw.Bitmaps.Root_DIBitmap_Type'Class := Claw.Bitmaps.Root_DIBitmap_Type'Class'Input(Stream); The different images have arrays of, e.g., for RGB555_Color_Type use record Blue at 0 range 0 .. 4; Green at 0 range 5 .. 9; Red at 0 range 10 .. 14; Alpha at 0 range 15 .. 15; end record; for Triple_Color_Type use record Blue at 0 range 0 .. 7; Green at 1 range 0 .. 7; Red at 2 range 0 .. 7; end record; But is your package aimed more at processing images, or at doing IO on the myriad file formats of images? And how about video?