From: Jano <nono@unizar.es>
Subject: Re: BMP/JPG/GIF library in Ada?
Date: Thu, 19 Feb 2004 19:48:49 +0100
Date: 2004-02-19T19:48:49+01:00 [thread overview]
Message-ID: <MPG.1a9f237d4b339fba9896bc@news.able.es> (raw)
In-Reply-To: pOPYb.7617$4o.30081@attbi_s52
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?
next prev parent reply other threads:[~2004-02-19 18:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 20:40 BMP/JPG/GIF library in Ada? Brian Catlin
2004-02-16 21:32 ` Randy Brukardt
2004-02-16 22:59 ` Gautier Write-only
2004-02-17 17:53 ` Brian Catlin
2004-02-18 19:09 ` Jano
2004-02-18 20:20 ` tmoran
2004-02-19 18:48 ` Jano [this message]
2004-02-19 19:43 ` tmoran
2004-02-19 23:50 ` Jano
2004-02-20 20:20 ` Randy Brukardt
2004-02-20 21:10 ` Jeff C,
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox