Skip to content

Commit 495e00d

Browse files
authored
Remove internal DemandStyle enum (#540)
1 parent 28f50a7 commit 495e00d

File tree

2 files changed

+4
-52
lines changed

2 files changed

+4
-52
lines changed

examples/gen-enums.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ def add_nickname(gtype, a, b):
103103

104104
type_map(type_from_name('GEnum'), add_nickname)
105105

106+
# Filter internal enums
107+
blacklist = ['VipsDemandStyle']
108+
all_nicknames = [name for name in all_nicknames if name not in blacklist]
109+
106110
for name in all_nicknames:
107111
gtype = type_from_name(name)
108112
python_name = remove_prefix(name)

pyvips/enums.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -246,58 +246,6 @@ class Interpretation(object):
246246
HSV = 'hsv'
247247

248248

249-
class DemandStyle(object):
250-
"""DemandStyle.
251-
252-
See :meth:`.Image.pipelinev`. Operations can hint
253-
the kind of demand geometry they prefer
254-
to the VIPS image IO system.
255-
256-
These demand styles are given below in order of increasing
257-
specialisation. When demanding output from a pipeline,
258-
:meth:`.Image.generate`
259-
will use the most general style requested by the operations
260-
in the pipeline.
261-
262-
:class:`.enums.DemandStyle.SMALLTILE` -- This is the most general demand format.
263-
Output is demanded in small (around 100x100 pel) sections. This style works
264-
reasonably efficiently, even for bizarre operations like 45 degree rotate.
265-
266-
:class:`.enums.DemandStyle.FATSTRIP` -- This operation would like to output strips
267-
the width of the image and as high as possible. This option is suitable
268-
for area operations which do not violently transform coordinates, such
269-
as :meth:`.Image.conv`.
270-
271-
:class:`.enums.DemandStyle.THINSTRIP` -- This operation would like to output strips
272-
the width of the image and a few pels high. This option is suitable for
273-
point-to-point operations, such as those in the arithmetic package.
274-
275-
:class:`.enums.DemandStyle.ANY` -- This image is not being demand-read from a disc
276-
file (even indirectly) so any demand style is OK. It's used for things like
277-
:meth:`.Image.black` where the pixels are calculated.
278-
279-
::: seealso
280-
:meth:`.Image.pipelinev`.
281-
282-
Attributes:
283-
284-
SMALLTILE (str): demand in small (typically 128x128 pixel) tiles
285-
286-
FATSTRIP (str): demand in fat (typically 16 pixel high) strips
287-
288-
THINSTRIP (str): demand in thin (typically 1 pixel high) strips
289-
290-
ANY (str): demand geometry does not matter
291-
292-
"""
293-
294-
ERROR = 'error'
295-
SMALLTILE = 'smalltile'
296-
FATSTRIP = 'fatstrip'
297-
THINSTRIP = 'thinstrip'
298-
ANY = 'any'
299-
300-
301249
class OperationRelational(object):
302250
"""OperationRelational.
303251

0 commit comments

Comments
 (0)