Movatterモバイル変換


[0]ホーム

URL:


Operator index > By section > Draw[src]

These operations directly modify the image. They do not thread, on 32-bitmachines they will be limited to2GB images, and a little care needs to betaken if you use them as part of an image pipeline. They are mostly supposedto be useful for paintbox-style programs.

libvips operations are all functional: they take zero or more existing inputimages 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 aggressively.

The downside is that creating entirely fresh images each time can be veryslow. libvips has a range of tricks to avoid these problems, but there arestill times when you really have to be able to modify an image. An examplemight be drawing a curved line from a set of straight line segments: if youneed to draw 1,000 straight lines, a 1,000 operation-deep pipeline is goingto be a slow way to do it. This is where the draw operations come in.

To use these operations, usevips_image_copy_memory() to make a privatememory 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 timeyou want to start drawing again, you’ll need to copy again.

Functions

Enumerations


[8]ページ先頭

©2009-2025 Movatter.jp