Edit detail for img_img revision 1 of 1

1
Editor: 10.1.0.1
Time: 2005/04/10 04:57:09 GMT+0
Note:

changed:
-
by Robin Rowe
10/23/04

img_img is a new image format library to
enable programmers to read and write image file formats easily.

img_img is being developed on Windows but is designed to port easily and will be available on all major
platforms. 

The img_img library uses plug-ins to read/write images to a flat RGB buffer
in memory. img_img includes a command-line tool that will be useful for
doing image format conversions, a bit like ImageMagick's 'convert' tool.
This first release only includes a plug-in for the PPM format (8 and
16-bit), but many more formats are to follow. OpenEXR and JPEG2000 are
expected next.

The fundamental img_img structure that holds images is called ImgData.
<pre>
struct ImgData
{    void* raster;
     unsigned width;
     unsigned height;
     unsigned channels;
     unsigned byte_depth;
     CHANNEL_TYPE channel_type;
};
</pre>
The img_img library moves images between files and this structure. The type
of raster depends on the file being manipulated. img_img can handle 8-bit,
16-bit, and 32-bit rasters.

This release of img_img supports compiled-in use of the library. A future
version will include img_server, a wrapper daemon that will provide rasters
in shared memory and have a socket-based control protocol. Using img_server
will make it possible for multiple applications to manipulate images in
memory. CinePaint and Blender's Verse project intend to use img_img in the
future.

Below is a simple C++ code example of using img_img. For more details see
the source of main.cpp, part of the img_img command-line tool.

<pre>
// initialization:
 ImgImg img_img;
 ImgPluginData plugin_data;
 memset(&plugin_data,0,sizeof(plugin_data));// Important to zero first!
// 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);
</pre>


From unknown Sun Mar 6 14:03:17 -0800 2005
From: 
Date: Sun, 06 Mar 2005 14:03:17 -0800
Subject: 
Message-ID: <20050306140317-0800@cinepaint.bigasterisk.com>



From unknown Sun Apr 10 04:57:09 -0700 2005
From: 
Date: Sun, 10 Apr 2005 04:57:09 -0700
Subject: 
Message-ID: <20050410045709-0700@cinepaint.bigasterisk.com>
In-reply-to: <20050306140317-0800@cinepaint.bigasterisk.com>



by Robin Rowe 10/23/04

img_img is a new image format library to enable programmers to read and write image file formats easily.

img_img is being developed on Windows but is designed to port easily and will be available on all major platforms.

The img_img library uses plug-ins to read/write images to a flat RGB buffer in memory. img_img includes a command-line tool that will be useful for doing image format conversions, a bit like ImageMagick's convert tool. This first release only includes a plug-in for the PPM format (8 and 16-bit), but many more formats are to follow. OpenEXR and JPEG2000 are expected next.

The fundamental img_img structure that holds images is called ImgData.

struct ImgData
{    void* raster;
     unsigned width;
     unsigned height;
     unsigned channels;
     unsigned byte_depth;
     CHANNEL_TYPE channel_type;
};
The img_img library moves images between files and this structure. The type of raster depends on the file being manipulated. img_img can handle 8-bit, 16-bit, and 32-bit rasters.

This release of img_img supports compiled-in use of the library. A future version will include img_server, a wrapper daemon that will provide rasters in shared memory and have a socket-based control protocol. Using img_server will make it possible for multiple applications to manipulate images in memory. CinePaint and Blender's Verse project intend to use img_img in the future.

Below is a simple C++ code example of using img_img. For more details see the source of main.cpp, part of the img_img command-line tool.

// initialization:
 ImgImg img_img;
 ImgPluginData plugin_data;
 memset(&plugin_data,0,sizeof(plugin_data));// Important to zero first!
// 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);


comments:

... -- Sun, 06 Mar 2005 14:03:17 -0800 reply

... -- Sun, 10 Apr 2005 04:57:09 -0700 reply