@img/sharp-libvips-dev 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +2 -2
  2. package/cplusplus/VConnection.cpp +54 -54
  3. package/cplusplus/VError.cpp +20 -18
  4. package/cplusplus/VImage.cpp +636 -589
  5. package/cplusplus/VInterpolate.cpp +22 -22
  6. package/cplusplus/VRegion.cpp +4 -4
  7. package/cplusplus/vips-operators.cpp +2326 -2301
  8. package/include/aom/aom_codec.h +10 -6
  9. package/include/aom/aom_decoder.h +1 -1
  10. package/include/aom/aom_encoder.h +9 -2
  11. package/include/aom/aomcx.h +72 -3
  12. package/include/cairo/cairo-ft.h +1 -1
  13. package/include/cairo/cairo-gobject.h +8 -0
  14. package/include/cairo/cairo-svg.h +3 -3
  15. package/include/cairo/cairo-version.h +2 -2
  16. package/include/cairo/cairo.h +91 -24
  17. package/include/harfbuzz/hb-version.h +2 -2
  18. package/include/hwy/aligned_allocator.h +211 -0
  19. package/include/hwy/base.h +1517 -0
  20. package/include/hwy/cache_control.h +108 -0
  21. package/include/hwy/detect_compiler_arch.h +281 -0
  22. package/include/hwy/detect_targets.h +644 -0
  23. package/include/hwy/foreach_target.h +340 -0
  24. package/include/hwy/highway.h +435 -0
  25. package/include/hwy/highway_export.h +74 -0
  26. package/include/hwy/nanobenchmark.h +171 -0
  27. package/include/hwy/ops/arm_neon-inl.h +8913 -0
  28. package/include/hwy/ops/arm_sve-inl.h +5105 -0
  29. package/include/hwy/ops/emu128-inl.h +2811 -0
  30. package/include/hwy/ops/generic_ops-inl.h +4745 -0
  31. package/include/hwy/ops/ppc_vsx-inl.h +5716 -0
  32. package/include/hwy/ops/rvv-inl.h +5070 -0
  33. package/include/hwy/ops/scalar-inl.h +1995 -0
  34. package/include/hwy/ops/set_macros-inl.h +578 -0
  35. package/include/hwy/ops/shared-inl.h +539 -0
  36. package/include/hwy/ops/tuple-inl.h +125 -0
  37. package/include/hwy/ops/wasm_128-inl.h +5917 -0
  38. package/include/hwy/ops/x86_128-inl.h +11173 -0
  39. package/include/hwy/ops/x86_256-inl.h +7529 -0
  40. package/include/hwy/ops/x86_512-inl.h +6849 -0
  41. package/include/hwy/per_target.h +44 -0
  42. package/include/hwy/print-inl.h +62 -0
  43. package/include/hwy/print.h +75 -0
  44. package/include/hwy/robust_statistics.h +148 -0
  45. package/include/hwy/targets.h +338 -0
  46. package/include/hwy/timer-inl.h +200 -0
  47. package/include/hwy/timer.h +55 -0
  48. package/include/jconfig.h +2 -2
  49. package/include/jpeglib.h +3 -2
  50. package/include/libheif/heif.h +443 -377
  51. package/include/libheif/heif_cxx.h +4 -1
  52. package/include/libheif/heif_plugin.h +1 -1
  53. package/include/libheif/heif_properties.h +138 -0
  54. package/include/libheif/heif_regions.h +866 -0
  55. package/include/libheif/heif_version.h +3 -3
  56. package/include/vips/VConnection8.h +43 -49
  57. package/include/vips/VError8.h +27 -24
  58. package/include/vips/VImage8.h +4861 -4597
  59. package/include/vips/VInterpolate8.h +24 -27
  60. package/include/vips/VRegion8.h +32 -33
  61. package/include/vips/arithmetic.h +169 -169
  62. package/include/vips/basic.h +33 -33
  63. package/include/vips/buf.h +56 -54
  64. package/include/vips/colour.h +95 -95
  65. package/include/vips/connection.h +190 -193
  66. package/include/vips/conversion.h +91 -91
  67. package/include/vips/convolution.h +36 -30
  68. package/include/vips/create.h +63 -63
  69. package/include/vips/dbuf.h +35 -37
  70. package/include/vips/debug.h +65 -33
  71. package/include/vips/draw.h +41 -41
  72. package/include/vips/enumtypes.h +54 -51
  73. package/include/vips/error.h +63 -63
  74. package/include/vips/foreign.h +263 -223
  75. package/include/vips/format.h +48 -48
  76. package/include/vips/freqfilt.h +22 -22
  77. package/include/vips/gate.h +55 -47
  78. package/include/vips/generate.h +34 -34
  79. package/include/vips/header.h +111 -101
  80. package/include/vips/histogram.h +28 -28
  81. package/include/vips/image.h +213 -213
  82. package/include/vips/interpolate.h +40 -41
  83. package/include/vips/memory.h +61 -52
  84. package/include/vips/morphology.h +24 -24
  85. package/include/vips/mosaicing.h +32 -33
  86. package/include/vips/object.h +371 -357
  87. package/include/vips/operation.h +68 -67
  88. package/include/vips/private.h +76 -76
  89. package/include/vips/rect.h +26 -26
  90. package/include/vips/region.h +92 -92
  91. package/include/vips/resample.h +38 -38
  92. package/include/vips/sbuf.h +53 -54
  93. package/include/vips/semaphore.h +24 -24
  94. package/include/vips/thread.h +30 -27
  95. package/include/vips/threadpool.h +48 -49
  96. package/include/vips/transform.h +39 -39
  97. package/include/vips/type.h +90 -85
  98. package/include/vips/util.h +274 -229
  99. package/include/vips/vector.h +24 -144
  100. package/include/vips/version.h +9 -9
  101. package/include/vips/vips.h +41 -40
  102. package/package.json +1 -1
  103. package/versions.json +7 -7
