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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b17b79e9bf0269ea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-19 10:49:21 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.algonet.se!algonet!news.tele.dk!news.tele.dk!small.news.tele.dk!news2.telebyte.nl!teleglobe.net!teleglobe.net!62.81.31.29.MISMATCH!cyclone.auna.com!twister.auna.com!53ab2750!not-for-mail From: Jano Newsgroups: comp.lang.ada Subject: Re: BMP/JPG/GIF library in Ada? Message-ID: References: X-Newsreader: MicroPlanet Gravity v2.50 Date: Thu, 19 Feb 2004 19:48:49 +0100 NNTP-Posting-Host: 212.97.171.15 X-Trace: twister.auna.com 1077216560 212.97.171.15 (Thu, 19 Feb 2004 19:49:20 MET) NNTP-Posting-Date: Thu, 19 Feb 2004 19:49:20 MET Organization: AUNA TLC Xref: archiver1.google.com comp.lang.ada:5669 Date: 2004-02-19T19:48:49+01:00 List-Id: tmoran@acm.org dice... > >I'm working in a simple package which allows to trivially create an in- > >memory 24bpp uncompressed BMP and convert it to a Stream_Element_Array. > Like this, or different? > type Triple_DIBitmap_Type (Height, Width : Claw.Int) is ... > > procedure Triple_DIBitmap_Type_Output ( > Stream : access Ada.Streams.Root_Stream_Type'class; > Item : in Triple_DIBitmap_Type); > for Triple_DIBitmap_Type'Write use Triple_DIBitmap_Type_Write; Similar. I've chosen a constrained representation inheriting from Controlled. Besides I wanted to use the Build function of AWS which takes an array, so I have a function which returns the Stream_Element_Array with the data. ------------------------------------------------------------------------ -- Create -- ------------------------------------------------------------------------ procedure Create ( This : out Object; Width : in Positive; Height : in Positive); ------------------------------------------------------------------------ -- Get_stream -- ------------------------------------------------------------------------ -- Returns a valid BMP representation (not the pixel matrix). function Get_stream (This : in Object) return Ada.Streams.Stream_element_array; The function I'm using from AWS is function Build (Content_Type : in String; Message_Body : in Streams.Stream_Element_Array; Status_Code : in Messages.Status_Code := Messages.S200; Cache_Control : in Messages.Cache_Option := Messages.Unspecified) return Data; Claw is Windows specific, it isn't?