From: Gautier write-only on 1 May 2010 16:30 Here is already a tiny update: http://gen-img-dec.svn.sf.net/viewvc/gen-img-dec/gid.ads?view=markup&pathrev=2 I've discovered the possibility of an Inline pragma to a procedure listed in a generic formal part. At least GNAT and ObjectAda don't protest on that, so probably it makes some sense... G.
From: Andre on 2 May 2010 05:19 Gautier, The first question which comes up in mind is: where do you want to use it for? Is it an initial step for your Ada based browser? The 2nd question is more basic, are you write the load image functions in Ada or use bindings to existing libraries (like the JPEG one)? Basically all pixel based images are a block of memory. The one which are 8 bit based use normally a Palette (like GIF and 8-bit BMP). The full color versions (JPEG, 24-bit BMP) use 3 or 4 byte per pixel (4th one is in general the alpha channel) in a memory map. So that can easily be modeled. If it is for a browser, you can forget about the 1-, 2- and 4-bit images. So how will be your real image data be modeled? Do you plan to just use a 24-bit with alpha channel format and convert lower grade images (like GIF) into this format? Or do you want to represent the different image types also in you data model? just some feedback, Andr� On 5/1/2010 22:30, Gautier write-only wrote: > Here is already a tiny update: > > http://gen-img-dec.svn.sf.net/viewvc/gen-img-dec/gid.ads?view=markup&pathrev=2 > > I've discovered the possibility of an Inline pragma to a procedure > listed in a generic formal part. At least GNAT and ObjectAda don't > protest on that, so probably it makes some sense... > > G.
From: brian on 2 May 2010 07:45 On May 2, 1:03 am, Gautier write-only <gautier_niou...(a)hotmail.com> wrote: > 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?rev... > 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 ?... Have you thought about supporting the FITS (http:// fits.gsfc.nasa.gov/) format? -Brian
From: Gautier write-only on 2 May 2010 11:09 On May 2, 11:19 am, Andre <avsa...(a)hotmail.com> wrote: > The first question which comes up in mind is: where do you want to use > it for? > Is it an initial step for your Ada based browser? Many things, from image manipulation without display, loading of textures for GL (there it would replace the "input" part of the GL.IO provided with GLOBE_3D), display into a rectangle of a GUI system and an in-memory cache (good guess: for a browser :-) ),... > The 2nd question is more basic, are you write the load image functions > in Ada or use bindings to existing libraries (like the JPEG one)? The whole would be in Ada. The code already exists for GIF, BMP, TGA, in different places. The decompression for PNG can be taken from UnZip.Decompress. JPEG is a bit trickier. There are "Pascal" sources that could be used, perhaps. > Basically all pixel based images are a block of memory. The one which > are 8 bit based use normally a Palette (like GIF and 8-bit BMP). The > full color versions (JPEG, 24-bit BMP) use 3 or 4 byte per pixel (4th > one is in general the alpha channel) in a memory map. So that can easily > be modeled. > If it is for a browser, you can forget about the 1-, 2- and 4-bit images. > > So how will be your real image data be modeled? > Do you plan to just use a 24-bit with alpha channel format and convert > lower grade images (like GIF) into this format? > Or do you want to represent the different image types also in you data > model? The color model is 24-bit. Palettes will be decoded. The transparent pixels in GIF will have alpha=Opacity_range'First and the others will have Opacity_range'Last. All the rest (basically, the choice of the memory model, and what to do with transparency) is left to the user. For instance GL.IO will keep its model: a data buffer, which is sent to GL via Insert_into_GL. But decoded pixels might be even directly sent to a "screen" or a GUI object if it makes sense (e.g when decoding an interlaced PNG to a visible image on a Web page), without any Ada storage of the image. > just some feedback, > André Thanks for it! Gautier
From: Gautier write-only on 2 May 2010 11:15 On May 2, 1:45 pm, brian <brian.cat...(a)gmail.com> wrote: > Have you thought about supporting the FITS (http://fits.gsfc.nasa.gov/) format? Until now, not, but I've of course added it to the [wish] list of formats. Thanks! Gautier
|
Next
|
Last
Pages: 1 2 3 Prev: Language Revision : "/" and "div" Next: gnat-ajis-2009 jvm2ada missing packages? |