@@ -8,28 +8,28 @@
8
8
 
9
9
  /*
10
10
 
11
- This file is part of VIPS.
11
+ This file is part of VIPS.
12
12
 
13
- VIPS is free software; you can redistribute it and/or modify
14
- it under the terms of the GNU Lesser General Public License as published by
15
- the Free Software Foundation; either version 2 of the License, or
16
- (at your option) any later version.
13
+ VIPS is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU Lesser General Public License as published by
15
+ the Free Software Foundation; either version 2 of the License, or
16
+ (at your option) any later version.
17
17
 
18
- This program is distributed in the hope that it will be useful,
19
- but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- GNU Lesser General Public License for more details.
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU Lesser General Public License for more details.
22
22
 
23
- You should have received a copy of the GNU Lesser General Public License
24
- along with this program; if not, write to the Free Software
25
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26
- 02110-1301 USA
23
+ You should have received a copy of the GNU Lesser General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26
+ 02110-1301 USA
27
27
 
28
28
  */
29
29
 
30
30
  /*
31
31
 
32
- These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
32
+ These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
33
33
 
34
34
  */
35
35
 
@@ -48,19 +48,19 @@ extern "C" {
48
48
  #endif /*__cplusplus*/
49
49
 
50
50
  #define VIPS_TYPE_REGION (vips_region_get_type())
51
- #define VIPS_REGION( obj ) \
52
- (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
53
- VIPS_TYPE_REGION, VipsRegion ))
54
- #define VIPS_REGION_CLASS( klass ) \
55
- (G_TYPE_CHECK_CLASS_CAST( (klass), \
56
- VIPS_TYPE_REGION, VipsRegionClass))
57
- #define VIPS_IS_REGION( obj ) \
58
- (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_REGION ))
59
- #define VIPS_IS_REGION_CLASS( klass ) \
60
- (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_REGION ))
61
- #define VIPS_REGION_GET_CLASS( obj ) \
62
- (G_TYPE_INSTANCE_GET_CLASS( (obj), \
63
- VIPS_TYPE_REGION, VipsRegionClass ))
51
+ #define VIPS_REGION(obj) \
52
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), \
53
+ VIPS_TYPE_REGION, VipsRegion))
54
+ #define VIPS_REGION_CLASS(klass) \
55
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
56
+ VIPS_TYPE_REGION, VipsRegionClass))
57
+ #define VIPS_IS_REGION(obj) \
58
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), VIPS_TYPE_REGION))
59
+ #define VIPS_IS_REGION_CLASS(klass) \
60
+ (G_TYPE_CHECK_CLASS_TYPE((klass), VIPS_TYPE_REGION))
61
+ #define VIPS_REGION_GET_CLASS(obj) \
62
+ (G_TYPE_INSTANCE_GET_CLASS((obj), \
63
+ VIPS_TYPE_REGION, VipsRegionClass))
64
64
 
65
65
  /**
66
66
  * VipsRegionShrink:
@@ -93,16 +93,16 @@ struct _VipsRegion {
93
93
  /*< public >*/
