@@ -250,30 +250,28 @@ class Interpretation(object):
250
250
class DemandStyle (object ):
251
251
"""DemandStyle.
252
252
253
- See vips_image_pipelinev(). Operations can hint to the VIPS image IO
254
- system about the kind of demand geometry they prefer.
253
+ See vips_image_pipelinev(). Operations can hint
254
+ the kind of demand geometry they prefer
255
+ to the VIPS image IO system.
255
256
256
257
These demand styles are given below in order of increasing
257
- restrictiveness . When demanding output from a pipeline,
258
+ specialisation . When demanding output from a pipeline,
258
259
vips_image_generate()
259
- will use the most restrictive of the styles requested by the operations
260
+ will use the most general style requested by the operations
260
261
in the pipeline.
261
262
262
- #VIPS_DEMAND_STYLE_THINSTRIP --- This operation would like to output strips
263
- the width of the image and a few pels high. This is option suitable for
264
- point-to-point operations, such as those in the arithmetic package.
265
-
266
- This option is only efficient for cases where each output pel depends
267
- upon the pel in the corresponding position in the input image.
263
+ #VIPS_DEMAND_STYLE_SMALLTILE --- This is the most general demand format.
264
+ Output is demanded in small (around 100x100 pel) sections. This style works
265
+ reasonably efficiently, even for bizzarre operations like 45 degree rotate.
268
266
269
267
#VIPS_DEMAND_STYLE_FATSTRIP --- This operation would like to output strips
270
268
the width of the image and as high as possible. This option is suitable
271
269
for area operations which do not violently transform coordinates, such
272
270
as vips_conv().
273
271
274
- #VIPS_DEMAND_STYLE_SMALLTILE --- This is the most general demand format.
275
- Output is demanded in small (around 100x100 pel) sections . This style works
276
- reasonably efficiently, even for bizzare operations like 45 degree rotate .
272
+ #VIPS_DEMAND_STYLE_THINSTRIP --- This operation would like to output strips
273
+ the width of the image and a few pels high . This option is suitable for
274
+ point-to-point operations, such as those in the arithmetic package .
277
275
278
276
#VIPS_DEMAND_STYLE_ANY --- This image is not being demand-read from a disc
279
277
file (even indirectly) so any demand style is OK. It's used for things like
@@ -283,9 +281,9 @@ class DemandStyle(object):
283
281
284
282
Attributes:
285
283
286
- SMALLTILE (str): demand in small (typically 64x64 pixel) tiles
284
+ SMALLTILE (str): demand in small (typically 128x128 pixel) tiles
287
285
288
- FATSTRIP (str): demand in fat (typically 10 pixel high) strips
286
+ FATSTRIP (str): demand in fat (typically 16 pixel high) strips
289
287
290
288
THINSTRIP (str): demand in thin (typically 1 pixel high) strips
291
289
@@ -359,11 +357,11 @@ class OperationMath2(object):
359
357
360
358
Attributes:
361
359
362
- POW (str): pow( left, right )
360
+ POW (str): pow(left, right)
363
361
364
- WOP (str): pow( right, left )
362
+ WOP (str): pow(right, left)
365
363
366
- ATAN2 (str): atan2( left, right )
364
+ ATAN2 (str): atan2(left, right)
367
365
368
366
"""
369
367
@@ -405,6 +403,14 @@ class OperationMath(object):
405
403
406
404
ATAN (str): atan(), angles in degrees
407
405
406
+ LOG (str): log base e
407
+
408
+ LOG10 (str): log base 10
409
+
410
+ EXP (str): e to the something
411
+
412
+ EXP10 (str): 10 to the something
413
+
408
414
SINH (str): sinh(), angles in radians
409
415
410
416
COSH (str): cosh(), angles in radians
@@ -417,14 +423,6 @@ class OperationMath(object):
417
423
418
424
ATANH (str): atanh(), angles in radians
419
425
420
- LOG (str): log base e
421
-
422
- LOG10 (str): log base 10
423
-
424
- EXP (str): e to the something
425
-
426
- EXP10 (str): 10 to the something
427
-
428
426
"""
429
427
430
428
SIN = 'sin'
@@ -433,16 +431,16 @@ class OperationMath(object):
433
431
ASIN = 'asin'
434
432
ACOS = 'acos'
435
433
ATAN = 'atan'
434
+ LOG = 'log'
435
+ LOG10 = 'log10'
436
+ EXP = 'exp'
437
+ EXP10 = 'exp10'
436
438
SINH = 'sinh'
437
439
COSH = 'cosh'
438
440
TANH = 'tanh'
439
441
ASINH = 'asinh'
440
442
ACOSH = 'acosh'
441
443
ATANH = 'atanh'
442
- LOG = 'log'
443
- LOG10 = 'log10'
444
- EXP = 'exp'
445
- EXP10 = 'exp10'
446
444
447
445
448
446
class OperationRound (object ):
@@ -808,6 +806,32 @@ class Precision(object):
808
806
APPROXIMATE = 'approximate'
809
807
810
808
809
+ class TextWrap (object ):
810
+ """TextWrap.
811
+
812
+ Sets the word wrapping style for vips_text() when used with a maximum
813
+ width.
814
+
815
+ See also: vips_text().
816
+
817
+ Attributes:
818
+
819
+ WORD (str): wrap at word boundaries
820
+
821
+ CHAR (str): wrap at character boundaries
822
+
823
+ WORD_CHAR (str): wrap at word boundaries, but fall back to character boundaries if there is not enough space for a full word
824
+
825
+ NONE (str): no wrapping
826
+
827
+ """
828
+
829
+ WORD = 'word'
830
+ CHAR = 'char'
831
+ WORD_CHAR = 'word-char'
832
+ NONE = 'none'
833
+
834
+
811
835
class FailOn (object ):
812
836
"""FailOn.
813
837
@@ -848,6 +872,9 @@ class ForeignPpmFormat(object):
848
872
849
873
#VIPS_FOREIGN_PPM_FORMAT_PFM images are 32-bit float pixels.
850
874
875
+ #VIPS_FOREIGN_PPM_FORMAT_PNM images are anymap images -- the image format
876
+ is used to pick the saver.
877
+
851
878
Attributes:
852
879
853
880
PBM (str): portable bitmap
@@ -858,12 +885,15 @@ class ForeignPpmFormat(object):
858
885
859
886
PFM (str): portable float map
860
887
888
+ PNM (str): portable anymap
889
+
861
890
"""
862
891
863
892
PBM = 'pbm'
864
893
PGM = 'pgm'
865
894
PPM = 'ppm'
866
895
PFM = 'pfm'
896
+ PNM = 'pnm'
867
897
868
898
869
899
class ForeignSubsample (object ):
@@ -1119,6 +1149,34 @@ class ForeignHeifCompression(object):
1119
1149
AV1 = 'av1'
1120
1150
1121
1151
1152
+ class ForeignHeifEncoder (object ):
1153
+ """ForeignHeifEncoder.
1154
+
1155
+ The selected encoder to use.
1156
+ If libheif hasn't been compiled with the selected encoder,
1157
+ we will fallback to the default encoder for the compression format.
1158
+
1159
+ Attributes:
1160
+
1161
+ AUTO (str): auto
1162
+
1163
+ AOM (str): aom
1164
+
1165
+ RAV1E (str): RAV1E
1166
+
1167
+ SVT (str): SVT-AV1
1168
+
1169
+ X265 (str): x265
1170
+
1171
+ """
1172
+
1173
+ AUTO = 'auto'
1174
+ AOM = 'aom'
1175
+ RAV1E = 'rav1e'
1176
+ SVT = 'svt'
1177
+ X265 = 'x265'
1178
+
1179
+
1122
1180
class Size (object ):
1123
1181
"""Size.
1124
1182
@@ -1316,3 +1374,33 @@ class ImageType(object):
1316
1374
MMAPIN = 'mmapin'
1317
1375
MMAPINRW = 'mmapinrw'
1318
1376
OPENOUT = 'openout'
1377
+
1378
+
1379
+ class ForeignPngFilter (object ):
1380
+ """ForeignPngFilter.
1381
+
1382
+ http://www.w3.org/TR/PNG-Filters.html
1383
+ The values mirror those of png.h in libpng.
1384
+
1385
+ Attributes:
1386
+
1387
+ NONE (str): no filtering
1388
+
1389
+ SUB (str): difference to the left
1390
+
1391
+ UP (str): difference up
1392
+
1393
+ AVG (str): average of left and up
1394
+
1395
+ PAETH (str): pick best neighbor predictor automatically
1396
+
1397
+ ALL (str): adaptive
1398
+
1399
+ """
1400
+
1401
+ NONE = 'none'
1402
+ SUB = 'sub'
1403
+ UP = 'up'
1404
+ AVG = 'avg'
1405
+ PAETH = 'paeth'
1406
+ ALL = 'all'
0 commit comments