Debian Codegraph @

src/main/image.c

raw symbols SCIP
1 /*
2 *
3 * Print plug-in driver utility functions for the GIMP.
4 *
5 * Copyright 1997-2000 Michael Sweet ([email protected]) and
6 * Robert Krawitz ([email protected])
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25 #include <gutenprint/gutenprint.h>
26 #include "gutenprint-internal.h"
27
28 void
29 stp_image_init(stp_image_t *image)
30 {
31 if (image->init)
32 image->init(image);
33 }
34
35 void
36 stp_image_reset(stp_image_t *image)
37 {
38 if (image->reset)
39 image->reset(image);
40 }
41
42 int
43 stp_image_width(stp_image_t *image)
44 {
45 return image->width(image);
46 }
47
48 int
49 stp_image_height(stp_image_t *image)
50 {
51 return image->height(image);
52 }
53
54 stp_image_status_t
55 stp_image_get_row(stp_image_t *image, unsigned char *data,
56 size_t byte_limit, int row)
57 {
58 return image->get_row(image, data, byte_limit, row);
59 }
60
61 const char *
62 stp_image_get_appname(stp_image_t *image)
63 {
64 if (image->get_appname)
65 return image->get_appname(image);
66 else
67 return NULL;
68 }
69
70 void
71 stp_image_conclude(stp_image_t *image)
72 {
73 if (image->conclude)
74 image->conclude(image);
75 }