Gimp.ExportProcedure

g GObject.Object GObject.Object Gimp.Procedure Gimp.Procedure GObject.Object->Gimp.Procedure Gimp.ExportProcedure Gimp.ExportProcedure Gimp.FileProcedure Gimp.FileProcedure Gimp.FileProcedure->Gimp.ExportProcedure Gimp.Procedure->Gimp.FileProcedure

Subclasses:

None

Methods

Inherited:

Gimp.FileProcedure (14), Gimp.Procedure (145), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (plug_in, name, proc_type, export_metadata, run_func, *run_data)

get_support_comment ()

get_support_exif ()

get_support_iptc ()

get_support_profile ()

get_support_thumbnail ()

get_support_xmp ()

set_capabilities (capabilities, get_capabilities_func, *get_capabilities_data)

set_support_comment (supports)

set_support_exif (supports)

set_support_iptc (supports)

set_support_profile (supports)

set_support_thumbnail (supports)

set_support_xmp (supports)

Virtual Methods

Inherited:

Gimp.Procedure (4), GObject.Object (7)

Properties

Inherited:

Gimp.Procedure (3)

Name

Type

Flags

Short Description

capabilities

Gimp.ExportCapabilities

r/w/c

supports-comment

bool

r/w/c

supports-exif

bool

r/w/c

supports-iptc

bool

r/w/c

supports-profile

bool

r/w/c

supports-thumbnail

bool

r/w/c

supports-xmp

bool

r/w/c

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gimp.ExportProcedure(**kwargs)
Bases:

Gimp.FileProcedure

Abstract:

No

Structure:

Gimp.ExportProcedureClass

Export procedures implement image export.

Registered export procedures will be automatically available in the export interfaces and functions of GIMP. The detection (to decide which file is redirected to which plug-in procedure) depends on the various methods set with [class`FileProcedure`] API.

classmethod new(plug_in, name, proc_type, export_metadata, run_func, *run_data)
Parameters:
Returns:

a new Gimp.Procedure.

Return type:

Gimp.Procedure

Creates a new export procedure named name which will call run_func when invoked.

See Gimp.Procedure.new() for information about proc_type.

Gimp.ExportProcedure is a Gimp.Procedure subclass that makes it easier to write file export procedures.

It automatically adds the standard

(Gimp.RunMode, Gimp.Image, Gio.File, Gimp.ExportOptions)

arguments of an export procedure. It is possible to add additional arguments.

When invoked via Gimp.Procedure.run(), it unpacks these standard arguments and calls run_func which is a Gimp.RunExportFunc. The Gimp.ProcedureConfig of Gimp.RunExportFunc only contains additionally added arguments.

If export_metadata is True, then the class will also handle the metadata export if the format is supported by our backend. This requires you to also set appropriate MimeType with Gimp.FileProcedure.set_mime_types().

New in version 3.0.

get_support_comment()
Returns:

True if self supports comment exporting.

Return type:

bool

New in version 3.0.

get_support_exif()
Returns:

True if self supports Exif exporting.

Return type:

bool

New in version 3.0.

get_support_iptc()
Returns:

True if self supports IPTC exporting.

Return type:

bool

New in version 3.0.

get_support_profile()
Returns:

True if self supports ICC color profile exporting.

Return type:

bool

New in version 3.0.

get_support_thumbnail()
Returns:

True if self supports thumbnail exporting.

Return type:

bool

New in version 3.0.

get_support_xmp()
Returns:

True if self supports XMP exporting.

Return type:

bool

New in version 3.0.

set_capabilities(capabilities, get_capabilities_func, *get_capabilities_data)
Parameters:

Sets default Gimp.ExportCapabilities for image export.

capabilities and get_capabilities_func are overlapping arguments. Either set capabilities if your format capabilities are stable or get_capabilities_func if they depend on other options. If get_capabilities_func is set, capabilities must be 0.

If set, get_capabilities_func will be called every time an argument in the [class`Gimp`.ProcedureConfig] is edited and it will be used to edit the export capabilities dynamically.

New in version 3.0.

set_support_comment(supports)
Parameters:

supports (bool) – whether a comment can be stored.

Determine whether self supports exporting a comment. By default, it won’t (so there is usually no reason to run this function with False).

This will have several consequences:

  • Automatically adds a standard argument “include-comment” in the end of the argument list of self, with relevant blurb and description.

  • If used with other gimp_export_procedure_set_support_*() functions, they will always be ordered the same (the order of the calls don’t matter), keeping all export procedures consistent.

  • Generated GimpExportProcedureDialog will contain the metadata options, once again always in the same order and with consistent GUI style across plug-ins.

  • API from [class`ProcedureConfig`] will automatically process these properties to decide whether to export a given metadata or not.

By default, the value will be [func`export_comment`].

New in version 3.0.

set_support_exif(supports)
Parameters:

supports (bool) – whether Exif metadata are supported.

