4 The python binding maps mostly to the C API with the 'GP_' prefix stripped.
6 Loaders adds support for loading and storing contexts into/from various image
10 -------------------------------------------------------------------------------
11 import gfxprim.loaders as loaders
13 img = loaders.Load(path, callback=None)
15 img = loaders.LoadBMP(path, callback=None)
16 img = loaders.LoadGIF(path, callback=None)
17 img = loaders.LoadJPG(path, callback=None)
18 img = loaders.LoadJP2(path, callback=None)
19 img = loaders.LoadPBM(path, callback=None)
20 img = loaders.LoadPGM(path, callback=None)
21 img = loaders.LoadPNG(path, callback=None)
22 img = loaders.LoadPNM(path, callback=None)
23 img = loaders.LoadPPM(path, callback=None)
24 img = loaders.LoadPSP(path, callback=None)
25 img = loaders.LoadTIFF(path, callback=None)
26 -------------------------------------------------------------------------------
28 Loads an image from a file.
30 First one is general purpose loader function that automatically detects the
31 file format. The format is detected from file extension first and if this
32 fails files signature is used.
34 May raise 'OSError' with errno set to 'EPERM', 'EISDIR', 'ENOENT' or any other
35 'errno' set by 'open(2)', 'read(2)', 'seek(2)'.
37 May raise 'OSError' with errno set to 'ENOSYS' on unsupported or not recognized
40 May raise 'OSError' with errno set to 'EIO' when file is damaged.
42 May raise 'OSError' with errno set to 'ECANCELED' when action was interrupted
47 -------------------------------------------------------------------------------
48 import gfxprim.loaders as loaders
50 img.loaders.Save(path, callback=None)
52 img.loaders.SaveBMP(path, callback=None)
53 img.loaders.SaveJPG(path, callback=None)
54 img.loaders.SavePBM(path, callback=None)
55 img.loaders.SavePGM(path, callback=None)
56 img.loaders.SavePNG(path, callback=None)
57 img.loaders.SavePNM(path, callback=None)
58 img.loaders.SavePPM(path, callback=None)
59 img.loaders.SaveTIFF(path, callback=None)
60 -------------------------------------------------------------------------------
64 For the Save() method the file format is derived from the extension.
66 May raise 'OSError' with errno set to 'EPERM', 'EISDIR', 'ENOENT' or any other
67 'errno' set by 'open(2)', 'write(2)', 'seek(2)'.
69 May raise 'OSError' with errno set to 'ENOSYS' on unsupported pixel type for
72 May raise 'OSError' with errno set to 'EIO' when filesystem is full.
74 May raise 'OSError' with errno set to 'ECANCELED' when action was interrupted
78 -------------------------------------------------------------------------------
79 import gfxprim.loaders as loaders
83 -------------------------------------------------------------------------------
85 Prints all loaders and their capabilites into the 'stdout'.