about summary refs log tree commit diff
path: root/lib/pam.h
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-08-04 02:22:57 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-08-04 02:22:57 +0000
commitbe7a0f83c56b8ebe89f522efc4f0643d4818cd4f (patch)
tree4f1aae8316c4280339356b49a5a4f6d46a088a60 /lib/pam.h
parent0bbc0d23d5ed7bdde9045a784525d141aa98d286 (diff)
downloadnetpbm-mirror-be7a0f83c56b8ebe89f522efc4f0643d4818cd4f.tar.gz
netpbm-mirror-be7a0f83c56b8ebe89f522efc4f0643d4818cd4f.tar.xz
netpbm-mirror-be7a0f83c56b8ebe89f522efc4f0643d4818cd4f.zip
pamcomp: retain opacity information from underlying image
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1526 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/pam.h')
-rw-r--r--lib/pam.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/pam.h b/lib/pam.h
index 4fa478ea..42d1dc75 100644
--- a/lib/pam.h
+++ b/lib/pam.h
@@ -109,6 +109,23 @@ struct pam {
            libnetpbm does not return comments and does not allocate any
            storage.
         */
+    int visual;  /* boolean */
+        /* tuple_type is one of the PAM-defined tuple types for visual
+           images ("GRAYSCALE", "RGB_ALPHA", etc.).
+        */
+    unsigned int color_depth;
+        /* Number of color planes (i.e. 'depth', but without transparency).
+           The color planes are the lowest numbered ones.  Meaningless if
+           'visual' is false.
+        */
+    int have_opacity;   /* boolean */
+        /* The tuples have an opacity (transparency, alpha) plane.
+           Meaningless if 'visual' is false.
+        */
+    unsigned int opacity_plane;
+        /* The plane number of the opacity plane;  meaningless if
+           'haveOpacity' is false or 'visual' is false.
+        */
 };
 
 #define PAM_HAVE_ALLOCATION_DEPTH 1
@@ -275,6 +292,14 @@ pnm_makearrayrgb(const struct pam * const pamP,
                  tuple **           const tuples);
 
 void
+pnm_makerowrgba(const struct pam * const pamP,
+                tuple *            const tuplerow);
+
+void
+pnm_addopacityrow(const struct pam * const pamP,
+                  tuple *            const tuplerow);
+
+void
 pnm_getopacity(const struct pam * const pamP,
                int *              const haveOpacityP,
                unsigned int *     const opacityPlaneP);