Files
gimp/app/xcf/xcf-write.h
Michael Natterer 5a4d865358 Bug 738329 - xcf_seek_pos() can cause unexpected OS behavior
Change XCF saving to never seek past the end of the partially written
file. The only places where we still did this was when skipping the
offset tables for layers, channels, levels and tiles.

Now we write an all-zero offset table first, and then only seek around
in areas of the file that already exist. This also simplifies the code
a bit. Changed comments to make it clear what happens.
2014-10-17 19:12:05 +02:00

44 lines
1.8 KiB
C

/* GIMP - The GNU 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __XCF_WRITE_H__
#define __XCF_WRITE_H__
guint xcf_write_int32 (GOutputStream *output,
const guint32 *data,
gint count,
GError **error);
guint xcf_write_zero_int32 (GOutputStream *output,
gint count,
GError **error);
guint xcf_write_float (GOutputStream *output,
const gfloat *data,
gint count,
GError **error);
guint xcf_write_int8 (GOutputStream *output,
const guint8 *data,
gint count,
GError **error);
guint xcf_write_string (GOutputStream *output,
gchar **data,
gint count,
GError **error);
#endif /* __XCF_WRITE_H__ */