2006-12-09 21:33:38 +00:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2004-10-23 16:42:37 +00:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-17 22:28:01 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2004-10-23 16:42:37 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 22:28:01 +00:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2004-10-23 16:42:37 +00:00
|
|
|
* (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
|
2018-07-11 23:27:07 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2004-10-23 16:42:37 +00:00
|
|
|
*/
|
|
|
|
|
2025-07-13 03:15:46 +02:00
|
|
|
#pragma once
|
2004-10-23 16:42:37 +00:00
|
|
|
|
|
|
|
|
2016-09-23 19:44:11 +02:00
|
|
|
typedef void (* GimpMergeLayersCallback) (GtkWidget *dialog,
|
|
|
|
GimpImage *image,
|
|
|
|
GimpContext *context,
|
|
|
|
GimpMergeType merge_type,
|
|
|
|
gboolean merge_active_group,
|
app: merge layers in chunks, and show progress
In gimp_image_merge_layers() -- the internal function used by the
various layer-merging/flattenning functions -- process the merged-
layer graph in chunks, using gimp_gegl_apply_operation(), instead
of in one go, using gegl_node_blit_buffer(). Processing in chunks
better utilizes the cache, since it reduces the size of
intermediate buffers, reducing the chances of hitting the swap when
merging large images (see, for example, issue #3012.)
Additionally, this allows us to show progress indication. Have the
relevant gimpimage-merge functions take a GimpProgress, and pass it
down to gimp_image_merge_layers(). Adapt all callers.
2019-02-25 04:49:04 -05:00
|
|
|
gboolean discard_invisible,
|
|
|
|
gpointer user_data);
|
2016-09-23 19:44:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
image_merge_layers_dialog_new (GimpImage *image,
|
|
|
|
GimpContext *context,
|
|
|
|
GtkWidget *parent,
|
|
|
|
GimpMergeType merge_type,
|
|
|
|
gboolean merge_active_group,
|
|
|
|
gboolean discard_invisible,
|
|
|
|
GimpMergeLayersCallback callback,
|
|
|
|
gpointer user_data);
|