class Vips::Target
“‘
image.write_to_target(target, ’.jpg’)
target = Vips::Target.new_to_file(‘k2.jpg’)
“‘ruby
A target. For example:
def self.new_to_descriptor(descriptor)
-
(Target)
- the new Vips::Target
Parameters:
-
descriptor
(Integer
) -- the file descriptor
def self.new_to_descriptor(descriptor) ptr = Vips.vips_target_new_to_descriptor descriptor raise Vips::Error if ptr.null? Vips::Target.new ptr end
def self.new_to_file(filename)
-
(Target)
- the new Vips::Target
Parameters:
-
filename
(String
) -- the name of the file
def self.new_to_file(filename) raise Vips::Error, "filename is nil" if filename.nil? ptr = Vips.vips_target_new_to_file filename raise Vips::Error if ptr.null? Vips::Target.new ptr end
def self.new_to_memory
-
(Target)
- the new Vips::Target
def self.new_to_memory ptr = Vips.vips_target_new_to_memory Vips::Target.new ptr end