/* * save.c -- save loaded image * (C)Copyright 1998, 99 by Hiroshi Takekawa * This file is part of Enfle. * * Last Modified: Thu Sep 16 03:37:42 1999. * $Id: save.c,v 1.9 1999/09/18 18:35:47 sian Exp $ * * Enfle is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Enfle is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #include "enfle.h" #include "dlist.h" #include "plugin.h" int save_image(char *format, Info *info, Image *p, char *outfile) { Dlist_data *t; for (t = dlist_gettop(info->pluginlist); t != NULL; t = t->next) { PluginInfo *pinfo = t->data; if (pinfo->type == _Saver && (!strcmp(pinfo->pluginshortname, format))) return (*pinfo->functions.saver.save_image)(info, p, outfile); } fprintf(stderr, "%s saver plugin not found\n", format); return 0; }