Gimp.Memsize

g Gimp.Memsize Gimp.Memsize

Subclasses:

None

Methods

class

deserialize (string)

class

serialize (memsize)

Virtual Methods

None

Fields

None

Class Details

class Gimp.Memsize
Abstract:

No

Functions to (de)serialize a given memory size.

classmethod deserialize(string)
Parameters:

string (str) – a string as returned by Gimp.Memsize.serialize()

Returns:

True if the string was successfully parsed and memsize has been set, False otherwise.

memsize:

return location for memory size in bytes

Return type:

(bool, memsize: int)

Parses a string representation of a memory size as returned by Gimp.Memsize.serialize().

New in version 2.2.

classmethod serialize(memsize)
Parameters:

memsize (int) – memory size in bytes

Returns:

A newly allocated string representation of memsize.

Return type:

str

Creates a string representation of a given memory size. This string can be parsed by Gimp.Memsize.deserialize() and can thus be used in config files. It should not be displayed to the user. If you need a nice human-readable string please use GLib.format_size().

New in version 2.2.