1
1
/* GIMP - The GNU Image Manipulation Program
2
2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This program is free software; you can redistribute it and/or modify
4
* This program is free software: you can redistribute it and/or modify
5
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
6
* the Free Software Foundation; either version 3 of the License, or
7
7
* (at your option) any later version.
9
9
* This program is distributed in the hope that it will be useful,
12
12
* GNU General Public License for more details.
14
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
18
#include "config.h"
22
#include <string.h> /* strcmp, memcmp */
24
#include <glib-object.h>
26
26
#include "libgimpbase/gimpbase.h"
27
27
#include "libgimpcolor/gimpcolor.h"
37
37
#include "core/gimp.h"
38
38
#include "core/gimpcontainer.h"
39
#include "core/gimpdrawable.h"
39
#include "core/gimpdrawable-private.h" /* eek */
40
40
#include "core/gimpgrid.h"
41
#include "core/gimpgrouplayer.h"
41
42
#include "core/gimpimage.h"
42
43
#include "core/gimpimage-colormap.h"
43
44
#include "core/gimpimage-grid.h"
44
45
#include "core/gimpimage-guides.h"
46
#include "core/gimpimage-private.h"
45
47
#include "core/gimpimage-sample-points.h"
46
#include "core/gimplayer.h"
48
#include "core/gimpimage-undo.h"
49
#include "core/gimpitemstack.h"
47
50
#include "core/gimplayer-floating-sel.h"
48
51
#include "core/gimplayermask.h"
49
52
#include "core/gimpparasitelist.h"
50
53
#include "core/gimpprogress.h"
51
54
#include "core/gimpselection.h"
52
55
#include "core/gimptemplate.h"
53
#include "core/gimpunit.h"
55
57
#include "text/gimptextlayer.h"
56
58
#include "text/gimptextlayer-xcf.h"
72
74
/* #define GIMP_XCF_PATH_DEBUG */
76
static void xcf_load_add_masks (GimpImage *image);
74
77
static gboolean xcf_load_image_props (XcfInfo *info,
76
79
static gboolean xcf_load_layer_props (XcfInfo *info,
79
83
gboolean *apply_mask,
80
84
gboolean *edit_mask,
81
85
gboolean *show_mask,
82
guint32 *text_layer_flags);
86
guint32 *text_layer_flags,
87
guint32 *group_layer_flags);
83
88
static gboolean xcf_load_channel_props (XcfInfo *info,
85
90
GimpChannel **channel);
87
92
PropType *prop_type,
88
93
guint32 *prop_size);
89
94
static GimpLayer * xcf_load_layer (XcfInfo *info,
91
97
static GimpChannel * xcf_load_channel (XcfInfo *info,
93
99
static GimpLayerMask * xcf_load_layer_mask (XcfInfo *info,
162
gimp_parasite_list_remove (GIMP_IMAGE (image)->parasites,
169
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
171
gimp_parasite_list_remove (private->parasites,
163
172
gimp_parasite_name (parasite));
165
174
gimp_image_set_grid (GIMP_IMAGE (image), grid, FALSE);
201
213
/* add the layer to the image if its not the floating selection */
202
214
if (layer != info->floating_sel)
203
gimp_image_add_layer (image, layer,
204
gimp_container_num_children (image->layers));
216
GimpContainer *layers = gimp_image_get_layers (image);
217
GimpContainer *container;
222
if (info->floating_sel)
224
/* there is a floating selection, but it will get
225
* added after all layers are loaded, so toplevel
226
* layer indices are off-by-one. Adjust item paths
231
toplevel_index = GPOINTER_TO_UINT (item_path->data);
235
item_path->data = GUINT_TO_POINTER (toplevel_index);
239
(gimp_item_stack_get_parent_by_path (GIMP_ITEM_STACK (layers),
243
container = gimp_viewable_get_children (GIMP_VIEWABLE (parent));
245
g_list_free (item_path);
253
gimp_image_add_layer (image, layer,
255
gimp_container_get_n_children (container),
206
259
/* restore the saved position so we'll be ready to
207
260
* read the next offset.
230
285
if (! xcf_seek_pos (info, offset, NULL))
233
/* read in the layer */
288
/* read in the channel */
234
289
channel = xcf_load_channel (info, image);
242
297
/* add the channel to the image if its not the selection */
243
298
if (channel != gimp_image_get_mask (image))
244
299
gimp_image_add_channel (image, channel,
245
gimp_container_num_children (image->channels));
300
NULL, /* FIXME tree */
301
gimp_container_get_n_children (gimp_image_get_channels (image)),
247
304
/* restore the saved position so we'll be ready to
248
305
* read the next offset.
273
332
if (num_successful_elements == 0)
276
gimp_message (gimp, G_OBJECT (info->progress), GIMP_MESSAGE_WARNING,
277
_("This XCF file is corrupt! I have loaded as much "
278
"of it as I can, but it is incomplete."));
335
gimp_message_literal (gimp, G_OBJECT (info->progress), GIMP_MESSAGE_WARNING,
336
_("This XCF file is corrupt! I have loaded as much "
337
"of it as I can, but it is incomplete."));
339
xcf_load_add_masks (image);
280
341
gimp_image_undo_enable (image);
285
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
286
_("This XCF file is corrupt! I could not even "
287
"salvage any partial image data from it."));
346
g_set_error_literal (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
347
_("This XCF file is corrupt! I could not even "
348
"salvage any partial image data from it."));
289
350
g_object_unref (image);
356
xcf_load_add_masks (GimpImage *image)
361
layers = gimp_image_get_layer_list (image);
363
for (list = layers; list; list = g_list_next (list))
365
GimpLayer *layer = list->data;
368
mask = g_object_get_data (G_OBJECT (layer), "gimp-layer-mask");
372
gimp_layer_add_mask (layer, mask, FALSE, NULL);
374
g_object_set_data (G_OBJECT (layer), "gimp-layer-mask", NULL);
378
g_list_free (layers);
295
382
xcf_load_image_props (XcfInfo *info,
296
383
GimpImage *image)
316
403
info->cp += xcf_read_int32 (info->fp, &n_colors, 1);
405
if (n_colors > (GIMP_IMAGE_COLORMAP_SIZE / 3))
407
gimp_message (info->gimp, G_OBJECT (info->progress),
409
"Maximum colormap size (%d) exceeded",
410
GIMP_IMAGE_COLORMAP_SIZE);
318
414
if (info->file_version == 0)
322
gimp_message (info->gimp, G_OBJECT (info->progress),
323
GIMP_MESSAGE_WARNING,
324
_("XCF warning: version 0 of XCF file format\n"
325
"did not save indexed colormaps correctly.\n"
326
"Substituting grayscale map."));
418
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
419
GIMP_MESSAGE_WARNING,
420
_("XCF warning: version 0 of XCF file format\n"
421
"did not save indexed colormaps correctly.\n"
422
"Substituting grayscale map."));
328
424
if (! xcf_seek_pos (info, info->cp + n_colors, NULL))
403
gimp_message (info->gimp, G_OBJECT (info->progress),
404
GIMP_MESSAGE_WARNING,
405
"Guide orientation out of range in XCF file");
500
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
501
GIMP_MESSAGE_WARNING,
502
"Guide orientation out of range in XCF file");
410
507
/* this is silly as the order of guides doesn't really matter,
411
* but it restores the list to it's original order, which
508
* but it restores the list to its original order, which
412
509
* cannot be wrong --Mitch
414
image->guides = g_list_reverse (image->guides);
511
private->guides = g_list_reverse (private->guides);
441
538
if (xres < GIMP_MIN_RESOLUTION || xres > GIMP_MAX_RESOLUTION ||
442
539
yres < GIMP_MIN_RESOLUTION || yres > GIMP_MAX_RESOLUTION)
444
gimp_message (info->gimp, G_OBJECT (info->progress),
445
GIMP_MESSAGE_WARNING,
446
"Warning, resolution out of range in XCF file");
447
xres = image->gimp->config->default_image->xresolution;
448
yres = image->gimp->config->default_image->yresolution;
541
GimpTemplate *template = image->gimp->config->default_image;
543
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
544
GIMP_MESSAGE_WARNING,
545
"Warning, resolution out of range in XCF file");
546
xres = gimp_template_get_resolution_x (template);
547
yres = gimp_template_get_resolution_y (template);
451
550
gimp_image_set_resolution (image, xres, yres);
473
572
if (info->cp - base != prop_size)
474
gimp_message (info->gimp, G_OBJECT (info->progress),
475
GIMP_MESSAGE_WARNING,
476
"Error while loading an image's parasites");
573
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
574
GIMP_MESSAGE_WARNING,
575
"Error while loading an image's parasites");
484
583
info->cp += xcf_read_int32 (info->fp, &unit, 1);
486
585
if ((unit <= GIMP_UNIT_PIXEL) ||
487
(unit >= _gimp_unit_get_number_of_built_in_units (image->gimp)))
586
(unit >= gimp_unit_get_number_of_built_in_units ()))
489
gimp_message (info->gimp, G_OBJECT (info->progress),
490
GIMP_MESSAGE_WARNING,
491
"Warning, unit out of range in XCF file, "
492
"falling back to inches");
588
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
589
GIMP_MESSAGE_WARNING,
590
"Warning, unit out of range in XCF file, "
591
"falling back to inches");
493
592
unit = GIMP_UNIT_INCH;
496
image->resolution_unit = unit;
595
gimp_image_set_unit (image, unit);
518
617
if (unit_strings[i] == NULL)
519
618
unit_strings[i] = g_strdup ("");
521
num_units = _gimp_unit_get_number_of_units (image->gimp);
620
num_units = gimp_unit_get_number_of_units ();
523
for (unit = _gimp_unit_get_number_of_built_in_units (image->gimp);
622
for (unit = gimp_unit_get_number_of_built_in_units ();
524
623
unit < num_units; unit++)
526
625
/* if the factor and the identifier match some unit
527
626
* in unitrc, use the unitrc unit
529
if ((ABS (_gimp_unit_get_factor (image->gimp,
530
unit) - factor) < 1e-5) &&
628
if ((ABS (gimp_unit_get_factor (unit) - factor) < 1e-5) &&
531
629
(strcmp (unit_strings[0],
532
_gimp_unit_get_identifier (image->gimp,
630
gimp_unit_get_identifier (unit)) == 0))
540
637
if (unit == num_units)
541
unit = _gimp_unit_new (image->gimp,
638
unit = gimp_unit_new (unit_strings[0],
550
image->resolution_unit = unit;
646
gimp_image_set_unit (image, unit);
552
648
for (i = 0; i < 5; i++)
553
649
g_free (unit_strings[i]);
583
679
g_printerr ("unexpected/unknown image property: %d (skipping)\n",
587
gsize size = prop_size;
596
amount = MIN (16, size);
597
info->cp += xcf_read_int8 (info->fp, buf, amount);
598
size -= MIN (16, amount);
682
if (! xcf_skip_unknown_prop (info, prop_size))
609
xcf_load_layer_props (XcfInfo *info,
612
gboolean *apply_mask,
615
guint32 *text_layer_flags)
692
xcf_load_layer_props (XcfInfo *info,
696
gboolean *apply_mask,
699
guint32 *text_layer_flags,
700
guint32 *group_layer_flags)
617
702
PropType prop_type;
618
703
guint32 prop_size;
630
715
case PROP_ACTIVE_LAYER:
631
info->active_layer = layer;
716
info->active_layer = *layer;
634
719
case PROP_FLOATING_SELECTION:
635
info->floating_sel = layer;
720
info->floating_sel = *layer;
637
722
xcf_read_int32 (info->fp,
638
723
(guint32 *) &info->floating_sel_offset, 1);
645
730
info->cp += xcf_read_int32 (info->fp, &opacity, 1);
646
gimp_layer_set_opacity (layer, (gdouble) opacity / 255.0, FALSE);
731
gimp_layer_set_opacity (*layer, (gdouble) opacity / 255.0, FALSE);
652
737
gboolean visible;
654
739
info->cp += xcf_read_int32 (info->fp, (guint32 *) &visible, 1);
655
gimp_item_set_visible (GIMP_ITEM (layer), visible, FALSE);
740
gimp_item_set_visible (GIMP_ITEM (*layer), visible, FALSE);
663
748
info->cp += xcf_read_int32 (info->fp, (guint32 *) &linked, 1);
664
gimp_item_set_linked (GIMP_ITEM (layer), linked, FALSE);
749
gimp_item_set_linked (GIMP_ITEM (*layer), linked, FALSE);
753
case PROP_LOCK_CONTENT:
755
gboolean lock_content;
757
info->cp += xcf_read_int32 (info->fp, (guint32 *) &lock_content, 1);
759
if (gimp_item_can_lock_content (GIMP_ITEM (*layer)))
760
gimp_item_set_lock_content (GIMP_ITEM (*layer),
761
lock_content, FALSE);
670
767
gboolean lock_alpha;
672
769
info->cp += xcf_read_int32 (info->fp, (guint32 *) &lock_alpha, 1);
673
gimp_layer_set_lock_alpha (layer, lock_alpha, FALSE);
771
if (gimp_layer_can_lock_alpha (*layer))
772
gimp_layer_set_lock_alpha (*layer, lock_alpha, FALSE);
689
788
case PROP_OFFSETS:
691
xcf_read_int32 (info->fp,
692
(guint32 *) &GIMP_ITEM (layer)->offset_x, 1);
694
xcf_read_int32 (info->fp,
695
(guint32 *) &GIMP_ITEM (layer)->offset_y, 1);
793
info->cp += xcf_read_int32 (info->fp, &offset_x, 1);
794
info->cp += xcf_read_int32 (info->fp, &offset_y, 1);
796
gimp_item_set_offset (GIMP_ITEM (*layer), offset_x, offset_y);
702
804
info->cp += xcf_read_int32 (info->fp, &mode, 1);
703
gimp_layer_set_mode (layer, (GimpLayerModeEffects) mode, FALSE);
805
gimp_layer_set_mode (*layer, (GimpLayerModeEffects) mode, FALSE);
709
811
GimpTattoo tattoo;
711
813
info->cp += xcf_read_int32 (info->fp, (guint32 *) &tattoo, 1);
712
gimp_item_set_tattoo (GIMP_ITEM (layer), tattoo);
814
gimp_item_set_tattoo (GIMP_ITEM (*layer), tattoo);
721
823
while (info->cp - base < prop_size)
723
825
p = xcf_load_parasite (info);
724
gimp_item_parasite_attach (GIMP_ITEM (layer), p);
826
gimp_item_parasite_attach (GIMP_ITEM (*layer), p, FALSE);
725
827
gimp_parasite_free (p);
728
830
if (info->cp - base != prop_size)
729
gimp_message (info->gimp, G_OBJECT (info->progress),
730
GIMP_MESSAGE_WARNING,
731
"Error while loading a layer's parasites");
831
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
832
GIMP_MESSAGE_WARNING,
833
"Error while loading a layer's parasites");
736
838
info->cp += xcf_read_int32 (info->fp, text_layer_flags, 1);
841
case PROP_GROUP_ITEM:
845
group = gimp_group_layer_new (image);
847
gimp_object_set_name (GIMP_OBJECT (group),
848
gimp_object_get_name (*layer));
850
GIMP_DRAWABLE (group)->private->type =
851
gimp_drawable_type (GIMP_DRAWABLE (*layer));
853
g_object_ref_sink (*layer);
854
g_object_unref (*layer);
861
glong base = info->cp;
864
while (info->cp - base < prop_size)
868
info->cp += xcf_read_int32 (info->fp, &index, 1);
870
path = g_list_append (path, GUINT_TO_POINTER (index));
877
case PROP_GROUP_ITEM_FLAGS:
878
info->cp += xcf_read_int32 (info->fp, group_layer_flags, 1);
740
882
#ifdef GIMP_UNSTABLE
741
883
g_printerr ("unexpected/unknown layer property: %d (skipping)\n",
745
gsize size = prop_size;
754
amount = MIN (16, size);
755
info->cp += xcf_read_int8 (info->fp, buf, amount);
756
size -= MIN (16, amount);
886
if (! xcf_skip_unknown_prop (info, prop_size))
788
917
case PROP_SELECTION:
919
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
792
922
g_object_unref (gimp_image_get_mask (image));
794
mask = image->selection_mask =
924
mask = private->selection_mask =
795
925
gimp_selection_new (image,
796
gimp_item_width (GIMP_ITEM (*channel)),
797
gimp_item_height (GIMP_ITEM (*channel)));
926
gimp_item_get_width (GIMP_ITEM (*channel)),
927
gimp_item_get_height (GIMP_ITEM (*channel)));
798
928
g_object_ref_sink (mask);
800
tile_manager_unref (GIMP_DRAWABLE (mask)->tiles);
801
GIMP_DRAWABLE (mask)->tiles =
802
GIMP_DRAWABLE (*channel)->tiles;
803
GIMP_DRAWABLE (*channel)->tiles = NULL;
930
tile_manager_unref (GIMP_DRAWABLE (mask)->private->tiles);
931
GIMP_DRAWABLE (mask)->private->tiles =
932
GIMP_DRAWABLE (*channel)->private->tiles;
933
GIMP_DRAWABLE (*channel)->private->tiles = NULL;
804
934
g_object_unref (*channel);
806
936
(*channel)->boundary_known = FALSE;
970
case PROP_LOCK_CONTENT:
972
gboolean lock_content;
974
info->cp += xcf_read_int32 (info->fp, (guint32 *) &lock_content, 1);
975
gimp_item_set_lock_content (GIMP_ITEM (*channel),
976
lock_content ? TRUE : FALSE, FALSE);
840
980
case PROP_SHOW_MASKED:
842
982
gboolean show_masked;
872
1012
while ((info->cp - base) < prop_size)
874
1014
p = xcf_load_parasite (info);
875
gimp_item_parasite_attach (GIMP_ITEM (*channel), p);
1015
gimp_item_parasite_attach (GIMP_ITEM (*channel), p, FALSE);
876
1016
gimp_parasite_free (p);
879
1019
if (info->cp - base != prop_size)
880
gimp_message (info->gimp, G_OBJECT (info->progress),
881
GIMP_MESSAGE_WARNING,
882
"Error while loading a channel's parasites");
1020
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
1021
GIMP_MESSAGE_WARNING,
1022
"Error while loading a channel's parasites");
888
1028
g_printerr ("unexpected/unknown channel property: %d (skipping)\n",
892
gsize size = prop_size;
901
amount = MIN (16, size);
902
info->cp += xcf_read_int8 (info->fp, buf, amount);
903
size -= MIN (16, amount);
1031
if (! xcf_skip_unknown_prop (info, prop_size))
969
1098
/* read in the layer properties */
970
if (! xcf_load_layer_props (info, image, layer,
1099
if (! xcf_load_layer_props (info, image, &layer, item_path,
971
1100
&apply_mask, &edit_mask, &show_mask,
1101
&text_layer_flags, &group_layer_flags))
975
1104
xcf_progress_update (info);
993
1122
info->cp += xcf_read_int32 (info->fp, &hierarchy_offset, 1);
994
1123
info->cp += xcf_read_int32 (info->fp, &layer_mask_offset, 1);
996
/* read in the hierarchy */
997
if (! xcf_seek_pos (info, hierarchy_offset, NULL))
1000
if (! xcf_load_hierarchy (info,
1001
gimp_drawable_get_tiles (GIMP_DRAWABLE (layer))))
1004
xcf_progress_update (info);
1125
/* read in the hierarchy (ignore it for group layers, both as an
1126
* optimization and because the hierarchy's extents don't match
1127
* the group layer's tiles)
1129
if (! gimp_viewable_get_children (GIMP_VIEWABLE (layer)))
1131
if (! xcf_seek_pos (info, hierarchy_offset, NULL))
1134
if (! xcf_load_hierarchy (info,
1135
gimp_drawable_get_tiles (GIMP_DRAWABLE (layer))))
1138
xcf_progress_update (info);
1142
gboolean expanded = group_layer_flags & XCF_GROUP_ITEM_EXPANDED;
1144
gimp_viewable_set_expanded (GIMP_VIEWABLE (layer), expanded);
1006
1147
/* read in the layer mask */
1007
1148
if (layer_mask_offset != 0)
1019
1160
gimp_layer_mask_set_edit (layer_mask, edit_mask);
1020
1161
gimp_layer_mask_set_show (layer_mask, show_mask, FALSE);
1022
gimp_layer_add_mask (layer, layer_mask, FALSE, NULL);
1163
/* don't add the layer mask yet, that won't work for group
1164
* layers which update their size automatically; instead
1165
* attach it so it can be added when all layers are loaded
1167
g_object_set_data_full (G_OBJECT (layer), "gimp-layer-mask",
1168
g_object_ref_sink (layer_mask),
1169
(GDestroyNotify) g_object_unref);
1025
1172
/* attach the floating selection... */
1252
1399
if (offset == 0)
1254
gimp_message (info->gimp, G_OBJECT (info->progress),
1256
"not enough tiles found in level");
1401
gimp_message_literal (info->gimp, G_OBJECT (info->progress),
1403
"not enough tiles found in level");
1527
1673
while (num_paths-- > 0)
1528
1674
xcf_load_old_path (info, image);
1530
active_vectors = (GimpVectors *)
1531
gimp_container_get_child_by_index (image->vectors, last_selected_row);
1677
GIMP_VECTORS (gimp_container_get_child_by_index (gimp_image_get_vectors (image),
1678
last_selected_row));
1533
1680
if (active_vectors)
1534
1681
gimp_image_set_active_vectors (image, active_vectors);
1625
1775
gimp_item_set_tattoo (GIMP_ITEM (vectors), tattoo);
1627
1777
gimp_image_add_vectors (image, vectors,
1628
gimp_container_num_children (image->vectors));
1778
NULL, /* can't be a tree */
1779
gimp_container_get_n_children (gimp_image_get_vectors (image)),
1638
1790
guint32 active_index;
1639
1791
guint32 num_paths;
1640
1792
GimpVectors *active_vectors;
1643
1794
#ifdef GIMP_XCF_PATH_DEBUG
1644
1795
g_printerr ("xcf_load_vectors\n");
1649
1798
info->cp += xcf_read_int32 (info->fp, &version, 1);
1651
1800
if (version != 1)
1667
1816
if (! xcf_load_vector (info, image))
1670
active_vectors = (GimpVectors *)
1671
gimp_container_get_child_by_index (image->vectors, active_index);
1821
GIMP_VECTORS (gimp_container_get_child_by_index (gimp_image_get_vectors (image),
1673
1824
if (active_vectors)
1674
1825
gimp_image_set_active_vectors (image, active_vectors);
1712
1863
vectors = gimp_vectors_new (image, name);
1714
1866
gimp_item_set_visible (GIMP_ITEM (vectors), visible, FALSE);
1715
1867
gimp_item_set_linked (GIMP_ITEM (vectors), linked, FALSE);
1724
1876
if (! parasite)
1727
gimp_item_parasite_attach (GIMP_ITEM (vectors), parasite);
1879
gimp_item_parasite_attach (GIMP_ITEM (vectors), parasite, FALSE);
1728
1880
gimp_parasite_free (parasite);
1735
1887
guint32 num_axes;
1736
1888
guint32 num_control_points;
1738
gfloat coords[7] = GIMP_COORDS_DEFAULT_VALUES;
1890
gfloat coords[8] = GIMP_COORDS_DEFAULT_VALUES;
1739
1891
GimpStroke *stroke;
1742
1894
GValueArray *control_points;
1743
1895
GValue value = { 0, };
1896
GimpAnchor anchor = { { 0, } };
1745
1897
GType stroke_type;
1747
1899
g_value_init (&value, GIMP_TYPE_ANCHOR);
1813
1965
gimp_vectors_stroke_add (vectors, stroke);
1967
g_object_unref (stroke);
1968
g_value_array_free (control_points);
1816
1971
gimp_image_add_vectors (image, vectors,
1817
gimp_container_num_children (image->vectors));
1972
NULL, /* FIXME tree */
1973
gimp_container_get_n_children (gimp_image_get_vectors (image)),
1980
xcf_skip_unknown_prop (XcfInfo *info,
1988
if (feof (info->fp))
1991
amount = MIN (16, size);
1992
info->cp += xcf_read_int8 (info->fp, buf, amount);
1993
size -= MIN (16, amount);