1 #ifndef __SP_PNG_WRITE_H__
2 #define __SP_PNG_WRITE_H__
4 /*
5 * PNG file format utilities
6 *
7 * Authors:
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 *
10 * Copyright (C) 1999-2002 Lauris Kaplinski
11 *
12 * Released under GNU GPL, read the file 'COPYING' for more information
13 */
15 #include <glib/gtypes.h>
17 int sp_png_write_rgba(gchar const *filename, guchar const *px, int width, int height, double xdpi, double ydpi, int rowstride);
19 int sp_png_write_rgba_striped(gchar const *filename, int width, int height, double xdpi, double ydpi,
20 int (* get_rows) (guchar const **rows, int row, int num_rows, void *data),
21 void *data);
23 /**
24 * Export the given document as a Portable Network Graphics (PNG)
25 * file. Returns FALSE if an error was encountered while writing
26 * the file, TRUE otherwise.
27 */
28 int sp_export_png_file (SPDocument *doc, const gchar *filename,
29 double x0, double y0, double x1, double y1,
30 unsigned int width, unsigned int height, double xdpi, double ydpi,
31 unsigned long bgcolor,
32 unsigned int (*status) (float, void *), void *data, bool force_overwrite = false, GSList *items_only = NULL);
34 #endif