94
94
  /* Users may read these two fields.
95
95
  */
96
- VipsImage *im; /* Link back to parent image */
97
- VipsRect valid; /* Area of parent we can see */
96
+ VipsImage *im; /* Link back to parent image */
97
+ VipsRect valid; /* Area of parent we can see */
98
98
 
99
99
  /* The rest of VipsRegion is private.
100
100
  */
101
101
  /*< private >*/
102
- RegionType type; /* What kind of attachment */
103
- VipsPel *data; /* Off here to get data */
104
- int bpl; /* Bytes-per-line for data */
105
- void *seq; /* Sequence we are using to fill region */
102
+ RegionType type; /* What kind of attachment */
103
+ VipsPel *data; /* Off here to get data */
104
+ int bpl; /* Bytes-per-line for data */
105
+ void *seq; /* Sequence we are using to fill region */
106
106
 
107
107
  /* The thread that made this region. Used to assert() test that
108
108
  * regions are not being shared between threads.
@@ -120,7 +120,7 @@ struct _VipsRegion {
120
120
  /* The image this region is on has changed and caches need to be
121
121
  * dropped.
122
122
  */
123
- gboolean invalid;
123
+ gboolean invalid;
124
124
  };
125
125
 
126
126
  typedef struct _VipsRegionClass {
@@ -134,102 +134,102 @@ VIPS_API
134
134
  GType vips_region_get_type(void);
135
135
 
136
136
  VIPS_API
137
- VipsRegion *vips_region_new( VipsImage *image );
137
+ VipsRegion *vips_region_new(VipsImage *image);
138
138
 
139
139
  VIPS_API
140
- int vips_region_buffer( VipsRegion *reg, const VipsRect *r );
140
+ int vips_region_buffer(VipsRegion *reg, const VipsRect *r);
141
141
  VIPS_API
142
- int vips_region_image( VipsRegion *reg, const VipsRect *r );
142
+ int vips_region_image(VipsRegion *reg, const VipsRect *r);
143
143
  VIPS_API
144
- int vips_region_region( VipsRegion *reg, VipsRegion *dest,
145
- const VipsRect *r, int x, int y );
144
+ int vips_region_region(VipsRegion *reg, VipsRegion *dest,
145
+ const VipsRect *r, int x, int y);
146
146
  VIPS_API
147
- int vips_region_equalsregion( VipsRegion *reg1, VipsRegion *reg2 );
147
+ int vips_region_equalsregion(VipsRegion *reg1, VipsRegion *reg2);
148
148
  VIPS_API
149
- int vips_region_position( VipsRegion *reg, int x, int y );
149
+ int vips_region_position(VipsRegion *reg, int x, int y);
150
150
 
151
151
  VIPS_API
152
- void vips_region_paint( VipsRegion *reg, const VipsRect *r, int value );
152
+ void vips_region_paint(VipsRegion *reg, const VipsRect *r, int value);
153
153
  VIPS_API
154
- void vips_region_paint_pel( VipsRegion *reg,
155
- const VipsRect *r, const VipsPel *ink );
154
+ void vips_region_paint_pel(VipsRegion *reg,
155
+ const VipsRect *r, const VipsPel *ink);
156
156
  VIPS_API
157
- void vips_region_black( VipsRegion *reg );
157
+ void vips_region_black(VipsRegion *reg);
158
158
  VIPS_API
159
- void vips_region_copy( VipsRegion *reg, VipsRegion *dest,
160
- const VipsRect *r, int x, int y );
159
+ void vips_region_copy(VipsRegion *reg, VipsRegion *dest,
160
+ const VipsRect *r, int x, int y);
161
161
  VIPS_API
162
- int vips_region_shrink_method( VipsRegion *from, VipsRegion *to,
163
- const VipsRect *target, VipsRegionShrink method );
162
+ int vips_region_shrink_method(VipsRegion *from, VipsRegion *to,
163
+ const VipsRect *target, VipsRegionShrink method);
164
164
  VIPS_API
165
- int vips_region_shrink( VipsRegion *from, VipsRegion *to,
166
- const VipsRect *target );
165
+ int vips_region_shrink(VipsRegion *from, VipsRegion *to,
166
+ const VipsRect *target);
167
167
 
168
168
  VIPS_API
169
- int vips_region_prepare( VipsRegion *reg, const VipsRect *r );
169
+ int vips_region_prepare(VipsRegion *reg, const VipsRect *r);
170
170
  VIPS_API
171
- int vips_region_prepare_to( VipsRegion *reg,
172
- VipsRegion *dest, const VipsRect *r, int x, int y );
171
+ int vips_region_prepare_to(VipsRegion *reg,
172
+ VipsRegion *dest, const VipsRect *r, int x, int y);
173
173
 
174
174
  VIPS_API
175
- VipsPel *vips_region_fetch( VipsRegion *region,
176
- int left, int top, int width, int height, size_t *len );
175
+ VipsPel *vips_region_fetch(VipsRegion *region,
176
+ int left, int top, int width, int height, size_t *len);
177
177
  VIPS_API
178
- int vips_region_width( VipsRegion *region );
178
+ int vips_region_width(VipsRegion *region);
179
179
  VIPS_API
180
- int vips_region_height( VipsRegion *region );
180
+ int vips_region_height(VipsRegion *region);
181
181
 
182
182
  VIPS_API
183
- void vips_region_invalidate( VipsRegion *reg );
183
+ void vips_region_invalidate(VipsRegion *reg);
184
184
 
185
185
  /* Use this to count pixels passing through key points. Handy for spotting bad
186
186
  * overcomputation.
187
187
  */
188
188
  #ifdef DEBUG_LEAK
189
- #define VIPS_COUNT_PIXELS( R, N ) vips__region_count_pixels( R, N )
189
+ #define VIPS_COUNT_PIXELS(R, N) vips__region_count_pixels(R, N)
190
190
  #else /*!DEBUG_LEAK*/
191
- #define VIPS_COUNT_PIXELS( R, N )
191
+ #define VIPS_COUNT_PIXELS(R, N)
192
192
  #endif /*DEBUG_LEAK*/
193
193
 
194
- #define VIPS_REGION_LSKIP( R ) \
195
- ((size_t)((R)->bpl))
196
- #define VIPS_REGION_N_ELEMENTS( R ) \
197
- ((size_t)((R)->valid.width * (R)->im->Bands))
198
- #define VIPS_REGION_SIZEOF_ELEMENT( R ) \
199
- (VIPS_IMAGE_SIZEOF_ELEMENT( (R)->im ))
200
- #define VIPS_REGION_SIZEOF_PEL( R ) \
201
- (VIPS_IMAGE_SIZEOF_PEL( (R)->im ))
202
- #define VIPS_REGION_SIZEOF_LINE( R ) \
203
- ((size_t)((R)->valid.width * VIPS_REGION_SIZEOF_PEL( R )))
194
+ #define VIPS_REGION_LSKIP(R) \
195
+ ((size_t) ((R)->bpl))
196
+ #define VIPS_REGION_N_ELEMENTS(R) \
197
+ ((size_t) ((R)->valid.width * (R)->im->Bands))
198
+ #define VIPS_REGION_SIZEOF_ELEMENT(R) \
199
+ (VIPS_IMAGE_SIZEOF_ELEMENT((R)->im))
200
+ #define VIPS_REGION_SIZEOF_PEL(R) \
201
+ (VIPS_IMAGE_SIZEOF_PEL((R)->im))
202
+ #define VIPS_REGION_SIZEOF_LINE(R) \
203
+ ((size_t) ((R)->valid.width * VIPS_REGION_SIZEOF_PEL(R)))
204
204
 
205
205
  /* If DEBUG is defined, add bounds checking.
206
206
  */
207
207
  #ifdef DEBUG
208
- #define VIPS_REGION_ADDR( R, X, Y ) \
209
- ( (vips_rect_includespoint( &(R)->valid, (X), (Y) ))? \
210
- ((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
211
- ((X) - (R)->valid.left) * VIPS_REGION_SIZEOF_PEL( R )): \
212
- (fprintf( stderr, \
213
- "VIPS_REGION_ADDR: point out of bounds, " \
214
- "file \"%s\", line %d\n" \
215
- "(point x=%d, y=%d\n" \
216
- " should have been within VipsRect left=%d, top=%d, " \
217
- "width=%d, height=%d)\n", \
218
- __FILE__, __LINE__, \
219
- (X), (Y), \
220
- (R)->valid.left, \
221
- (R)->valid.top, \
222
- (R)->valid.width, \
223
- (R)->valid.height ), abort(), (VipsPel *) NULL) \
224
- )
208
+ #define VIPS_REGION_ADDR(R, X, Y) \
209
+ ((vips_rect_includespoint(&(R)->valid, (X), (Y))) \
210
+ ? ((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
211
+ ((X) - (R)->valid.left) * VIPS_REGION_SIZEOF_PEL(R)) \
212
+ : (fprintf(stderr, \
213
+ "VIPS_REGION_ADDR: point out of bounds, " \
214
+ "file \"%s\", line %d\n" \
215
+ "(point x=%d, y=%d\n" \
216
+ " should have been within VipsRect left=%d, top=%d, " \
217
+ "width=%d, height=%d)\n", \
218
+ __FILE__, __LINE__, \
219
+ (X), (Y), \
220
+ (R)->valid.left, \
221
+ (R)->valid.top, \
222
+ (R)->valid.width, \
223
+ (R)->valid.height), \
224
+ abort(), (VipsPel *) NULL))
225
225
  #else /*DEBUG*/
226
- #define VIPS_REGION_ADDR( R, X, Y ) \
226
+ #define VIPS_REGION_ADDR(R, X, Y) \
227
227
  ((R)->data + \
228
- ((Y)-(R)->valid.top) * VIPS_REGION_LSKIP( R ) + \
229
- ((X)-(R)->valid.left) * VIPS_REGION_SIZEOF_PEL( R ))
228
+ ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
229
+ ((X) - (R)->valid.left) * VIPS_REGION_SIZEOF_PEL(R))
230
230
  #endif /*DEBUG*/
231
231
 
232
- #define VIPS_REGION_ADDR_TOPLEFT( R ) ((R)->data)
232
+ #define VIPS_REGION_ADDR_TOPLEFT(R) ((R)->data)
233
233
 
234
234
  #ifdef __cplusplus
235
235
  }
@@ -6,28 +6,28 @@
6
6
 
7
7
  /*
8
8
 
9
- This file is part of VIPS.
10
-
11
- VIPS is free software; you can redistribute it and/or modify
12
- it under the terms of the GNU Lesser General Public License as published by
13
- the Free Software Foundation; either version 2 of the License, or
14
- (at your option) any later version.
15
-
16
- This program is distributed in the hope that it will be useful,
17
- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- GNU Lesser General Public License for more details.
20
-
21
- You should have received a copy of the GNU Lesser General Public License
22
- along with this program; if not, write to the Free Software
23
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24
- 02110-1301 USA
9
+ This file is part of VIPS.
10
+
11
+ VIPS is free software; you can redistribute it and/or modify
12
+ it under the terms of the GNU Lesser General Public License as published by
13
+ the Free Software Foundation; either version 2 of the License, or
14
+ (at your option) any later version.
15
+
16
+ This program is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU Lesser General Public License for more details.
20
+
21
+ You should have received a copy of the GNU Lesser General Public License
22
+ along with this program; if not, write to the Free Software
23
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24
+ 02110-1301 USA
25
25
 
26
26
  */
27
27
 
28
28
  /*
29
29
 
30
- These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
30
+ These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
31
31
 
32
32
  */
33
33
 
@@ -57,63 +57,63 @@ typedef enum {
57
57
  } VipsSize;
58
58
 
59
59
  VIPS_API
60
- int vips_shrink( VipsImage *in, VipsImage **out,
61
- double hshrink, double vshrink, ... )
60
+ int vips_shrink(VipsImage *in, VipsImage **out,
61
+ double hshrink, double vshrink, ...)
62
62
  G_GNUC_NULL_TERMINATED;
63
63
  VIPS_API
64
- int vips_shrinkh( VipsImage *in, VipsImage **out, int hshrink, ... )
64
+ int vips_shrinkh(VipsImage *in, VipsImage **out, int hshrink, ...)
65
65
  G_GNUC_NULL_TERMINATED;
66
66
  VIPS_API
67
- int vips_shrinkv( VipsImage *in, VipsImage **out, int vshrink, ... )
67
+ int vips_shrinkv(VipsImage *in, VipsImage **out, int vshrink, ...)
68
68
  G_GNUC_NULL_TERMINATED;
69
69
 
70
70
  VIPS_API
71
- int vips_reduce( VipsImage *in, VipsImage **out,
72
- double hshrink, double vshrink, ... )
71
+ int vips_reduce(VipsImage *in, VipsImage **out,
72
+ double hshrink, double vshrink, ...)
73
73
  G_GNUC_NULL_TERMINATED;
74
74
  VIPS_API
75
- int vips_reduceh( VipsImage *in, VipsImage **out, double hshrink, ... )
75
+ int vips_reduceh(VipsImage *in, VipsImage **out, double hshrink, ...)
76
76
  G_GNUC_NULL_TERMINATED;
77
77
  VIPS_API
78
- int vips_reducev( VipsImage *in, VipsImage **out, double vshrink, ... )
78
+ int vips_reducev(VipsImage *in, VipsImage **out, double vshrink, ...)
79
79
  G_GNUC_NULL_TERMINATED;
80
80
 
81
81
  VIPS_API
82
- int vips_thumbnail( const char *filename, VipsImage **out, int width, ... )
82
+ int vips_thumbnail(const char *filename, VipsImage **out, int width, ...)
83
83
  G_GNUC_NULL_TERMINATED;
84
84
  VIPS_API
85
- int vips_thumbnail_buffer( void *buf, size_t len, VipsImage **out,
86
- int width, ... )
85
+ int vips_thumbnail_buffer(void *buf, size_t len, VipsImage **out,
86
+ int width, ...)
87
87
  G_GNUC_NULL_TERMINATED;
88
88
  VIPS_API
89
- int vips_thumbnail_image( VipsImage *in, VipsImage **out, int width, ... )
89
+ int vips_thumbnail_image(VipsImage *in, VipsImage **out, int width, ...)
90
90
  G_GNUC_NULL_TERMINATED;
91
91
  VIPS_API
92
- int vips_thumbnail_source( VipsSource *source, VipsImage **out,
93
- int width, ... )
92
+ int vips_thumbnail_source(VipsSource *source, VipsImage **out,
93
+ int width, ...)
94
94
  G_GNUC_NULL_TERMINATED;
95
95
 
96
96
  VIPS_API
97
- int vips_similarity( VipsImage *in, VipsImage **out, ... )
97
+ int vips_similarity(VipsImage *in, VipsImage **out, ...)
98
98
  G_GNUC_NULL_TERMINATED;
99
99
  VIPS_API
100
- int vips_rotate( VipsImage *in, VipsImage **out, double angle, ... )
100
+ int vips_rotate(VipsImage *in, VipsImage **out, double angle, ...)
101
101
  G_GNUC_NULL_TERMINATED;
102
102
  VIPS_API
103
- int vips_affine( VipsImage *in, VipsImage **out,
104
- double a, double b, double c, double d, ... )
103
+ int vips_affine(VipsImage *in, VipsImage **out,
104
+ double a, double b, double c, double d, ...)
105
105
  G_GNUC_NULL_TERMINATED;
106
106
 
107
107
  VIPS_API
108
- int vips_resize( VipsImage *in, VipsImage **out, double scale, ... )
108
+ int vips_resize(VipsImage *in, VipsImage **out, double scale, ...)
109
109
  G_GNUC_NULL_TERMINATED;
110
110
 
111
111
  VIPS_API
112
- int vips_mapim( VipsImage *in, VipsImage **out, VipsImage *index, ... )
112
+ int vips_mapim(VipsImage *in, VipsImage **out, VipsImage *index, ...)
113
113
  G_GNUC_NULL_TERMINATED;
114
114
 
115
115
  VIPS_API
116
- int vips_quadratic( VipsImage *in, VipsImage **out, VipsImage *coeff, ... )
116
+ int vips_quadratic(VipsImage *in, VipsImage **out, VipsImage *coeff, ...)
117
117
  G_GNUC_NULL_TERMINATED;
118
118
 
119
119
  #ifdef __cplusplus
@@ -5,28 +5,28 @@
5
5
 
6
6
  /*
7
7
 
8
- This file is part of VIPS.
8
+ This file is part of VIPS.
9
9
 
10
- VIPS is free software; you can redistribute it and/or modify
11
- it under the terms of the GNU Lesser General Public License as published by
12
- the Free Software Foundation; either version 2 of the License, or
13
- (at your option) any later version.
10
+ VIPS is free software; you can redistribute it and/or modify
11
+ it under the terms of the GNU Lesser General Public License as published by
12
+ the Free Software Foundation; either version 2 of the License, or
13
+ (at your option) any later version.
14
14
 
15
- This program is distributed in the hope that it will be useful,
16
- but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- GNU Lesser General Public License for more details.
15
+ This program is distributed in the hope that it will be useful,
16
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ GNU Lesser General Public License for more details.
19
19
 
20
- You should have received a copy of the GNU Lesser General Public License
21
- along with this program; if not, write to the Free Software
22
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23
- 02110-1301 USA
20
+ You should have received a copy of the GNU Lesser General Public License
21
+ along with this program; if not, write to the Free Software
22
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23
+ 02110-1301 USA
24
24
 
25
25
  */
26
26
 
27
27
  /*
28
28
 
29
- These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
29
+ These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
30
30
 
31
31
  */
32
32
 
@@ -42,24 +42,24 @@ extern "C" {
42
42
  #endif /*__cplusplus*/
43
43
 
44
44
  #define VIPS_TYPE_SBUF (vips_sbuf_get_type())
45
- #define VIPS_SBUF( obj ) \
46
- (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
47
- VIPS_TYPE_SBUF, VipsSbuf ))
48
- #define VIPS_SBUF_CLASS( klass ) \
49
- (G_TYPE_CHECK_CLASS_CAST( (klass), \
50
- VIPS_TYPE_SBUF, VipsSbufClass))
51
- #define VIPS_IS_SBUF( obj ) \
52
- (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_SBUF ))
53
- #define VIPS_IS_SBUF_CLASS( klass ) \
54
- (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_SBUF ))
55
- #define VIPS_SBUF_GET_CLASS( obj ) \
56
- (G_TYPE_INSTANCE_GET_CLASS( (obj), \
57
- VIPS_TYPE_SBUF, VipsSbufClass ))
45
+ #define VIPS_SBUF(obj) \
46
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), \
47
+ VIPS_TYPE_SBUF, VipsSbuf))
48
+ #define VIPS_SBUF_CLASS(klass) \
49
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
50
+ VIPS_TYPE_SBUF, VipsSbufClass))
51
+ #define VIPS_IS_SBUF(obj) \
52
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), VIPS_TYPE_SBUF))
53
+ #define VIPS_IS_SBUF_CLASS(klass) \
54
+ (G_TYPE_CHECK_CLASS_TYPE((klass), VIPS_TYPE_SBUF))
55
+ #define VIPS_SBUF_GET_CLASS(obj) \
56
+ (G_TYPE_INSTANCE_GET_CLASS((obj), \
57
+ VIPS_TYPE_SBUF, VipsSbufClass))
58
58
 
