Skip to content

Commit 1b97b52

Browse files
committed
clarify draw docs
see #2733
1 parent a77519f commit 1b97b52

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

libvips/draw/draw.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
* libvips operations are all functional: they take zero or more existing input
6060
* images and generate zero or more new output images. Images are
6161
* never altered, you always create new images. This means libvips can cache
62-
* and thread very agressively.
62+
* and thread very aggressively.
6363
*
6464
* The downside is that creating entirely fresh images each time can be very
6565
* slow. libvips has a range of tricks to avoid these problems, but there are
@@ -68,9 +68,10 @@
6868
* need to draw 1,000 straight lines, a 1,000 operation-deep pipeline is going
6969
* to be a slow way to do it. This is where the draw operations come in.
7070
*
71-
* To use these operations, use vips_copy() to make a copy of the image you
72-
* want to modify to ensure that no one else is using it, then call a
71+
* To use these operations, use vips_image_copy_memory() to make a private
72+
* memory copy of the image you want to modify, then call a
7373
* series of draw operations.
74+
*
7475
* Once you are done drawing, return to normal use of vips operations. Any time
7576
* you want to start drawing again, you'll need to copy again.
7677
*/

libvips/iofuncs/image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3318,7 +3318,7 @@ vips_image_rewind_output( VipsImage *image )
33183318
* Call this before using the draw operations to make sure you have a
33193319
* memory image that can be modified.
33203320
*
3321-
* vips_image_copy() adds a null "copy" node to a pipeline. Use that
3321+
* vips_copy() adds a null "copy" node to a pipeline. Use that
33223322
* instead if you want to change metadata and not pixels.
33233323
*
33243324
* This operation is thread-safe, unlike vips_image_wio_input().

0 commit comments

Comments
 (0)