Vips.Object

g GObject.Object GObject.Object Vips.Object Vips.Object GObject.Object->Vips.Object

Subclasses:Vips.Image, Vips.Interpolate, Vips.Operation, Vips.Region

Methods

Inherited:GObject.Object (37)
Structs:Vips.ObjectClass (1), GObject.ObjectClass (5)
class get_property (gobject, property_id, value, pspec)
class install_argument (pspec, flags, priority, offset)
class new_from_string (object_class, p)
class print_all ()
class print_summary_class (klass)
class sanity_all ()
class set_property (gobject, property_id, value, pspec)
  argument_isset (name)
  argument_needsstring (name)
  build ()
  get_argument_flags (name)
  get_argument_priority (name)
  get_argument_to_string (name, arg)
  get_description ()
  local_cb (gobject)
  preclose ()
  print_dump ()
  print_name ()
  print_summary ()
  rewind ()
  sanity ()
  set_argument_from_string (name, value)
  set_from_string (string)
  set_required (value)
  set_static (static_object)
  unref_outputs ()

Virtual Methods

Inherited:GObject.Object (7)
  do_build ()
  do_close ()
  do_output_to_arg (string)
  do_postbuild (data)
  do_postclose ()
  do_preclose ()
  do_rewind ()

Properties

Name Type Flags Short Description
description str r/w Class description
nickname str r/w Class nickname

Signals

Inherited:GObject.Object (1)
Name Short Description
close The ::close signal is emitted once during object close.
postbuild The ::postbuild signal is emitted once just after successful object construction.
postclose The ::postclose signal is emitted once after object close.
preclose The ::preclose signal is emitted once just before object close starts.

Fields

Inherited:GObject.Object (1)
Name Type Access Description
argument_table {object: object} r  
close bool r  
constructed bool r  
description str r  
local_memory int r  
nickname str r  
parent_instance GObject.Object r  
postclose bool r  
static_object bool r  

Class Details

class Vips.Object(**kwargs)
Bases:GObject.Object
Abstract:Yes
Structure:Vips.ObjectClass
classmethod get_property(gobject, property_id, value, pspec)
Parameters:
classmethod install_argument(pspec, flags, priority, offset)
Parameters:
classmethod new_from_string(object_class, p)
Parameters:
Return type:

Vips.Object

classmethod print_all()
classmethod print_summary_class(klass)
Parameters:klass (Vips.ObjectClass) –
classmethod sanity_all()
classmethod set_property(gobject, property_id, value, pspec)
Parameters:
argument_isset(name)
Parameters:name (str) – arg to fetch
Returns:True if the argument has been assigned.
Return type:bool

Convenience: has an argument been assigned. Useful for bindings.

argument_needsstring(name)
Parameters:name (str) –
Return type:bool
build()
Return type:int
get_argument_flags(name)
Parameters:name (str) – arg to fetch
Returns:The Vips.ArgumentFlags for this argument.
Return type:Vips.ArgumentFlags

Convenience: get the flags for an argument. Useful for bindings.

get_argument_priority(name)
Parameters:name (str) – arg to fetch
Returns:The priority of this argument.
Return type:int

Convenience: get the priority for an argument. Useful for bindings.

get_argument_to_string(name, arg)
Parameters:
  • name (str) –
  • arg (str) –
Return type:

int

get_description()
Returns:the object description
Return type:str

Fetch the object description. Useful for language bindings.

self.description is only avaliable after _build(), which can be too late. This function fetches from the instance, if possible, but falls back to the class description if we are too early.

local_cb(gobject)
Parameters:gobject (GObject.Object) –
preclose()
print_dump()
print_name()
print_summary()
rewind()
sanity()
Return type:bool
set_argument_from_string(name, value)
Parameters:
  • name (str) –
  • value (str) –
Return type:

int

set_from_string(string)
Parameters:string (str) – arguments as a string
Returns:0 on success, -1 on error
Return type:int

Set object arguments from a string. The string can be something like “a=12”, or “a = 12, b = 13”, or “fred”. The string can optionally be enclosed in brackets.

You’d typically use this between creating the object and building it.

See also: vips_object_set(), Vips.Object.build(), vips_cache_operation_buildp().

set_required(value)
Parameters:value (str) –
Return type:int
set_static(static_object)
Parameters:static_object (bool) –
unref_outputs()

Unref all assigned output objects. Useful for language bindings.

After an object is built, all output args are owned by the caller. If something goes wrong before then, we have to unref the outputs that have been made so far. This function can also be useful for callers when they’ve finished processing outputs themselves.

See also: Vips.cache_operation_build().

do_build() virtual
Return type:int
do_close() virtual
do_output_to_arg(string) virtual
Parameters:string (str) –
Return type:int
do_postbuild(data) virtual
Parameters:data (object or None) –
Return type:int
do_postclose() virtual
do_preclose() virtual
do_rewind() virtual

Signal Details

Vips.Object.signals.close(object)
Signal Name:close
Flags:RUN_LAST
Parameters:object (Vips.Object) – The object which received the signal

The ::close signal is emitted once during object close. The object is dying and may not work.

Vips.Object.signals.postbuild(object)
Signal Name:postbuild
Flags:RUN_LAST
Parameters:object (Vips.Object) – The object which received the signal
Return type:int

The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.

Vips.Object.signals.postclose(object)
Signal Name:postclose
Flags:RUN_LAST
Parameters:object (Vips.Object) – The object which received the signal

The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.

Vips.Object.signals.preclose(object)
Signal Name:preclose
Flags:RUN_LAST
Parameters:object (Vips.Object) – The object which received the signal

The ::preclose signal is emitted once just before object close starts. The oject is still alive.

Property Details

Vips.Object.props.description
Name:description
Type:str
Default Value:''
Flags:READABLE, WRITABLE

Class description

Vips.Object.props.nickname
Name:nickname
Type:str
Default Value:''
Flags:READABLE, WRITABLE

Class nickname