about summary refs log tree commit diff
path: root/converter/other/ipdb.h
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-09-25 20:41:29 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-09-25 20:41:29 +0000
commit1511ebe5ed9943e31a66214b720544cdbf515eaa (patch)
treec2c1d586c20d0d20c4a93e3591bc45e1712dbd0b /converter/other/ipdb.h
parent423b5d086c5cdec480bd9fb7d97ed3067d371b14 (diff)
downloadnetpbm-mirror-1511ebe5ed9943e31a66214b720544cdbf515eaa.tar.gz
netpbm-mirror-1511ebe5ed9943e31a66214b720544cdbf515eaa.tar.xz
netpbm-mirror-1511ebe5ed9943e31a66214b720544cdbf515eaa.zip
Get pamtopdbimg, pdbimgtopam working
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1302 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/ipdb.h')
-rw-r--r--converter/other/ipdb.h68
1 files changed, 42 insertions, 26 deletions
diff --git a/converter/other/ipdb.h b/converter/other/ipdb.h
index d00fde1a..6af5fc44 100644
--- a/converter/other/ipdb.h
+++ b/converter/other/ipdb.h
@@ -127,6 +127,7 @@ typedef struct {
      */
     uint8_t  * data;
 } IMAGE;
+
 #define IMAGESIZE   (32 + 1 + 1 + 4 + 4 + 2*2 + 4 + 2*2 + 2*2)
 
 /*
@@ -136,6 +137,10 @@ typedef struct {
 #define IMG_GRAY    ((uint8_t)0)
 #define IMG_MONO    ((uint8_t)0xff)
 
+const char *
+ipdb_typeName(uint8_t const type);
+
+
 /*
  * Compression constants for IMAGE.version.
  */
@@ -160,6 +165,16 @@ typedef struct {
 } IPDB;
 
 /*
+ * Only use four bytes of these.
+ */
+#define IPDB_vIMG   "vIMG"
+#define IPDB_View   "View"
+/*
+ * Only use three bytes of this.
+ */
+#define IPDB_MYST   "\x40\x6f\x80"
+
+/*
  * Flags for ipdb_write().
  */
 #define IPDB_COMPMAYBE  0       /* compress if it does any good */
@@ -185,43 +200,44 @@ typedef struct {
 const char *
 ipdb_err(int error);
 
-int
-ipdb_read(IPDB *, FILE *);
-
-int
-ipdb_write(IPDB *, int, FILE *);
+size_t
+ipdb_img_size(IMAGE * const imgP);
 
-int
-ipdb_insert_g16image(IPDB *, int, int, const uint8_t *);
+unsigned int
+ipdb_img_ppb(IMAGE * const imgP);
 
-int
-ipdb_insert_gimage(IPDB *, int, int, const uint8_t*);
+uint8_t *
+ipdb_img_row(IMAGE *      const imgP,
+             unsigned int const row);
 
-int
-ipdb_insert_mimage(IPDB *, int, int, const uint8_t *);
+void
+ipdb_free(IPDB *);
 
-int
-ipdb_insert_text(IPDB *, const char *);
+IPDB *
+ipdb_alloc(const char *);
 
-int
-ipdb_remove_image(IPDB *);
+void
+ipdb_clear(IPDB * const pdbP);
 
-int
-ipdb_remove_text(IPDB *);
+PDBHEAD *
+ipdb_pdbhead_alloc(const char * const name);
 
-const uint8_t *
-ipdb_g16row(IPDB *, unsigned int, uint8_t *);
+void
+ipdb_pdbhead_free(PDBHEAD * const headP);
 
-const uint8_t *
-ipdb_grow(IPDB *, unsigned int, uint8_t *);
+IMAGE *
+ipdb_image_alloc(const char * const name,
+                 int          const type,
+                 int          const w,
+                 int          const h);
 
-const uint8_t *
-ipdb_mrow(IPDB *, unsigned int, uint8_t *);
+void
+ipdb_image_free(IMAGE * const imgP);
 
 void
-ipdb_free(IPDB *);
+ipdb_text_free(TEXT * const textP);
 
-IPDB *
-ipdb_alloc(const char *);
+TEXT *
+ipdb_text_alloc(const char * const content);
 
 #endif