59
59
  #define VIPS_SBUF_BUFFER_SIZE (4096)
60
60
 
61
61
  /* Layer over source: read with an input buffer.
62
- *
62
+ *
63
63
  * Libraries like libjpeg do their own input buffering and need raw IO, but
64
64
  * others, like radiance, need to parse the input into lines. A buffered read
65
65
  * class is very convenient.
@@ -96,46 +96,45 @@ typedef struct _VipsSbufClass {
96
96
  } VipsSbufClass;
97
97
 
98
98
  VIPS_API
99
- GType vips_sbuf_get_type( void );
99
+ GType vips_sbuf_get_type(void);
100
100
 
101
101
  VIPS_API
102
- VipsSbuf *vips_sbuf_new_from_source( VipsSource *source );
102
+ VipsSbuf *vips_sbuf_new_from_source(VipsSource *source);
103
103
 
104
104
  VIPS_API
105
- void vips_sbuf_unbuffer( VipsSbuf *sbuf );
105
+ void vips_sbuf_unbuffer(VipsSbuf *sbuf);
106
106
 
107
107
  VIPS_API
108
- int vips_sbuf_getc( VipsSbuf *sbuf );
109
- #define VIPS_SBUF_GETC( S ) ( \
110
- (S)->read_point < (S)->chars_in_buffer ? \
111
- (S)->input_buffer[(S)->read_point++] : \
112
- vips_sbuf_getc( S ) \
113
- )
108
+ int vips_sbuf_getc(VipsSbuf *sbuf);
109
+ #define VIPS_SBUF_GETC(S) ( \
110
+ (S)->read_point < (S)->chars_in_buffer \
111
+ ? (S)->input_buffer[(S)->read_point++] \
112
+ : vips_sbuf_getc(S))
114
113
  VIPS_API
115
- void vips_sbuf_ungetc( VipsSbuf *sbuf );
116
- #define VIPS_SBUF_UNGETC( S ) { \
117
- if( (S)->read_point > 0 ) \
118
- (S)->read_point -= 1; \
119
- }
114
+ void vips_sbuf_ungetc(VipsSbuf *sbuf);
115
+ #define VIPS_SBUF_UNGETC(S) \
116
+ { \
117
+ if ((S)->read_point > 0) \
118
+ (S)->read_point -= 1; \
119
+ }
120
120
 
121
121
  VIPS_API
122
- int vips_sbuf_require( VipsSbuf *sbuf, int require );
123
- #define VIPS_SBUF_REQUIRE( S, R ) ( \
124
- (S)->read_point + (R) <= (S)->chars_in_buffer ? \
125
- 0 : \
126
- vips_sbuf_require( (S), (R) ) \
127
- )
128
- #define VIPS_SBUF_PEEK( S ) ((S)->input_buffer + (S)->read_point)
129
- #define VIPS_SBUF_FETCH( S ) ((S)->input_buffer[(S)->read_point++])
122
+ int vips_sbuf_require(VipsSbuf *sbuf, int require);
123
+ #define VIPS_SBUF_REQUIRE(S, R) ( \
124
+ (S)->read_point + (R) <= (S)->chars_in_buffer \
125
+ ? 0 \
126
+ : vips_sbuf_require((S), (R)))
127
+ #define VIPS_SBUF_PEEK(S) ((S)->input_buffer + (S)->read_point)
128
+ #define VIPS_SBUF_FETCH(S) ((S)->input_buffer[(S)->read_point++])
130
129
 
131
130
  VIPS_API
132
- const char *vips_sbuf_get_line( VipsSbuf *sbuf );
131
+ const char *vips_sbuf_get_line(VipsSbuf *sbuf);
133
132
  VIPS_API
134
- char *vips_sbuf_get_line_copy( VipsSbuf *sbuf );
133
+ char *vips_sbuf_get_line_copy(VipsSbuf *sbuf);
135
134
  VIPS_API
136
- const char *vips_sbuf_get_non_whitespace( VipsSbuf *sbuf );
135
+ const char *vips_sbuf_get_non_whitespace(VipsSbuf *sbuf);
137
136
  VIPS_API
138
- int vips_sbuf_skip_whitespace( VipsSbuf *sbuf );
137
+ int vips_sbuf_skip_whitespace(VipsSbuf *sbuf);
139
138
 
140
139
  #ifdef __cplusplus
141
140
  }
@@ -9,28 +9,28 @@
9
9
 
10
10
  /*
11
11
 
12
- This file is part of VIPS.
13
-
14
- VIPS is free software; you can redistribute it and/or modify
15
- it under the terms of the GNU Lesser General Public License as published by
16
- the Free Software Foundation; either version 2 of the License, or
17
- (at your option) any later version.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU Lesser General Public License for more details.
23
-
24
- You should have received a copy of the GNU Lesser General Public License
25
- along with this program; if not, write to the Free Software
26
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27
- 02110-1301 USA
12
+ This file is part of VIPS.
13
+
14
+ VIPS is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU Lesser General Public License as published by
16
+ the Free Software Foundation; either version 2 of the License, or
17
+ (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU Lesser General Public License for more details.
23
+
24
+ You should have received a copy of the GNU Lesser General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27
+ 02110-1301 USA
28
28
 
29
29
  */