Determine whether self supports exporting Exif data. By default, it won’t (so there is usually no reason to run this function with False).

This will have several consequences:

  • Automatically adds a standard argument “include-exif” in the end of the argument list of self, with relevant blurb and description.

  • If used with other gimp_export_procedure_set_support_*() functions, they will always be ordered the same (the order of the calls don’t matter), keeping all export procedures consistent.

  • Generated GimpExportProcedureDialog will contain the metadata options, once again always in the same order and with consistent GUI style across plug-ins.

  • API from [class`ProcedureConfig`] will automatically process these properties to decide whether to export a given metadata or not.

By default, the value will be [func`export_exif`].

New in version 3.0.

set_support_iptc(supports)
Parameters:

supports (bool) – whether IPTC metadata are supported.

Determine whether self supports exporting IPTC data. By default, it won’t (so there is usually no reason to run this function with False).

This will have several consequences:

  • Automatically adds a standard argument “include-iptc” in the end of the argument list of self, with relevant blurb and description.

  • If used with other gimp_export_procedure_set_support_*() functions, they will always be ordered the same (the order of the calls don’t matter), keeping all export procedures consistent.

  • Generated GimpExportProcedureDialog will contain the metadata options, once again always in the same order and with consistent GUI style across plug-ins.

  • API from [class`ProcedureConfig`] will automatically process these properties to decide whether to export a given metadata or not.

By default, the value will be [func`export_iptc`].

New in version 3.0.

set_support_profile(supports)
Parameters:

supports (bool) – whether color profiles can be stored.

Determine whether self supports exporting ICC color profiles. By default, it won’t (so there is usually no reason to run this function with False).

This will have several consequences:

  • Automatically adds a standard argument “include-color-profile” in the end of the argument list of self, with relevant blurb and description.

  • If used with other gimp_export_procedure_set_support_*() functions, they will always be ordered the same (the order of the calls don’t matter), keeping all export procedures consistent.

  • Generated GimpExportProcedureDialog will contain the metadata options, once again always in the same order and with consistent GUI style across plug-ins.

  • API from [class`ProcedureConfig`] will automatically process these properties to decide whether to export a given metadata or not.

By default, the value will be [func`export_color_profile`].

New in version 3.0.

set_support_thumbnail(supports)
Parameters:

supports (bool) – whether a thumbnail can be stored.

Determine whether self supports exporting a thumbnail. By default, it won’t (so there is usually no reason to run this function with False).

This will have several consequences:

  • Automatically adds a standard argument “include-thumbnail” in the end of the argument list of self, with relevant blurb and description.

  • If used with other gimp_export_procedure_set_support_*() functions, they will always be ordered the same (the order of the calls don’t matter), keeping all export procedures consistent.

  • Generated GimpExportProcedureDialog will contain the metadata options, once again always in the same order and with consistent GUI style across plug-ins.

  • API from [class`ProcedureConfig`] will automatically process these properties to decide whether to export a given metadata or not.

By default, the value will be [func`export_thumbnail`].

New in version 3.0.

set_support_xmp(supports)
Parameters:

supports (bool) – whether XMP metadata are supported.

Determine whether self supports exporting XMP data. By default, it won’t (so there is usually no reason to run this function with False).

This will have several consequences:

  • Automatically adds a standard argument “include-xmp” in the end of the argument list of self, with relevant blurb and description.

  • If used with other gimp_export_procedure_set_support_*() functions, they will always be ordered the same (the order of the calls don’t matter), keeping all export procedures consistent.

  • Generated GimpExportProcedureDialog will contain the metadata options, once again always in the same order and with consistent GUI style across plug-ins.

  • API from [class`ProcedureConfig`] will automatically process these properties to decide whether to export a given metadata or not.

By default, the value will be [func`export_xmp`].

New in version 3.0.

Property Details

Gimp.ExportProcedure.props.capabilities
Name:

capabilities

Type:

Gimp.ExportCapabilities

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT

What Gimp.ExportCapabilities are supported

New in version 3.0.0.

Gimp.ExportProcedure.props.supports_comment
Name:

supports-comment

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether the export procedure supports storing a comment.

New in version 3.0.0.

Gimp.ExportProcedure.props.supports_exif
Name:

supports-exif

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether the export procedure supports EXIF.

New in version 3.0.0.

Gimp.ExportProcedure.props.supports_iptc
Name:

supports-iptc

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether the export procedure supports IPTC.

New in version 3.0.0.

Gimp.ExportProcedure.props.supports_profile
Name:

supports-profile

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether the export procedure supports ICC color profiles.

New in version 3.0.0.

Gimp.ExportProcedure.props.supports_thumbnail
Name:

supports-thumbnail

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether the export procedure supports storing a thumbnail.

New in version 3.0.0.

Gimp.ExportProcedure.props.supports_xmp
Name:

supports-xmp

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether the export procedure supports XMP.

New in version 3.0.0.