class

Vips::Target

Inherits Vips::Connection / Vips::VipsObject / Vips::GObject / Reference / Object

an output connection

Class methods

new_to_descriptor(descriptor : Int32)

Make a new target to write to a file descriptor (a small integer).

target = Vips::Target.new_to_descriptor(STDOUT)

Makes a descriptor attached to STDOUT.

You can pass this target to (for example) write_to_target

Source
new_to_file(filename : String)

Make a new target to write to a file.

target = Vips::Target.new_to_file("myfile.jpg")

You can pass this target to (for example) write_to_target

Source
new_to_memory

Make a new target to write to an area of memory.

target = Vips::Target.new_to_memory

You can pass this target to (for example) write_to_target

After writing to target, fetch the bytes from the target object with:

bytes = target.blob
Source

Instance methods

blob

Get the memory object held by the target when using new_to_memory

Source