From f429475cd01d7223f6c6edf1dae90c2249cff89e Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 5 Dec 2019 13:38:22 +0000 Subject: [PATCH] doc polish --- CHANGELOG.rst | 4 ---- pyvips/vimage.py | 17 +++++++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 071fe05..7a2ce3a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,9 +1,5 @@ # master -## Version 2.1.10 (7 Nov 2019) [add-stream branch] - -* add support for Stream [jcupitt] - ## Version 2.1.9 (13 Sep 2019) * revise README [jcupitt] diff --git a/pyvips/vimage.py b/pyvips/vimage.py index 2ebec64..bdb169b 100644 --- a/pyvips/vimage.py +++ b/pyvips/vimage.py @@ -198,7 +198,7 @@ def new_from_file(vips_filename, **kwargs): Keyword args: memory (bool): If set True, load the image via memory rather than - via a temporary disc file. See :meth:`.new_temp_file` for + via a temporary disc file. See :meth:`new_temp_file` for notes on where temporary files are created. Small images are loaded via memory by default, use ``VIPS_DISC_THRESHOLD`` to set the definition of small. @@ -271,7 +271,7 @@ def new_from_array(array, scale=1.0, offset=0.0): A new one-band image with :class:`BandFormat` ``'double'`` pixels is created from the array. These image are useful with the libvips - convolution operator :meth:`Image.conv`. + convolution operator :meth:`conv`. Args: array (list[list[float]]): Create the image from these values. @@ -327,9 +327,9 @@ def new_from_memory(data, width, height, bands, format): This method is useful for efficiently transferring images from PIL or NumPy into libvips. - See :meth:`.write_to_memory` for the opposite operation. + See :meth:`write_to_memory` for the opposite operation. - Use :meth:`.copy` to set other image attributes. + Use :meth:`copy` to set other image attributes. Args: data (bytes): A memoryview or buffer object. @@ -846,13 +846,18 @@ def set(self, name, value): def remove(self, name): """Remove an item of metadata. - The named metadata item is removed. + The named metadata item is removed. The function returns True if the + named metadata item could be removed, and False if no metadata item of + that name exists. + + This method modifies the image, so it cannot be used on shared + images. Always call :meth:`copy` before using this method. Args: name (str): The name of the piece of metadata to remove. Returns: - None + bool Raises: None