summaryrefslogtreecommitdiff
path: root/include/fitz/pixmap.h
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2004-10-26 10:24:06 +0200
committerTor Andersson <tor@ghostscript.com>2004-10-26 10:24:06 +0200
commit49a070da0310ee57cb332e80275f19155bc2c479 (patch)
tree7826c0c2a1b62917cc0fcd1e47f43d11d99c7105 /include/fitz/pixmap.h
parent531800e0723dee005d4912cdc6ca12466ca8f18a (diff)
downloadmupdf-49a070da0310ee57cb332e80275f19155bc2c479.tar.xz
clean up pixmap and image code
Diffstat (limited to 'include/fitz/pixmap.h')
-rw-r--r--include/fitz/pixmap.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/fitz/pixmap.h b/include/fitz/pixmap.h
index 7b8bfb1e..508a304b 100644
--- a/include/fitz/pixmap.h
+++ b/include/fitz/pixmap.h
@@ -1,19 +1,25 @@
+/*
+pixmaps have n components per pixel. the first is always alpha.
+premultiplied alpha when rendering, but non-premultiplied for colorspace
+conversions and rescaling.
+*/
+
typedef struct fz_pixmap_s fz_pixmap;
+typedef unsigned char fz_sample;
struct fz_pixmap_s
{
- fz_colorspace *cs;
- int x, y, w, h;
- int n, a;
- int stride;
- unsigned char *samples;
+ int x, y, w, h, n;
+ fz_sample *samples;
};
-fz_error *fz_newpixmap(fz_pixmap **mapp, fz_colorspace *cs, int x, int y, int w, int h, int n, int a);
+fz_error *fz_newpixmap(fz_pixmap **mapp, int x, int y, int w, int h, int n);
void fz_debugpixmap(fz_pixmap *map);
-void fz_freepixmap(fz_pixmap *map);
void fz_clearpixmap(fz_pixmap *map);
-void fz_convertpixmap(fz_pixmap *src, fz_pixmap *dst);
+void fz_freepixmap(fz_pixmap *map);
+
+fz_error *fz_convertpixmap(fz_pixmap **dstp, fz_pixmap *src, fz_colorspace *srcs, fz_colorspace *dsts);
+fz_error *fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom);
void fz_blendover(fz_pixmap *src, fz_pixmap *dst);
void fz_blendmask(fz_pixmap *dst, fz_pixmap *color, fz_pixmap *shape);