From be7a0f83c56b8ebe89f522efc4f0643d4818cd4f Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 4 Aug 2011 02:22:57 +0000 Subject: 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 --- lib/pam.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib/pam.h') 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 @@ -274,6 +291,14 @@ void 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, -- cgit 1.4.1