1 /* LIBGIMP - The GIMP Library
2  * Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball
3  *
4  * gimplimits.h
5  * Copyright (C) 1999 Michael Natterer <mitschel@cs.tu-berlin.de>
6  *
7  * This library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 3 of the License, or (at your option) any later version.
11  *
12  * This library 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 GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library.  If not, see
19  * <https://www.gnu.org/licenses/>.
20  */
21 
22 #if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
23 #error "Only <libgimpbase/gimpbase.h> can be included directly."
24 #endif
25 
26 #ifndef __GIMP_LIMITS_H__
27 #define __GIMP_LIMITS_H__
28 
29 G_BEGIN_DECLS
30 
31 
32 /**
33  * SECTION: gimplimits
34  * @title: gimplimits
35  * @short_description: Boundaries of some GIMP data types and some
36  *                     global constants.
37  *
38  * Boundaries of some GIMP data types and some global constants.
39  **/
40 
41 
42 /**
43  * GIMP_MIN_IMAGE_SIZE:
44  *
45  * The minimum width and height of a GIMP image in pixels.
46  **/
47 #define GIMP_MIN_IMAGE_SIZE  1
48 
49 /**
50  * GIMP_MAX_IMAGE_SIZE:
51  *
52  * The maximum width and height of a GIMP image in pixels. This is a
53  * somewhat arbitrary value that can be used when an upper value for
54  * pixel sizes is needed; for example to give a spin button an upper
55  * limit.
56  **/
57 #define GIMP_MAX_IMAGE_SIZE  524288    /*  2^19  */
58 
59 
60 /**
61  * GIMP_MIN_RESOLUTION:
62  *
63  * The minimum resolution of a GIMP image in pixels per inch. This is
64  * a somewhat arbitrary value that can be used when a lower value for a
65  * resolution is needed. GIMP will not accept resolutions smaller than
66  * this value.
67  **/
68 #define GIMP_MIN_RESOLUTION  5e-3      /*  shouldn't display as 0.000  */
69 
70 /**
71  * GIMP_MAX_RESOLUTION:
72  *
73  * The maximum resolution of a GIMP image in pixels per inch. This is
74  * a somewhat arbitrary value that can be used to when an upper value
75  * for a resolution is needed. GIMP will not accept resolutions larger
76  * than this value.
77  **/
78 #define GIMP_MAX_RESOLUTION  1048576.0
79 
80 
81 /**
82  * GIMP_MAX_MEMSIZE:
83  *
84  * A large but arbitrary value that can be used when an upper limit
85  * for a memory size (in bytes) is needed. It is smaller than
86  * %G_MAXDOUBLE since the #GimpMemsizeEntry doesn't handle larger
87  * values.
88  **/
89 #define GIMP_MAX_MEMSIZE     ((guint64) 1 << 42) /*  4 terabyte;
90                                                   *  needs a 64bit variable
91                                                   *  and must be < G_MAXDOUBLE
92                                                   */
93 
94 
95 G_END_DECLS
96 
97 #endif /* __GIMP_LIMITS_H__ */
98