[Verse-dev] img_img 0.1 release

Thorsten Jordan Thorsten_Jordan at gmx.de
Sun Oct 24 10:49:10 CEST 2004


Robin Rowe schrieb:
> This is the first 0.1 release of img_img, a new image format library to
> enable programmers to read and write image file formats easily.


> // initialization:
>  ImgImg img_img;
>  ImgPluginData plugin_data;
>  memset(&plugin_data,0,sizeof(plugin_data));// Important to zero first!
just a short note here: why not let the constructor of that class do 
that? just because M$/Win does this memset everywhere, it needn't to be 
a good idea.

> // specify file to read and plug-in to use:
>  plugin_data.filename = "test8.ppm";
>  plugin_data.libname = "img_ppm";
> // read the file into an RGB buffer:
>  bool ok = img_img.Read(plugin_data);
> // expose the raw RGB buffer:
>  ImgData& img_data=img_img.GetImgData();
>  ... do whatever you want to the flat RGB raster in memory ...
> // write this 8-bit raster as a 16-bit ppm:
>  plugin_data.filename = "test16.ppm";
>  plugin_data.write_options = "bits=16";
>  ok = img_img.Write(plugin_data);
why this is on the verse list? has it a verse binding?

-- 
Bis demnaechst, Thorsten


More information about the Verse-dev mailing list