MCPcopy Index your code
hub / github.com/python/cpython / subsample

Method subsample

Lib/tkinter/__init__.py:4459–4468  ·  view source on GitHub ↗

Return a new PhotoImage based on the same image as this widget but use only every Xth or Yth pixel. If Y is not given, the default value is the same as X. The FROM_COORDS option specifies a rectangular sub-region of the source image to be copied, as in the copy() me

(self, x, y='', *, from_coords=None)

Source from the content-addressed store, hash-verified

4457 return self.copy(zoom=(x, y), from_coords=from_coords)
4458
4459 def subsample(self, x, y='', *, from_coords=None):
4460 """Return a new PhotoImage based on the same image as this widget
4461 but use only every Xth or Yth pixel. If Y is not given, the
4462 default value is the same as X.
4463
4464 The FROM_COORDS option specifies a rectangular sub-region of the
4465 source image to be copied, as in the copy() method.
4466 """
4467 if y=='': y=x
4468 return self.copy(subsample=(x, y), from_coords=from_coords)
4469
4470 def copy_replace(self, sourceImage, *, from_coords=None, to=None, shrink=False,
4471 zoom=None, subsample=None, compositingrule=None):

Callers 1

test_subsampleMethod · 0.80

Calls 1

copyMethod · 0.95

Tested by 1

test_subsampleMethod · 0.64