diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-19 03:12:28 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-19 03:12:28 +0000 |
commit | 1fd361a1ea06e44286c213ca1f814f49306fdc43 (patch) | |
tree | 64c8c96cf54d8718847339a403e5e67b922e8c3f /converter/other/fiasco/lib/image.h | |
download | netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.gz netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.xz netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.zip |
Create Subversion repository
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/fiasco/lib/image.h')
-rw-r--r-- | converter/other/fiasco/lib/image.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/converter/other/fiasco/lib/image.h b/converter/other/fiasco/lib/image.h new file mode 100644 index 00000000..958049f6 --- /dev/null +++ b/converter/other/fiasco/lib/image.h @@ -0,0 +1,59 @@ +/* + * image.h + * + * Written by: Ullrich Hafner + * + * This file is part of FIASCO («F»ractal «I»mage «A»nd «S»equence «CO»dec) + * Copyright (C) 1994-2000 Ullrich Hafner <hafner@bigfoot.de> + */ + +/* + * $Date: 2000/10/22 10:43:56 $ + * $Author: hafner $ + * $Revision: 5.3 $ + * $State: Exp $ + */ + +#ifndef _IMAGE_H +#define _IMAGE_H + +#include <stdio.h> +#include "types.h" +#include "fiasco.h" + +typedef enum {FORMAT_4_4_4, FORMAT_4_2_0} format_e; + +typedef struct image +/* + * Image data + */ +{ + char id [7]; + unsigned reference_count; + unsigned width; /* Width of the image */ + unsigned height; /* Height of the image */ + bool_t color; /* Color or grayscale image */ + format_e format; /* Pixel format 4:4:4 or 4:2:0 */ + word_t *pixels [3]; /* Pixels in short format */ +} image_t; + +image_t * +cast_image (fiasco_image_t *image); +image_t * +alloc_image (unsigned width, unsigned height, bool_t color, format_e format); +image_t * +clone_image (image_t *image); +void +free_image (image_t *image); +FILE * +read_pnmheader (const char *image_name, unsigned *width, unsigned *height, + bool_t *color); +image_t * +read_image (const char *image_name); +void +write_image (const char *image_name, const image_t *image); +bool_t +same_image_type (const image_t *img1, const image_t *img2); + +#endif /* not _IMAGE_H */ + |