class Vips::Target

Overview

an output connection

Direct Known Subclasses

Defined in:

vips/target.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from class Vips::Connection

filename : String | Nil filename, nick : String | Nil nick

Instance methods inherited from class Vips::VipsObject

get(name : String) get, get_blurb(name : String) get_blurb, get_description get_description, get_pspec(name : String) : LibVips::GParamSpec | Nil get_pspec, get_typeof(name : String) get_typeof, post_close(&block : -> ) post_close, print_all print_all, set(gtype, name, value)
set(options : String)
set

Instance methods inherited from class Vips::GObject

finalize finalize, get(name : String, gval : GValue) get, object_ref object_ref, ref_count ref_count, release_handle release_handle, set(name : String, gval : GValue) set, signal_connect(signal : String, callback : Proc, data : Pointer(Void) = Pointer(Void).null) : LibVips::Gulong signal_connect, signal_disconnect(handler_id : LibVips::Gulong)
signal_disconnect(func : Proc, data : Pointer(Void) = Pointer(Void).null)
signal_disconnect(data : LibVips::Gpointer)
signal_disconnect

Class Method Detail

def self.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


[View source]
def self.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


[View source]
def self.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

[View source]

Instance Method Detail

def blob : Bytes #

Get the memory object held by the target when using .new_to_memory


[View source]