1 /* separate+ 0.5 - image processing plug-in for the Gimp
2  *
3  * Copyright (C) 2002-2004 Alastair Robinson (blackfive@fakenhamweb.co.uk),
4  * Based on code by Andrew Kieschnick and Peter Kirchgessner
5  * 2007-2010 Modified by Yoshinori Yamakawa (yamma-ma@users.sourceforge.jp)
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef SEPARATE_UTIL_H
23 #define SEPARATE_UTIL_H
24 
25 enum separate_channel {sep_C,sep_M,sep_Y,sep_K};
26 
27 gboolean separate_is_CMYK (gint32 image_id);
28 
29 char *separate_filename_change_extension (char  *root,
30                                           char  *newext);
31 char *separate_filename_add_suffix       (char  *root,
32                                           char  *suffix);
33 gint separate_path_get_extention_offset  (gchar *filename);
34 
35 gint32 separate_create_RGB            (gchar    *filename,
36                                        guint     width,
37                                        guint     height,
38                                        gboolean  has_alpha,
39                                        gint32   *layers);
40 gint32 separate_create_planes_grey    (gchar    *filename,
41                                        guint     width,
42                                        guint     height,
43                                        gint32   *layers);
44 gint32 separate_create_planes_CMYK    (gchar    *filename,
45                                        guint     width,
46                                        guint     height,
47                                        gint32   *layers,
48                                        guchar   *primaries);
49 gint32 separate_create_planes_Duotone (gchar    *filename,
50                                        guint     width,
51                                        guint     height,
52                                        gint32   *layers);
53 
54 void separate_init_settings  (SeparateContext        *sc,
55                               enum separate_function  func,
56                               gboolean                get_last_values);
57 void separate_store_settings (SeparateContext        *sc,
58                               enum separate_function  func);
59 
60 GimpDrawable *separate_find_channel (gint32                image_id,
61                                      enum separate_channel channel);
62 GimpDrawable *separate_find_alpha   (gint32                image_id);
63 
64 #endif
65