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