Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Deprecate tostring_rgb.#25484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Deprecate tostring_rgb.#25484
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
``RendererAgg.tostring_rgb`` and ``FigureCanvasAgg.tostring_rgb`` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
... are deprecated with no replacement. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -280,6 +280,7 @@ def buffer_rgba(self): | ||
def tostring_argb(self): | ||
return np.asarray(self._renderer).take([3, 0, 1, 2], axis=2).tobytes() | ||
@_api.deprecated("3.8") | ||
def tostring_rgb(self): | ||
return np.asarray(self._renderer).take([0, 1, 2], axis=2).tobytes() | ||
@@ -414,6 +415,7 @@ def get_renderer(self, cleared=False): | ||
self.renderer.clear() | ||
return self.renderer | ||
@_api.deprecated("3.8") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Do we need any of these tostring_ methods? and even if we do, should they not be private? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. We could also deprecate tostring_argb (which we don't use either anymore); I don't have a strong opinion here. | ||
def tostring_rgb(self): | ||
""" | ||
Get the image as RGB `bytes`. | ||