30
30
 
31
31
  /*
32
32
 
33
- These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
33
+ These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
34
34
 
35
35
  */
36
36
 
@@ -56,19 +56,19 @@ typedef struct {
56
56
  } VipsSemaphore;
57
57
 
58
58
  VIPS_API
59
- int vips_semaphore_up( VipsSemaphore *s );
59
+ int vips_semaphore_up(VipsSemaphore *s);
60
60
  VIPS_API
61
- int vips_semaphore_upn( VipsSemaphore *s, int n );
61
+ int vips_semaphore_upn(VipsSemaphore *s, int n);
62
62
  VIPS_API
63
- int vips_semaphore_down( VipsSemaphore *s );
63
+ int vips_semaphore_down(VipsSemaphore *s);
64
64
  VIPS_API
65
- int vips_semaphore_downn( VipsSemaphore *s, int n );
65
+ int vips_semaphore_downn(VipsSemaphore *s, int n);
66
66
  VIPS_API
67
- int vips_semaphore_down_timeout( VipsSemaphore *s, gint64 timeout );
67
+ int vips_semaphore_down_timeout(VipsSemaphore *s, gint64 timeout);
68
68
  VIPS_API
69
- void vips_semaphore_destroy( VipsSemaphore *s );
69
+ void vips_semaphore_destroy(VipsSemaphore *s);
70
70
  VIPS_API
71
- void vips_semaphore_init( VipsSemaphore *s, int v, char *name );
71
+ void vips_semaphore_init(VipsSemaphore *s, int v, char *name);
72
72
 
73
73
  #ifdef __cplusplus
74
74
  }