clarify draw docs

see https://github.com/libvips/libvips/discussions/2733
This commit is contained in:
John Cupitt 2022-03-22 10:03:36 +00:00
parent a77519f7c3
commit 1b97b52318
2 changed files with 5 additions and 4 deletions

View File

@ -59,7 +59,7 @@
* libvips operations are all functional: they take zero or more existing input
* images and generate zero or more new output images. Images are
* never altered, you always create new images. This means libvips can cache
* and thread very agressively.
* and thread very aggressively.
*
* The downside is that creating entirely fresh images each time can be very
* slow. libvips has a range of tricks to avoid these problems, but there are
@ -68,9 +68,10 @@
* need to draw 1,000 straight lines, a 1,000 operation-deep pipeline is going
* to be a slow way to do it. This is where the draw operations come in.
*
* To use these operations, use vips_copy() to make a copy of the image you
* want to modify to ensure that no one else is using it, then call a
* To use these operations, use vips_image_copy_memory() to make a private
* memory copy of the image you want to modify, then call a
* series of draw operations.
*
* Once you are done drawing, return to normal use of vips operations. Any time
* you want to start drawing again, you'll need to copy again.
*/

View File

@ -3318,7 +3318,7 @@ vips_image_rewind_output( VipsImage *image )
* Call this before using the draw operations to make sure you have a
* memory image that can be modified.
*
* vips_image_copy() adds a null "copy" node to a pipeline. Use that
* vips_copy() adds a null "copy" node to a pipeline. Use that
* instead if you want to change metadata and not pixels.
*
* This operation is thread-safe, unlike vips_image_wio_input().