
2002-04-16 Michael Natterer <mitch@gimp.org> * app/base/temp-buf.c: fixed temp_buf_copy() and temp_buf_to_[color|gray]() to (1) not crash and (2) to assume the correct pixelformat. Bugs were never noticed because the code was never used until today... * app/core/gimpviewable.c (gimp_viewable_get_new_preview_pixbuf): use temp_buf_copy() to convert GRAY* TempBufs to RGB* before creating the pixbuf. * app/app_procs.c: don't try to open command line images if the filename could not be converted to an URI. * app/file/file-open.c * app/file/file-save.c: use g_file_test() instead of stat(). * app/file/file-utils.[ch]: cleanup, changed file_utils_filename_to_uri() to take a list of procs, not a Gimp pointer. * app/core/gimpimage.c: changed accordingly. * app/core/gimpimagefile.[ch]: implemented thumbnail saving following the thumbnail standard v0.5 (the implementation is not yet fully standard compliant). * app/gui/file-open-dialog.c: use the new thubmnail functions and removed all .xvpics code. Not finished yet... * app/core/gimpdocuments.c * app/widgets/gimpdocumentview.c: changed accordingly. * tools/pdbgen/pdb/fileops.pdb (file_save_thumbnail): set "success" correctly. * app/pdb/fileops_cmds.c: regenerated.
48 lines
1.8 KiB
C
48 lines
1.8 KiB
C
/* The GIMP -- an image manipulation program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* This program 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.
|
|
*
|
|
* This program 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.
|
|
*/
|
|
|
|
#ifndef __FILE_UTILS_H__
|
|
#define __FILE_UTILS_H__
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
gchar * file_utils_filename_to_uri (GSList *procs,
|
|
const gchar *filename,
|
|
GError **error);
|
|
PlugInProcDef * file_utils_find_proc (GSList *procs,
|
|
const gchar *filename);
|
|
gchar * file_utils_uri_to_utf8_basename (const gchar *uri);
|
|
gchar * file_utils_uri_to_utf8_filename (const gchar *uri);
|
|
|
|
|
|
/* .xvpics thumbnail stuff */
|
|
|
|
TempBuf * make_thumb_tempbuf (GimpImage *gimage);
|
|
guchar * readXVThumb (const gchar *fnam,
|
|
gint *w,
|
|
gint *h,
|
|
gchar **imginfo /* caller frees if != NULL */);
|
|
gboolean file_save_thumbnail (GimpImage *gimage,
|
|
const char *full_source_filename,
|
|
TempBuf *tempbuf);
|
|
|
|
|
|
#endif /* __FILE_UTILS_H__ */
|