class Vips::Source

def self.new_from_memory(data)

Returns:
  • (Source) - the new Vips::Source

Parameters:
  • data (String) -- memory area
def self.new_from_memory(data)
  ptr = Vips.vips_source_new_from_memory data, data.bytesize
  raise Vips::Error if ptr.null?
  # FIXME do we need to keep a ref to the underlying memory area? what
  # about Image.new_from_buffer? Does that need a secret ref too?
  Vips::Source.new ptr
end