Comment installer et programmer des scripts Python dans Gimp

Transcription

Comment installer et programmer des scripts Python dans Gimp
Comment installer et programmer ses premiers scripts Python
dans Gimp ?
VV
v1.06
Table des matières
1 Introduction
3
2 Installer Gimp Avec Windows (Gimp v2.8 et plus récentes)
3
3 Installer Gimp Avec Windows (Gimp v2.4 et précédentes)
4
4 Installer Gimp avec Linux Ubuntu
5
5 Installer Gimp avec Mac OS X
6
5.1 Mac OS 10.4 (Tiger) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
5.2 Mac OS 10.5 (Léopard) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
6 Installer de nouveaux scripts Python dans Gimp
6
7 Installer des librairies complémentaires pour Python
8
7.1 Sous Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8 Console Python de Gimp
8
9
9 Comment connaitre la version de Python ?
10
10 Répertoires
11
10.1 Répertoires où sont rangés les fichiers créés par les scripts . . . . . . . . . . . . . . . . .
11
10.2 Récupérer les répertoires de Gimp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
10.3 Récupérer le chemin du dossier utilisateur courant . . . . . . . . . . . . . . . . . . . . . .
11
10.4 Récupérer le chemin de l’image reçue . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
10.5 Récupérer le chemin courant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
10.6 Récupérer le chemin où sont rangés les greffons Gimp . . . . . . . . . . . . . . . . . . . .
12
11 Relier les scripts aux menus de Gimp
11.1 Autres emplacements que le menu “Image" . . . . . . . . . . . . . . . . . . . . . . . . . .
13
13
Distribué sous licence CC by-nc-sa
www.VVpix.com
12 Saisie de données pour le programme
15
12.1 Exemple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
12.2 Autres exemples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
13 Accès à la documentation
17
14 Utiliser du code qui n’est pas dans le dossier des greffons
18
15 Aiguillage de l’affichage des messages Gimp
20
16 Gimp Procedurial DataBase
21
16.1 Navigateur de procédures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17 Images
21
23
17.1 Créer une image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
17.2 Définir le nom d’une image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
17.3 Récupérer une image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
17.3.1 à partir de la liste des images de Gimp . . . . . . . . . . . . . . . . . . . . . . . . .
23
17.3.2 à partir d’un calque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
17.3.3 Détail d’une image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
17.4 Ouverture / fermeture d’une image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
17.5 Affichage d’une image dans une vue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
18 Calques
25
18.1 Calculer la position d’un calque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
18.2 Déterminer le type d’un calque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
18.3 Récupérer la position d’un calque dans une image . . . . . . . . . . . . . . . . . . . . . .
25
18.4 Parcourir la liste des calques d’un groupe de calques . . . . . . . . . . . . . . . . . . . . .
25
18.5 Créer et ajouter un calque dans une image . . . . . . . . . . . . . . . . . . . . . . . . . .
26
18.6 Récupération des calques de l’image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
18.7 Récupérer le calque actif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
18.8 Choisir un calque comme actif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
18.9 Supprimer un calque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
18.10Dessiner sur un calque
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
18.10.1... sur un calque RGBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
18.10.2... sur un calque RGB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
18.11Mettre à jour l’affichage d’un calque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
19 Chemins (vectoriels)
28
19.1 Récupérer le chemin actif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Distribué sous licence CC by-nc-sa
28
page 2 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
19.2 Ajouter un chemin (gimp.Vectors) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
19.3 Supprimer un chemin (gimp.Vectors) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
19.4 Changer le nom d’un chemin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
19.5 Ajouter des points dans un chemin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
19.5.1 Ajouter une ligne brisée . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
19.5.2 Ajouter une spline cubique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
19.5.3 Création depuis une liste de points . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
19.6 Liste de propriétés et méthodes disponibles sur un stroke . . . . . . . . . . . . . . . . . .
29
19.7 Accéder aux points d’une (ligne brisée) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
19.8 Supprimer un “stroke" d’un “gimp.Vectors" . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
19.9 Récupération des chemins (gimp.Vectors) . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
19.10Liste de propriétés et méthodes disponibles sur un gimp.Vectors . . . . . . . . . . . . . .
30
19.11gimp.VectorsBezierStroke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
20 Selections
32
21 Accès rapide aux pixels
33
22 Barre de progression
34
23 Exemples de manipulation des images
35
23.1 Création d’images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
23.2 Utilisation des calques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
23.3 Parcours de la liste des calques et groupes de calque . . . . . . . . . . . . . . . . . . . .
36
23.3.1 Modification des textes de calque . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
23.3.2 Écriture de texte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
23.4 Manipulation des sélections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
23.5 Utilisation des sélections enregistrées dans un canal . . . . . . . . . . . . . . . . . . . . .
38
23.6 Manipulation des guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
24 Annexes
40
24.1 Module gimp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
24.2 Module gimp.pdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
24.3 Enumération gimpenums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
24.4 Module gimpfu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
24.5 Liens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
79
Distribué sous licence CC by-nc-sa
page 3 / 79
Distribué sous licence CC by-nc-sa
1
www.VVpix.com
Introduction
Gimp signifie GNU Image Manipulation Program. C’est un programme de manipulation d’images libre,
gratuit et multiplateformes (Linux, Mac, Windows).
Ce document indique comment écrire ses premiers scripts Python pour Gimp v2.4 et v2.6. Entre ces
deux versions, les menus où se trouvent les scripts Python changent un peu, mais le fonctionnement
est identique. Ce document intègre les copies d’écran pour les deux versions.
Installations
2
Installer Gimp Avec Windows (Gimp v2.8 et plus récentes)
A partir de la version 2.8, il suffit de l’installer à partir de cette adresse : http://www.gimp.org/
Tous les composants necéssaires au fonctionnement des scripts Python sont intégrés par l’installeur
par défaut.
3
Installer Gimp Avec Windows (Gimp v2.4 et précédentes)
Pour avoir accès à Python avec Gimp, sous Windows, il faut installer Python, pyGTK, et seulement
ensuite installer Gimp.
Python est téléchargeable à cette adresse : http://www.python.org/
pyGTK est disponible à cette adresse : http://www.pygtk.org/
Après l’installation de Python, il faut installer les librairies suivantes :
– PyCairo
– PyGObject
– PyGTK
Enfin, la dernière version de Gimp est disponible ici : http://www.gimp.org/.
L’installation s’est bien passée si le menu “Exts" de
Gimp 2.4 contient l’élément “Python-fu" (voir figure 1
ci-contre).
F IGURE 1 – Menu “exts" de Gimp 2.4
Distribué sous licence CC by-nc-sa
page 4 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
Avec Gimp 2.6, le sous-menu “Python-fu"
a été déplacé dans le menu “Filtres" des
images (voir figure 2 ci-contre).
F IGURE 2 – Menu “Filtres" d’une image Gimp 2.6
4
Installer Gimp avec Linux Ubuntu
Avec Linux Ubuntu 8.04, par exemple, il n’y a rien à faire, Gimp 2.4 est déjà installé pour supporter les
scripts Python.
Comme avec Windows, Gimp est configuré pour accepter les scripts Python si le menu “Exts" de Gimp
(v2.4) contient l’élément “Python-fu" (voir figure 3 cicontre).
F IGURE 3 – Menu “exts" de Gimp
Distribué sous licence CC by-nc-sa
page 5 / 79
Distribué sous licence CC by-nc-sa
5
5.1
www.VVpix.com
Installer Gimp avec Mac OS X
Mac OS 10.4 (Tiger)
Avant d’installer Gimp il faut installer le gestionnaire de fenêtres X11 sur cette machine (X11 est livré
sur le CD d’installation de Tiger).
5.2
Mac OS 10.5 (Léopard)
Comme avec Linux Ubuntu, Gimp 2.6 est déjà installé pour supporter les scripts Python.
6
Installer de nouveaux scripts Python dans Gimp
Les scripts Python sont rangés dans la catégorie “Plug-in" ou “Greffons", en français.
Un script Python est matérialisé par un ou plusieurs fichiers texte avec une extension “.py".
Pour installer un tel script dans Gimp, il suffit de copier le fichier “.py" dans un des dossiers de greffons
de Gimp.
Les dossiers des greffons sont configurables dans les préférences de Gimp (voir figure 6). On accède à
cette fenêtre par le menu “Fichier / Préférences" (voir figure 4), pour Gimp v2.4, ou par le menu “Edition
/ Préférence" d’une image (voir figure 5) à partir de Gimp v2.6.
F IGURE 4 – Accès aux préférences de
Gimp v2.4
F IGURE 5 – Accès aux préférences de Gimp v2.6
Distribué sous licence CC by-nc-sa
page 6 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
F IGURE 6 – Chemins configurés pour les greffons
Une fois que le chemin des greffons est configuré (il est préférable d’en ajouter un nouveau pour ne pas
interférer avec les éventuelles installations / désinstallation de Gimp), et que le ou les fichiers “.py" sont
copiés dans ce dossier, il suffit de redémarrer Gimp pour qu’ils soient pris en compte.
Les modifications des scripts pendant que Gimp est exécuté sont prises en compte tant que l’on ne
casse pas la structure du programme.
Attention, sous Linux et Max OS X il faut s’assurer que les fichiers “.py" ont bien les droits en exécution,
sinon Gimp ne les prendra pas en compte (à la différence de Blender qui accepte les scripts Python
sans cette permission).
Pour les adeptes du terminal (ou les utilisateurs Mac) il faut utiliser la commande
chmod +x script.py. Pour les autres qui
sont sous Linux il suffit de choisir les
permissions dans le navigateur de fichier
(voir figure 7, ci-contre).
F IGURE 7 – Autorisation d’exécution des scripts sous Linux
Distribué sous licence CC by-nc-sa
page 7 / 79
Distribué sous licence CC by-nc-sa
7
7.1
www.VVpix.com
Installer des librairies complémentaires pour Python
Sous Windows
Si on souhaite par exemple installer la librairie Python “Numpy", on peut déjà l’installer dans un Python
local (autonome), de la même version que celui utilisé par Gimp (Gimp 2.8.6 utilise Python 2.7).
Installer par exemple une version “Numpy MKL" (Math Kernel Library) de Christoph Gohlke, ici : http:
//www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
Elle s’installera à l’emplacement figure 8. Il suffit ensuite de copier le fichier et le dossier numpy vers
l’installation Python de Gimp pour que numpy fonctionne aussi pour Gimp (voir figure 9)
F IGURE 9 – Copie des fichiers Numpy dans l’arborescence de Gimp
F IGURE 8 – Installation de Numpy MKL sous
Windows, pour Python 2.7
Enfin, on teste dans Gimp...
Dans le menu \Filtres\Python-Fu\Console,
taper import numpy.
Si l’installation s’est bien passée, on ne doit
avoir aucune erreur en retour.
F IGURE 10 – Test numpy dans Gimp
Distribué sous licence CC by-nc-sa
page 8 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
Programmer des scripts Python
8
Console Python de Gimp
Dans Gimp 2.6.x, la console Python est accessible par le menu “Filtres \ Python-Fu \ Console".
La console Python de Gimp permet d’écrire et de tester des instruction Python avec l’API Gimp sans
écrire de programme. Les seules instructions dir(...) et help(...) de Gimp permettent de récupérer
beaucoup d’informations.
Par exemple :
1
3
5
7
9
11
13
15
17
19
21
23
25
27
>>> d i r ( gimp )
[ ’ Channel ’ , ’ D i s p l a y ’ , ’ Drawable ’ , ’ Image ’ , ’ Layer ’ , ’ P a r a s i t e ’ , ’ P i x e l F e t c h e r ’ , ’
PixelRgn ’ , ’ T i l e ’ , ’ V e c t o r s ’ , ’ V e c t o r s B e z i e r S t r o k e ’ , ’ _PyGimp_API ’ , ’ __doc__ ’ ,
’ _ _ f i l e _ _ ’ , ’ __name__ ’ , ’ _ i d 2 d i s p l a y ’ , ’ _id2drawable ’ , ’ _id2image ’ , ’
_id2vectors ’ , ’ attach_new_parasite ’ ,
’ check_size ’ , ’ check_type ’ , ’ checks_get_shades ’ ,
’ c o n t e x t _ g e t _ g r a d i e n t ’ , ’ context_pop ’ , ’ context_push ’ , ’ c o n t e x t _ s e t _ g r a d i e n t ’ ,
’ data_directory ’ , ’ default_display ’ , ’ delete ’ , ’ directory ’ ,
’ display_name ’ , ’ d i s p l a y s _ f l u s h ’ , ’ d i s p l a y s _ r e c o n n e c t ’ ,
’ domain_register ’ , ’ e r r o r ’ , ’ e x i t ’ , ’ extension_ack ’ , ’ extension_enable ’ , ’
e x t e n s i o n _ p r o c e s s ’ , ’ f o n t s _ g e t _ l i s t ’ , ’ f o n t s _ r e f r e s h ’ , ’gamma ’ , ’ get_background
’ , ’ g e t _ d a t a ’ , ’ g e t _ f o r e g r o u n d ’ , ’ get_progname ’ ,
’ gradient_get_custom_samples ’ , ’ g r a d i e n t _ g e t _ u n i f o r m _ s a m p l e s ’ , ’
g r a d i e n t s _ g e t _ g r a d i e n t ’ , ’ g r a d i e n t s _ g e t _ l i s t ’ , ’ gradients_sample_custom ’ , ’
gradients_sample_uniform ’ , ’ gradients_set_gradient ’ ,
’ gtkrc ’ ,
’ image_list ’ ,
’ install_cmap ’ , ’ install_procedure ’ , ’ install_temp_proc ’ ,
’ locale_directory ’ ,
’ main ’ ,
’ m e n u _ r e g i s t e r ’ , ’ message ’ , ’ m i n _ c o l o r s ’ ,
’ monitor_number ’ ,
’ parasite_attach ’ , ’ parasite_detach ’ , ’ parasite_find ’ , ’ p a r a s i t e _ l i s t ’ ,
’ pdb ’ ,
’ personal_rc_file ’ , ’ plug_in_directory ’ ,
’ p r o g r e s s _ i n i t ’ , ’ p r o g r e s s _ i n s t a l l ’ , ’ p r o g r e s s _ u n i n s t a l l ’ , ’ progress_update ’ ,
’ quit ’ ,
’ register_load_handler ’ , ’ register_magic_load_handler ’ , ’ register_save_handler ’ ,
’ set_background ’ , ’ s e t _ d a t a ’ , ’ s e t _ f o r e g r o u n d ’ ,
’ show_help_button ’ , ’ s h o w _ t o o l _ t i p s ’ ,
’ sysconf_directory ’ ,
’ tile_cache_ntiles ’ , ’ tile_cache_size ’ , ’ tile_height ’ , ’ tile_width ’ ,
’ uninstall_temp_proc ’ , ’ user_directory ’ ,
’ v e c t o r s _ i m p o r t _ f r o m _ f i l e ’ , ’ v e c t o r s _ i m p o r t _ f r o m _ s t r i n g ’ , ’ v e r s i o n ’ , ’ wm_class ’ ]
Voir aussi en annexe les listings 20, 22 et 23, pages 40, 65 et 70.
Distribué sous licence CC by-nc-sa
page 9 / 79
Distribué sous licence CC by-nc-sa
9
www.VVpix.com
Comment connaitre la version de Python ?
1
i m p o r t sys
3
p r i n t ( sys . v e r s i o n )
Distribué sous licence CC by-nc-sa
page 10 / 79
Distribué sous licence CC by-nc-sa
10
10.1
www.VVpix.com
Répertoires
Répertoires où sont rangés les fichiers créés par les scripts
Dans la console il suffit de taper :
1
i m p o r t os
p r i n t os . getcwd ( )
Résultat (sous Windows XP) : C:\Documents and Settings\[user]\Mes documents\Mes images
10.2
Récupérer les répertoires de Gimp
Dans la console, par exemple (résultats avec Windows XP) :
Listing 1 – Fonctions de récupération des chemins
2
4
6
i m p o r t gimp
p r i n t gimp . l o c a l e _ d i r e c t o r y # C : \ Program F i l e s \ GIMP−2.0\ share \ l o c a l e
p r i n t gimp . p l u g _ i n _ d i r e c t o r y #C : \ Program F i l e s \ GIMP−2.0\ l i b \ gimp \ 2 . 0
p r i n t gimp . u s e r _ d i r e c t o r y ( numero ) # chemin s u i v a n t ‘ ‘ numero " de 0 à 12
p r i n t gimp . s y s c o n f _ d i r e c t o r y #C : \ Program F i l e s \ GIMP−2.0\ e t c \ gimp \ 2 . 0
p r i n t gimp . d a t a _ d i r e c t o r y #C : \ Program F i l e s \ GIMP−2.0\ share \ gimp \ 2 . 0
p r i n t gimp . d i r e c t o r y #C : \ Documents and S e t t i n g s \ [ user ] \ . gimp −2.6
A la ligne 4 du listing 1, on peut utiliser la liste ci-dessous.
’USER_DIRECTORY_DESKTOP’,
’USER_DIRECTORY_DOCUMENTS’,
’USER_DIRECTORY_DOWNLOAD’,
’USER_DIRECTORY_MUSIC’,
’USER_DIRECTORY_PICTURES’,
’USER_DIRECTORY_PUBLIC_SHARE’,
’USER_DIRECTORY_TEMPLATES’,
’USER_DIRECTORY_VIDEOS’,
10.3
Récupérer le chemin du dossier utilisateur courant
On peut procéder comme ceci :
1
s t r C h e m i n _ u t i l i s a t e u r = os . path . j o i n ( gimp . d i r e c t o r y , " . . " )
s t r N o m _ f i c h i e r _ l o g = os . path . j o i n ( s t r C h e m i n _ u t i l i s a t e u r , " m o n _ f i c h i e r . l o g " )
10.4
Récupérer le chemin de l’image reçue
2
4
d e f f o n c t i o n _ p r i n c i p a l e ( inImage , nParam1 , nParamX ) :
strNom_complet_img = inImage . f i l e n a m e
lstNom = os . path . s p l i t ( strNom_complet_img )
strChemin_img = lstNom [ 0 ]
...
Distribué sous licence CC by-nc-sa
page 11 / 79
Distribué sous licence CC by-nc-sa
10.5
www.VVpix.com
Récupérer le chemin courant
Pour débuguer il est pratique d’écrire une trace dans un fichier, comme ceci :
1
3
5
s t r C h e m i n _ u t i l i s a t e u r = os . path . j o i n ( gimp . d i r e c t o r y , " . . " )
f l o g = open ( os . path . j o i n ( s t r C h e m i n _ u t i l i s a t e u r , " t r a c e s _ m o n _ s c r i p t . l o g " ) , "w" )
f l o g . w r i t e ( " Debut l o g \ n " )
...
f l o g . close ( )
Pour localiser dans quel chemin est enregistré ce fichier, il suffit de taper dans la console :
import os
print os.getcwd() # ou getcwdu() pour avoir le chemin en unicode
Résultat sous Windows : C:\Documents and Settings\[User]\Mes documents\Mes images
10.6
Récupérer le chemin où sont rangés les greffons Gimp
Pour obtenir ce chemin, il suffit de connaitre le nom d’un plugin et d’appeler :
gimp.pdb.gimp_plugins_query( [NOM] ).
Par exemple :
gimp.pdb.gimp_plugins_query("Chow")
(1,
(’<Image>/Python-Fu/Couleurs/Binariser par Chow Kaneko...’,),
1,
(’’,),
1,
(’D:\\_Code\\_Greffons_Gimp\\image-couleurs_binariser_Chow_et_Kaneko_1_05.py’,),
1,
(’’,),
1,
(1341989576,),
1,
(’python-fu-binariser-Chow-et-Kaneko’,))
Exemple de procédure complète :
Listing 2 – Récupérer le chemin des greffons utilisateurs à partir d’un nom de Greffon connu
1
3
5
d e f getChemin_greffons ( ) :
[ nb1 , strMenuPath , nb2 , strKeyAcc , nb3 , tuNom_complet_greffon , nb3 , nType , nb4 ,
n T i m e _ i n s t a l l e d , nb5 , s t r N o m _ i n t e r n e ] = gimp . pdb . gimp_plugins_query ( "Chow" )
strNom_complet_greffon = tuNom_complet_greffon [ 0 ]
strChemin = os . path . dirname ( strNom_complet_greffon )
r e t u r n strChemin
Distribué sous licence CC by-nc-sa
page 12 / 79
Distribué sous licence CC by-nc-sa
11
www.VVpix.com
Relier les scripts aux menus de Gimp
Gimp est correctement configuré pour accepter les scripts Python, les scripts sont installés, mais où
sont-ils dans Gimp ? Comment les exécuter ?
A l’aide d’un éditeur de texte, il faut ouvrir le fichier “.py" principal du script et localiser son bloc “register"
(à la fin du fichier .py).
Ce bloc, comme dans le listing 3, indique où le script s’insèrera dans les menu de Gimp.
Ici, la ligne 10, indique que le script peut être appelé par le menu “Python-fu - Decouper en rectangles..."
de n’importe quelle image (voir figure 11).
Listing 3 – Exemple de bloc “register" du script “image_decoupage.py"
1
[...]
3
register (
" python_fu_decouper " , # Nom de l a f o n c t i o n
" Decoupe c e t t e image en r e c t a n g l e s " , # pas d ’ accents i c i
" Decoupe c e t t e image en r e c t a n g l e s " , # pas d ’ accents i c i
" VVpix " ,
"GPL License " ,
" 2008 " ,
" <Image > / Python−Fu / Decouper en r e c t a n g l e s . . . " , # pas d ’ accents i c i
" " , # r e s t r i c t i o n du t y p e d ’ image , par exemple "GRAY∗ "
[
( PF_IMAGE , " inImage " , " I n p u t image " , None ) ,
( PF_INT , " n L a r g e u r T e x t u r e " , " Largeur t e x t u r e " , 256) ,
( PF_INT , " nHauteurTexture " , " Hauteur t e x t u r e " , 256) ,
],
[] ,
decouper ,
menu= " <Image > / Python−Fu / Découper en r e c t a n g l e s . . . " ,
)
5
7
9
11
13
15
17
19
F IGURE 11 – Appel du script listing 3
11.1
Autres emplacements que le menu “Image"
Dans le listing 3 (précédent) page 13, ligne 10, les éléments sont reliés au menu “Image" par la syntaxe
<Image>. On peut aussi le relier au menu contextuel des éléments suivants :
Distribué sous licence CC by-nc-sa
page 13 / 79
Distribué sous licence CC by-nc-sa
<Brushes>
<Fonts>
<Gradients>
<Image>
<Load>
Distribué sous licence CC by-nc-sa
www.VVpix.com
<Palettes>
<Save>
<Toolbox>
<Vectors>
page 14 / 79
Distribué sous licence CC by-nc-sa
12
www.VVpix.com
Saisie de données pour le programme
Comme on le voit dans le listing 3, page 13, ligne 14, on peut saisir des données pour l’exécution du
script.
Les données saisissables commencent par PF.
Pour connaitre la liste des valeurs possible, taper dans la console Python de Gimp :
import gimpfu
dir(gimpfu)
On voit alors apparaitre la liste suivante (qui commence par “PF") :
GIMP 2.8.4 Python Console
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
...
’PF_ADJUSTMENT’, ’PF_BOOL’, ’PF_BRUSH’, ’PF_CHANNEL’, ’PF_COLOR’,
’PF_COLOUR’, ’PF_DIRNAME’, ’PF_DISPLAY’, ’PF_DRAWABLE’, ’PF_FILE’,
’PF_FILENAME’, ’PF_FLOAT’, ’PF_FONT’, ’PF_GRADIENT’, ’PF_IMAGE’,
’PF_INT’, ’PF_INT16’, ’PF_INT32’, ’PF_INT8’,
’PF_ITEM’, ’PF_LAYER’,
’PF_OPTION’, ’PF_PALETTE’, ’PF_PATTERN’, ’PF_RADIO’, ’PF_SLIDER’,
’PF_SPINNER’, ’PF_STRING’, ’PF_TEXT’, ’PF_TOGGLE’, ’PF_VALUE’, ’PF_VECTORS’
Voir aussi le détail des valeurs de cette énumération en annexe, listing 23, page 70, avec la commande
help(gimpfu}.
12.1
Exemple
2
4
6
8
10
12
14
16
18
20
d e f t r a i t e r _ c a l q u e _ a c t i f ( inImage , s t r C h o i x _ t r a i t e m e n t ,
strNom_fichier_element_structurant ) :
pass
register (
" E r o d e _ o u _ d i l a t e _ l e _ c a l q u e _ a c t i f " , # T i t r e de l a b o i t e de d i a l o g u e
" Erode ou d i l a t e l e calque a c t i f avec avec l ’ element s t r u c t u r a n t s e l e c t i o n n e " , #
pas d ’ accents i c i
" Erode ou d i l a t e l e calque a c t i f avec avec l ’ element s t r u c t u r a n t s e l e c t i o n n e " , #
pas d ’ accents i c i
"" ,
"" ,
" 2011 " ,
" <Image > / Python−Fu / Eroder ou d i l a t e r l e calque a c t i f . . . " , # pas d ’ accents i c i
"" ,
[
( PF_IMAGE , " inImage " , " Image a t r a i t e r : " , None ) ,
( PF_RADIO , " s t r C h o i x _ t r a i t e m e n t " , " T r a i t e m e n t : " , " e r o d e r " , ( ( " e r o d e r " , " e r o d e r "
) , ( " dilater " , " dilater " ) ) ) ,
( PF_FILENAME , " s t r N o m _ f i c h i e r _ e l e m e n t _ s t r u c t u r a n t " , " F i c h i e r element s t r u c t u r a n t
: " , " e l e m e n t _ s t r u c t _ 4 5 d e g . csv " ) , # pas d ’ accents i c i ,
],
[] , # resultats
traiter_calque_actif ,
menu= " <Image > / Python−Fu / Eroder ou d i l a t e r l e calque a c t i f " ,
Distribué sous licence CC by-nc-sa
page 15 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
)
22
main ( )
Ce qui produit le dialogue ci-contre :
F IGURE 12 – Choix d’un traitement et d’un fichier
12.2
Autres exemples
[
( PF_IMAGE , " inImage " , " Image " , None ) ,
( PF_RADIO , " s t r C h o i x _ t r a i t e m e n t " , " T r a i t e m e n t : " , " image " , ( ( " image s e u l e " , "
image " ) , ( " t o u t e s l e s images du d o s s i e r " , " d o s s i e r " ) ) ) ,
( PF_RADIO , " n C h o i x _ t a i l l e _ m a t r i c e " , " T a i l l e de l a m a t r i c e : " , 16 , ( ( " 16x16 "
, 16 ) , ( " 32x32 " , 32 ) , ( " 64x64 " , 64 ) , ( " 128x128 " , 128 ) , ( " 256x256 "
, 256 ) ) ) ,
(PF_DIRNAME, " strChemin_images " , " D o s s i e r " , os . getcwd ( ) ) ,
( PF_INT , " n c T a i l l e _ b l o c " , " T a i l l e des b l o c s ( p i x e l s ) " , 32) ,
(PF_COLOR, " d a r k _ c o l o r " , " P i c k t h e dark c o l o u r " , ( 0 , 0 , 0 ) ) ,
(PF_COLOR, " d a r k _ c o l o r _ t a r g e t " , " r e p l a c e dark w i t h " , ( 7 , 7 , 7 ) ) ,
( PF_STRING , " s t r N o m F i c h i e r " , " F i c h i e r element s t r u c t u r a n t a e x p o r t e r " , " " ) ,
(PF_TOGGLE, " bRemplacer_calque_src " , " Remplacer l e calque source ? " ,
True ) ,
2
4
6
8
10
]
Distribué sous licence CC by-nc-sa
page 16 / 79
Distribué sous licence CC by-nc-sa
13
www.VVpix.com
Accès à la documentation
La documentation pour programmer avec Gimp se trouve dans la partie “Développement" de Gimp
(http://www.gimp.org/).
La racine de l’API se trouve ici : http://developer.gimp.org/api/2.0/libgimp/index.html
La section suivante donne quelques exemples simples d’utilisation de cette API, sinon, internet regorge
de documentation sur Python, et il est assez facile de trouver d’autres scripts Python pour Gimp à
étudier, avec un moteur de recherche.
Pour la documentation des fonctions de la Procedurial DataBase, voir la section 16.1 “navigateur de
procedures" , page 21.
Distribué sous licence CC by-nc-sa
page 17 / 79
Distribué sous licence CC by-nc-sa
14
www.VVpix.com
Utiliser du code qui n’est pas dans le dossier des greffons
Listing 4 – Corps principal du greffon
1
3
# −∗− coding : l a t i n −1 −∗−
# ! / u s r / b i n / env python
from gimpfu i m p o r t ∗
from gimpenums i m p o r t ∗
5
7
9
11
i m p o r t sys
i m p o r t os
i m p o r t math
from math i m p o r t ∗
import time
from a r r a y i m p o r t a r r a y
13
19
d e f getChemin_greffons ( ) :
" " " Récupérer l e chemin des g r e f f o n s u t i l i s a t e u r s à p a r t i r d ’ un nom de G r e f f o n
connu " " "
[ nb1 , strMenuPath , nb2 , strKeyAcc , nb3 , tuNom_complet_greffon , nb3 , nType , nb4 ,
n T i m e _ i n s t a l l e d , nb5 , s t r N o m _ i n t e r n e ] = gimp . pdb . gimp_plugins_query ( " D i l a t e r
l e calque a c t i f " )
strNom_complet_greffon = tuNom_complet_greffon [ 0 ]
strChemin = os . path . dirname ( strNom_complet_greffon )
r e t u r n strChemin
21
...
23
d e f d i l a t e r _ c a l q u e _ a c t i f ( inImage , s t r N o m _ f i c h i e r _ e l e m e n t _ s t r u c t u r a n t ) :
" " " D i l a t e l e calque a c t i f avec l element s t r u c t u r a n t dont on a recu l e nom du
fichier """
#gimp . pdb . gimp_message_set_handler ( 1 ) #GIMP_MESSAGE_BOX ( 0 ) , GIMP_CONSOLE ( 1 ) ,
GIMP_ERROR_CONSOLE ( 2 ) }
gimp . pdb . gimp_message_set_handler ( MESSAGE_BOX )
15
17
25
27
29
31
33
# Mise à j o u r des chemins pour l e s i m p o r t s u t i l i s a t e u r
strChemin = getChemin_greffons ( )
# i f strChemin n o t i n sys . path :
# sys . path . append ( strChemin )
strChemin = os . path . j o i n ( getChemin_greffons ( ) , " image−morpho_imports " ) # d o s s i e r
d ’ où on s o u h a i t i m p o r t e r
i f strChemin n o t i n sys . path :
sys . path . append ( strChemin )
35
37
39
41
43
# I m p o r t s u t i l i s a t e u r − debut
i m p o r t P o i n t # I m p o r t du f i c h i e r " . / image−morpho_imports / P o i n t . py "
reload ( Point )
from P o i n t i m p o r t P o i n t # U t i l i s a t i o n de l a c l a s s e P o i n t du f i c h i e r P o i n t . py
from P o i n t i m p o r t P o i n t _ c o u l e u r
i m p o r t Algos_images # I m p o r t du f i c h i e r " . / image−morpho_imports / Algos_images . py "
r e l o a d ( Algos_images )
from Algos_images i m p o r t Algos_images
# Imports u t i l i s a t e u r − f i n
45
...
47
49
51
register (
" D i l a t e _ l e _ c a l q u e _ a c t i f " , # T i t r e de l a b o i t e de d i a l o g u e
" D i l a t e l e calque a c t i f avec avec l ’ element s t r u c t u r a n t s e l e c t i o n n e " , # pas d ’
accents i c i
" D i l a t e l e calque a c t i f avec avec l ’ element s t r u c t u r a n t s e l e c t i o n n e " , # pas d ’
accents i c i
Distribué sous licence CC by-nc-sa
page 18 / 79
Distribué sous licence CC by-nc-sa
53
55
57
59
61
63
www.VVpix.com
" V i n c e n t Vansuyt " ,
" Licence CC by−nc−sa " ,
" 2011 " ,
" <Image > / Python−Fu / Morpho math / D i l a t e r l e calque a c t i f . . . " , # pas d ’ accents i c i
"" ,
[
( PF_IMAGE , " inImage " , " Image a t r a i t e r : " , None ) ,
( PF_FILENAME , " s t r N o m _ f i c h i e r _ e l e m e n t _ s t r u c t u r a n t " , " F i c h i e r element s t r u c t u r a n t
: " , " e l e m e n t _ s t r u c t _ 4 5 d e g . csv " ) , # pas d ’ accents i c i ,
],
[] , # resultats
dilater_calque_actif ,
menu= " <Image > / Python−Fu / Morpho math / D i l a t e r l e calque a c t i f " , # t e x t e à r é c u p é r e r
pour l a l i g n e 16
)
65
main ( )
Distribué sous licence CC by-nc-sa
page 19 / 79
Distribué sous licence CC by-nc-sa
15
www.VVpix.com
Aiguillage de l’affichage des messages Gimp
Attention, pour le mode MESSAGE_BOX, il faut que la chaîne de caractères affichée contienne un \n.
(La console d’erreur de Gimp s’affiche par le menu “Fichier / Boîte de dialogue / Console d’erreurs").
2
4
6
8
# −∗− coding : l a t i n −1 −∗−
# ! / u s r / b i n / env python
from gimpfu i m p o r t ∗
from gimpenums i m p o r t ∗
i m p o r t sys
i m p o r t os
i m p o r t math
10
12
14
16
d e f t e s t ( inImage ) :
" " " Test de l ’ a i g u i l l a g e des messages dans Gimp " " "
gimp . pdb . gimp_message_set_handler ( MESSAGE_BOX )
gimp . pdb . gimp_message ( " Message \ " MESSAGE_BOX \ " \ n " )
gimp . pdb . gimp_message_set_handler ( CONSOLE )
gimp . pdb . gimp_message ( " Message \ " CONSOLE \ " \ n " )
18
20
gimp . pdb . gimp_message_set_handler ( ERROR_CONSOLE )
gimp . pdb . gimp_message ( " Message \ "ERROR_CONSOLE \ " \ n " )
22
38
register (
" t e s t " , # Nom de l a f o n c t i o n
" Test desc " ,
" Test desc " ,
"" ,
"GPL License " ,
" 2008 " ,
" <Image > / Python−Fu / Test messages . . . " ,
"" ,
[
( PF_IMAGE , " inImage " , " I n p u t image " , None ) ,
],
[] ,
t e s t , # nom de l a f o n c t i o n
menu= " <Image > / Python−Fu / Test " ,
)
40
main ( )
24
26
28
30
32
34
36
Affichage vers plusieurs sorties :
2
4
6
8
10
12
# −∗− coding : l a t i n −1 −∗−
# ! / u s r / b i n / env python
from gimpfu i m p o r t ∗
from gimpenums i m p o r t ∗
[...]
nb_calques = l e n ( inImage . l a y e r s )
strM = " Nombre de calques : %d \ n " %( nb_calques )
f o r handle i n [ MESSAGE_BOX, ERROR_CONSOLE ] :
gimp . pdb . gimp_message_set_handler ( handle ) #GIMP_MESSAGE_BOX ( 0 ) , GIMP_CONSOLE
( 1 ) , GIMP_ERROR_CONSOLE ( 2 ) }
gimp . pdb . gimp_message ( strM )
return
Distribué sous licence CC by-nc-sa
page 20 / 79
Distribué sous licence CC by-nc-sa
16
www.VVpix.com
Gimp Procedurial DataBase
La classe pdb (Procedurial DataBase) permet de manipuler facilement tous les objets de Gimp. Pour
s’en convaincre, il suffit de taper dir(gimp.pdb) dans la console Python de Gimp (voir annexe 21, page
57).
On peut par exemple détecter si un calque est un texte et en récupérer la chaine de texte :
1
3
bEst_un_calque = gimp . pdb . g i m p _ d r a w a b l e _ i s _ t e x t _ l a y e r ( calques [ 0 ] )
i f bEst_un_calque :
s t r T e x t e = gimp . pdb . g i m p _ t e x t _ l a y e r _ g e t _ t e x t ( calques [ 0 ] )
p r i n t strTexte
16.1
Navigateur de procédures
Le navigateur de procédures est l’outil qui permet de voir les paramètres à envoyer à une fonction de la
Procedurial DataBase et les paramètres reçus en retour de la fonction.
Dans Gimp 2.6, le navigateur de procédures
s’appelle par le menu “Aide", voir figure 13.
Le navigateur s’ouvre et liste les procédures de
la Procedurial DataBase.
F IGURE 13 – Appel du navigateur de procédures
F IGURE 14 – Fonction gimp_drawable_is_text_layer du navigateur de prodécures
Ci-dessus, dans la partie droite de la fenêtre, on retrouve tous les paramètres envoyé à la fonction
gimp.pdb.gimp_drawable_is_text_layer du listing 16.
Distribué sous licence CC by-nc-sa
page 21 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
Attention à bien remplacer les - affichés par ce navigateur par des _ dans le code Python.
Au même endroit dans le menu, il existe un outil analogue pour les greffons (scripts Python-fu).
Distribué sous licence CC by-nc-sa
page 22 / 79
Distribué sous licence CC by-nc-sa
17
www.VVpix.com
Images
17.1
Créer une image
4
#
#
#
#
6
inImage = gimp . pdb . gimp_image_new ( width , h e i g h t , t y p e )
2
Parametres
− INT32 w i d t h : The w i d t h o f t h e image ( 1 <= w i d t h <= 262144)
− INT32 h e i g h t : The h e i g h t o f t h e image ( 1 <= h e i g h t <= 262144)
− INT32 t y p e : The t y p e o f image { RGB ( 0 ) , GRAY ( 1 ) , INDEXED ( 2 ) }
L’image ainsi créée ne contient aucun calque, il faut en ajouter un et l’ajouter dans l’image pour pouvoir
dessiner...
Ensuite, l’image n’est pas visible dans Gimp (ou à moins d’aller dans la palette des images), il faut
l’ajouter dans le display, comme ceci (voir aussi section 17.5, page 24 ) :
2
n D i s p l a y = gimp . pdb . gimp_display_new ( inImage )
gimp . pdb . g i m p _ d i s p l a y s _ f l u s h ( )
A la fin, pour que les pixels de l’image soient visibles, il faut parfois cacher et afficher le calque, comme
ceci :
gimp . pdb . g i m p _ i t e m _ s e t _ v i s i b l e ( l a y e r , False )
2
# d e s s i n s u r l e calque ’ l a y e r ’
4
gimp . pdb . g i m p _ i t e m _ s e t _ v i s i b l e ( l a y e r , True )
17.2
Définir le nom d’une image
5
def get_nom_fichier_seul ( strNom_fichier_complet )
" " " r e n v o i e ’ python ’ s i e l l e r e c o i t ’ c : \ \ python24 \ \ python . exe ’ " " "
s t r N o m _ f i c h i e r _ a v e c _ e x t e n s i o n = os . path . s p l i t ( s t r N o m _ f i c h i e r _ c o m p l e t ) [ 1 ]
s t r N o m _ f i c h i e r _ s e u l = os . path . s p l i t e x t ( s t r N o m _ f i c h i e r _ a v e c _ e x t e n s i o n ) [ 0 ]
return strNom_fichier_seul # get_nom_fichier_seul
7
...
1
3
9
gimp . pdb . gimp_image_set_filename ( inImage , g e t _ n o m _ f i c h i e r _ s e u l ( s t r N o m F i c h i e r ) )
17.3
17.3.1
Récupérer une image
à partir de la liste des images de Gimp
1
3
5
7
i m p o r t gimp
l s t I m g = gimp . i m a g e _ l i s t ( )
p r i n t lstImg
[ < gimp . Image ’ Image_1 . x c f ’ >]
>>> image = l s t I m g [ 0 ]
>>> t y p e ( image )
< t y p e ’ gimp . Image ’ >
Distribué sous licence CC by-nc-sa
page 23 / 79
Distribué sous licence CC by-nc-sa
17.3.2
www.VVpix.com
à partir d’un calque
1
img = gimp . pdb . gimp_item_get_image ( calque_masque )
17.3.3
Détail d’une image
1
>>> d i r ( image )
[ ’ ID ’ , ’ __class__ ’ , ’ __cmp__ ’ , ’ _ _ d e l a t t r _ _ ’ , ’ __doc__ ’ , ’ _ _ g e t a t t r i b u t e _ _ ’ , ’
__hash__ ’ , ’ _ _ i n i t _ _ ’ , ’ __new__ ’ , ’ __reduce__ ’ , ’ __reduce_ex__ ’ , ’ __repr__ ’ , ’
__setattr__ ’ , ’ __str__ ’ , ’ active_channel ’ , ’ active_drawable ’ , ’ a c t i v e _ l a y e r ’ , ’
add_channel ’ , ’ add_hguide ’ , ’ a d d _ l a y e r ’ , ’ add_vguide ’ , ’ a t t a c h _ n e w _ p a r a s i t e ’ , ’
base_type ’ , ’ channels ’ , ’ c l e a n _ a l l ’ , ’ colormap ’ , ’ crop ’ , ’ d e l e t e _ g u i d e ’ , ’ d i r t y
’ , ’ disable_undo ’ , ’ d u p l i c a t e ’ , ’ enable_undo ’ , ’ f i l e n a m e ’ , ’ f i n d _ n e x t _ g u i d e ’ , ’
f l a t t e n ’ , ’ f l o a t i n g _ s e l _ a t t a c h e d _ t o ’ , ’ f l o a t i n g _ s e l e c t i o n ’ , ’ free_shadow ’ , ’
g e t _ c h a n n e l _ b y _ t a t t o o ’ , ’ get_component_active ’ , ’ g e t _ c o m p o n e n t _ v i s i b l e ’ , ’
get_guide_orientation ’ , ’ get_guide_position ’ , ’ get_layer_by_tattoo ’ , ’ height ’ ,
’ l a y e r s ’ , ’ lower_channel ’ , ’ l o w e r _ l a y e r ’ , ’ l o w e r _ l a y e r _ t o _ b o t t o m ’ , ’ merge_down ’
, ’ m e r g e _ v i s i b l e _ l a y e r s ’ , ’ name ’ , ’ new_layer ’ , ’ p a r a s i t e _ a t t a c h ’ , ’
parasite_detach ’ , ’ parasite_find ’ , ’ p a r a s i t e _ l i s t ’ , ’ pick_correlate_layer ’ , ’
r a i s e _ c h a n n e l ’ , ’ r a i s e _ l a y e r ’ , ’ r a i s e _ l a y e r _ t o _ t o p ’ , ’ remove_channel ’ , ’
remove_layer ’ , ’ r e s i z e ’ , ’ r e s i z e _ t o _ l a y e r s ’ , ’ r e s o l u t i o n ’ , ’ s c a l e ’ , ’ s e l e c t i o n ’
, ’ set_component_active ’ , ’ s e t _ c o m p o n e n t _ v i s i b l e ’ , ’ t a t t o o _ s t a t e ’ , ’ undo_freeze
’ , ’ undo_group_end ’ , ’ u n d o _ g r o u p _ s t a r t ’ , ’ undo_is_enabled ’ , ’ undo_thaw ’ , ’ u n i t ’
, ’ unset_active_channel ’ , ’ vectors ’ , ’ width ’ ]
17.4
Ouverture / fermeture d’une image
inImage = gimp . pdb . g i m p _ f i l e _ l o a d ( strNom_complet_source , " image " )
2
gimp . pdb . gimp_image_delete ( inImage )
17.5
Affichage d’une image dans une vue
Les vues sont des fenêtres qui permettent à l’utilisateur de visualiser ses images. On peut travailler sur
les images avec des scripts Python sans jamais créer de vues.
Pour voir malgré tout la liste des images présentes dans la mémoire de Gimp, on peut afficher la fenêtre
des images, par le menu “Fenêtres / Fenêtres ancrables / Images".
1
# A j o u t d ’ une vue pour l ’ image inImage
d i s p = gimp . pdb . gimp_display_new ( inImage )
3
5
# Suppression de l a vue
gimp . pdb . g i m p _ d i s p l a y _ d e l e t e ( d i s p )
Avec Gimp, si on a deux vues qui affichent une même image, la fermeture de la première vue (menu
Fichier / fermer) n’efface pas l’image de la mémoire. La fermeture de la seconde vue, si.
Pour afficher à l’écran tous les changements en mémoire des images en mémoire :
1
gimp . pdb . g i m p _ d i s p l a y s _ f l u s h ( )
Distribué sous licence CC by-nc-sa
page 24 / 79
Distribué sous licence CC by-nc-sa
18
18.1
www.VVpix.com
Calques
Calculer la position d’un calque existant dans une image
La fonction gimp.pdb.gimp_image_get_item_position permet de retrouver la position d’un calque (ou
groupe de calque dans son niveau).
Listing 5 – Par exemple...
1
3
5
7
>>> calque . name
’ F i l t r e _ a l t e r n e _ s e q u e n t i e l _ 7 −5−3 (
comparer avec s u i v a n t [ mauvais
ordre ] ) ’
>>> gimp . pdb .
g i m p _ i m a g e _ g e t _ i t e m _ p o s i t i o n ( img ,
calque )
2
>>> c a l q u e _ f e u i l l e . name
’ img e r . b . d7 ’
>>> gimp . pdb .
g i m p _ i m a g e _ g e t _ i t e m _ p o s i t i o n ( img ,
calque_feuille )
3
F IGURE 15 – Position des calques dans leur
arbre (lié au listing 5)
18.2
Déterminer le type d’un calque
Listing 6 – Exemple
2
4
i f ( t y p e ( calque ) == gimp . Layer ) :
# c ’ e s t un calque
i f ( t y p e ( calque ) == gimp . GroupLayer ) :
# c ’ e s t un goupe de calques
18.3
Récupérer la position d’un calque dans une image
Attention, lorsque l’on récupére une sélection (voir section 20, page 32), elle se réfère à l’image. Le
calque peut-être décalé (offset) dans celle-ci, il faut en tenir compte.
1
[ n O f f s e t _ x , n O f f s e t _ y ] = gimp . pdb . g i m p _ d r a w a b l e _ o f f s e t s ( calque )
18.4
Parcourir la liste des calques d’un groupe de calques
Listing 7 – Exemple
1
3
i f ( t y p e ( calque ) == gimp . GroupLayer ) :
f o r c a l q u e _ e n f a n t i n calque . l a y e r s :
# t r a i t e m e n t des calques e n f a n t s
Distribué sous licence CC by-nc-sa
page 25 / 79
Distribué sous licence CC by-nc-sa
18.5
www.VVpix.com
Créer et ajouter un calque dans une image
1
3
5
7
9
11
13
15
nOpacite = 100 #The l a y e r o p a c i t y ( 0 <= o p a c i t y <= 100)
# − INT32 t y p e : The l a y e r t y p e { RGB−IMAGE ( 0 ) , RGBA−IMAGE ( 1 ) , GRAY−IMAGE ( 2 ) ,
GRAYA−IMAGE ( 3 ) , INDEXED−IMAGE ( 4 ) , INDEXEDA−IMAGE ( 5 ) }
nLayer_type = RGB−IMAGE
nMode_combinaison = NORMAL_MODE
l a y e r = gimp . pdb . gimp_layer_new ( inImage , \
nLargeur , \
nHauteur , \
nLayer_type , \
" nom_calque " , \
nOpacite , \
nMode_combinaison )
# A j o u t du calque créé dans l ’ image en premiere p o s i t i o n
l a y e r _ p a r e n t = None # ( " None " pour a j o u t dans l a r a c i n e )
n P o s i t i o n = 0 # p o s i t i o n dans l e niveau " l a y e r _ p a r e n t "
gimp . pdb . g i m p _ i m a g e _ i n s e r t _ l a y e r ( inImage , l a y e r , l a y e r _ p a r e n t , n P o s i t i o n )
On peut aussi utiliser la procédure gimp.pdb.gimp_image_add_layer, qui ajout le calque dans la racine
de l’image.
18.6
Récupération des calques de l’image
2
2
4
calques = image . l a y e r s
l e n ( calques )
calque = calques [ 0 ]
d i r ( calque )
>>> d i r ( calque )
[ ’ ID ’ , ’ __class__ ’ , ’ __cmp__ ’ , ’ _ _ d e l a t t r _ _ ’ , ’ __doc__ ’ , ’ __format__ ’ , ’
_ _ g e t a t t r i b u t e _ _ ’ , ’ __hash__ ’ , ’ _ _ i n i t _ _ ’ , ’ __new__ ’ , ’ __reduce__ ’ , ’
__reduce_ex__ ’ , ’ __repr__ ’ , ’ _ _ s e t a t t r _ _ ’ , ’ _ _ s i z e o f _ _ ’ , ’ _ _ s t r _ _ ’ , ’
__subclasshook__ ’ , ’ add_alpha ’ , ’ add_mask ’ , ’ apply_mask ’ , ’ a t t a c h _ n e w _ p a r a s i t e ’
, ’ bpp ’ , ’ c h i l d r e n ’ , ’ copy ’ , ’ create_mask ’ , ’ edit_mask ’ , ’ f i l l ’ , ’ f l u s h ’ , ’
free_shadow ’ , ’ f r o m _ i d ’ , ’ g e t _ p i x e l ’ , ’ g e t _ p i x e l _ r g n ’ , ’ g e t _ t i l e ’ , ’ g e t _ t i l e 2 ’ ,
’ has_alpha ’ , ’ h e i g h t ’ , ’ image ’ , ’ i s _ f l o a t i n g _ s e l ’ , ’ i s _ g r a y ’ , ’ i s _ g r e y ’ , ’
i s _ i n d e x e d ’ , ’ i s _ l a y e r _ m a s k ’ , ’ i s _ r g b ’ , ’ l a y e r s ’ , ’ l i n k e d ’ , ’ l o c k _ a l p h a ’ , ’ mask
’ , ’ mask_bounds ’ , ’ m a s k _ i n t e r s e c t ’ , ’ merge_shadow ’ , ’ mode ’ , ’ name ’ , ’ o f f s e t ’ , ’
o f f s e t s ’ , ’ opacity ’ , ’ parasite_attach ’ , ’ parasite_detach ’ , ’ parasite_find ’ , ’
p a r a s i t e _ l i s t ’ , ’ p a r e n t ’ , ’ p r e s e r v e _ t r a n s ’ , ’ remove_mask ’ , ’ r e s i z e ’ , ’
r e s i z e _ t o _ i m a g e _ s i z e ’ , ’ s c a l e ’ , ’ s e t _ o f f s e t s ’ , ’ s e t _ p i x e l ’ , ’ show_mask ’ , ’
t a t t o o ’ , ’ transform_2d ’ , ’ transform_2d_default ’ , ’ t r a n s f o r m _ f l i p ’ , ’
transform_flip_default ’ , ’ transform_flip_simple ’ , ’ transform_matrix ’ , ’
transform_matrix_default ’ , ’ transform_perspective ’ , ’
transform_perspective_default ’ , ’ transform_rotate ’ , ’ transform_rotate_default ’ ,
’ transform_rotate_simple ’ , ’ transform_scale ’ , ’ transform_scale_default ’ , ’
transform_shear ’ , ’ transform_shear_default ’ , ’ t r a n s l a t e ’ , ’ type ’ , ’
t y p e _ w i t h _ a l p h a ’ , ’ update ’ , ’ v i s i b l e ’ , ’ w i d t h ’ ]
18.7
Récupérer le calque actif
l a y e r I m g _ s r c = gimp . pdb . g i m p _ i m a g e _ g e t _ a c t i v e _ l a y e r ( inImage )
Distribué sous licence CC by-nc-sa
page 26 / 79
Distribué sous licence CC by-nc-sa
18.8
www.VVpix.com
Choisir un calque comme actif
1
gimp . pdb . g i m p _ i m a g e _ s e t _ a c t i v e _ l a y e r ( img , calque )
18.9
Supprimer un calque
1
gimp . pdb . gimp_image_remove_layer ( img , c a l q u e _ d e s t )
Listing 8 – cette fonction provoque une erreur...
1
#gimp . pdb . g i m p _ i t e m _ d e l e t e ( c a l q u e _ d e s t )
18.10
Dessiner sur un calque
18.10.1
... sur un calque RGBA
Listing 9 – Pixel vert opaque
1
calque . s e t _ p i x e l ( 0 , 0 , [ 0 , 2 5 5 , 0 , 2 5 5 ] )
Listing 10 – Pixel vert transparent
1
calque . s e t _ p i x e l ( 0 , 0 , [ 0 , 2 5 5 , 0 , 0 ] )
18.10.2
... sur un calque RGB
Listing 11 – Pixel vert
1
calque . s e t _ p i x e l ( 0 , 0 , [ 0 , 2 5 5 , 0 ] )
18.11
Mettre à jour l’affichage d’un calque
Pour mettre à jour l’affichage d’un calque après avoir positionné des pixels, par exemple
1
calque . update ( x0 , y0 , nLargeur , nHauteur )
Distribué sous licence CC by-nc-sa
page 27 / 79
Distribué sous licence CC by-nc-sa
19
www.VVpix.com
Chemins (vectoriels)
19.1
Récupérer le chemin actif
1
3
# r é c u p é r a t i o n d ’ une image
i m p o r t gimp
l s t I m g = gimp . i m a g e _ l i s t ( )
img = l s t I m g [ 0 ]
5
v1 = gimp . pdb . g i m p _ i m a g e _ g e t _ a c t i v e _ v e c t o r s ( img )
19.2
Ajouter un chemin (gimp.Vectors)
2
4
6
# r é c u p é r a t i o n d ’ une image
i m p o r t gimp
l s t I m g = gimp . i m a g e _ l i s t ( )
img = l s t I m g [ 0 ]
# c r e a t i o n d ’ un v e c t e u r
v1 = gimp . pdb . gimp_vectors_new ( img , " e s s a i _ v e c t e u r " )
8
10
12
# a j o u t dans l ’ image
vParent = None
nPosition = 0
gimp . pdb . g i m p _ i m a g e _ i n s e r t _ v e c t o r s ( img , v1 , vParent , n P o s i t i o n )
19.3
Supprimer un chemin (gimp.Vectors)
Listing 12 – (suite du listing précédent)
2
# suppression
gimp . pdb . gimp_image_remove_vectors ( img , v1 )
19.4
Changer le nom d’un chemin
Listing 13 – (suite du listing précédent)
gimp . pdb . gimp_item_set_name ( v1 , " Nouveau nom )
19.5
Ajouter des points dans un chemin
“stroke" en anglais veut dire “coup de pinceau", “touche" ou “trait" en peinture, dessin.
19.5.1
Ajouter une ligne brisée
Listing 14 – Les coordonnées des points sont dans le repère haut-gauche de l’image comme celui des
pixels
1
3
n I d _ s t r o k e = gimp . pdb . gimp_vectors_bezier_stroke_new_moveto ( v1 , 10 , 100 )
gimp . pdb . g i m p _ v e c t o r s _ b e z i e r _ s t r o k e _ l i n e t o ( v1 , n I d _ s t r o k e , 50 , 110 )
gimp . pdb . g i m p _ v e c t o r s _ b e z i e r _ s t r o k e _ l i n e t o ( v1 , n I d _ s t r o k e , 60 , 130 )
Distribué sous licence CC by-nc-sa
page 28 / 79
Distribué sous licence CC by-nc-sa
19.5.2
www.VVpix.com
Ajouter une spline cubique
Listing 15 – Les coordonnées des points sont dans le repère haut-gauche de l’image comme celui des
pixels
1
gimp . pdb . g i m p _ v e c t o r s _ b e z i e r _ s t r o k e _ c u b i c t o ( v1 , n I d _ s t r o k e , x0 , y0 , x1 , y1 , x2 ,
y2 )
19.5.3
Création depuis une liste de points
Listing 16 – Les coordonnées des points sont dans le repère haut-gauche de l’image comme celui des
pixels
1
3
nType = 0 # GIMP_VECTORS_STROKE_TYPE_BEZIER
nNb_pts = l e n ( l s t P o i n t s )
nStroke_ID = gimp . pdb . g i m p _ v e c t o r s _ s t r o k e _ n e w _ f r o m _ p o i n t s ( v1 , nType , nb_pts ,
l s t P o i n t s , bClosed )
19.6
Liste de propriétés et méthodes disponibles sur un stroke
[’ID’, ’__class__’, ’__cmp__’, ’__delattr__’, ’__doc__’, ’__format__’,
’__getattribute__’, ’__hash__’, ’__init__’, ’__new__’, ’__reduce__’,
’__reduce_ex__’, ’__repr__’, ’__setattr__’, ’__sizeof__’, ’__str__’,
’__subclasshook__’, ’close’, ’conicto’, ’cubicto’, ’flip’, ’flip_free’,
’get_length’, ’get_point_at_dist’, ’interpolate’, ’lineto’, ’new_ellipse’,
’new_moveto’, ’points’, ’rotate’, ’scale’, ’translate’, ’vectors_ID’]
19.7
Accéder aux points d’une (ligne brisée)
1
v1 . s t r o k e s [ 0 ] . p o i n t s
( [ 6 0 . 0 , 130.0 , 60.0 , 130.0 , 60.0 , 130.0 , 50.0 , 110.0 , 50.0 , 110.0 , 50.0 , 110.0 ,
1 0 . 0 , 1 0 0 . 0 , 1 0 . 0 , 1 0 0 . 0 , 1 0 . 0 , 1 0 0 . 0 ] , False )
19.8
Supprimer un “stroke" d’un “gimp.Vectors"
2
4
6
>>>
2
>>>
2
>>>
>>>
1
l e n ( v1 . s t r o k e s )
v1 . s t r o k e s [ 1 ] . ID
gimp . pdb . gimp_vectors_remove_stroke ( v1 , 2 )
l e n ( v1 . s t r o k e s )
Distribué sous licence CC by-nc-sa
page 29 / 79
Distribué sous licence CC by-nc-sa
19.9
www.VVpix.com
Récupération des chemins (gimp.Vectors)
F IGURE 16 – Exemple test
19.10
Liste de propriétés et méthodes disponibles sur un gimp.Vectors
[’ID’, ’__class__’, ’__cmp__’, ’__delattr__’, ’__doc__’, ’__format__’, ’__getattribute__’,
’__hash__’, ’__init__’, ’__new__’, ’__reduce__’, ’__reduce_ex__’, ’__repr__’, ’__setattr__’,
’__sizeof__’, ’__str__’, ’__subclasshook__’, ’children’, ’from_id’, ’image’, ’linked’, ’name’,
’parasite_attach’, ’parasite_detach’, ’parasite_find’, ’parasite_list’, ’parent’,
’remove_stroke’, ’strokes’, ’tattoo’, ’to_selection’, ’visible’]
Listing 17 – ce listing s’applique à l’image figure 16
1
3
5
7
9
11
13
>>> i m p o r t gimp
>>> l s t I m g = gimp . i m a g e _ l i s t ( )
>>> img = l s t I m g [ 0 ]
>>> l s t V = img . v e c t o r s
>>> l e n ( l s t V )
2
>>> v0 = l s t V [ 0 ]
>>> v1 = l s t V [ 1 ]
>>> v0 . name
’ Essai_1 ’
>>> v0 . l i n k e d
False
>>> v1 . name
’ Essai_2 ’
Distribué sous licence CC by-nc-sa
page 30 / 79
Distribué sous licence CC by-nc-sa
15
17
19
www.VVpix.com
>>> v1 . l i n k e d
False
>>> l e n ( v0 . s t r o k e s )
3
>>> l e n ( v1 . s t r o k e s )
1
19.11
gimp.VectorsBezierStroke
Cette partie est la suite du listing 17, elle s’applique aussi à l’image figure 16.
Listing 18 – détails des Béziers
2
4
6
8
10
12
14
>>> t y p e ( v0 . s t r o k e s [ 0 ] )
< t y p e ’ gimp . V e c t o r s B e z i e r S t r o k e ’ >
>>> d i r ( v0 . s t r o k e s [ 0 ] )
[ ’ ID ’ , ’ __class__ ’ , ’ __cmp__ ’ , ’ _ _ d e l a t t r _ _ ’ , ’ __doc__ ’ , ’ __format__ ’ , ’
_ _ g e t a t t r i b u t e _ _ ’ , ’ __hash__ ’ , ’ _ _ i n i t _ _ ’ , ’ __new__ ’ , ’ __reduce__ ’ , ’
__reduce_ex__ ’ , ’ __repr__ ’ , ’ _ _ s e t a t t r _ _ ’ , ’ _ _ s i z e o f _ _ ’ , ’ _ _ s t r _ _ ’ , ’
__subclasshook__ ’ , ’ c l o s e ’ , ’ c o n i c t o ’ , ’ c u b i c t o ’ , ’ f l i p ’ , ’ f l i p _ f r e e ’ , ’
get_length ’ , ’ get_point_at_dist ’ , ’ i n t e r p o l a t e ’ , ’ l i n e t o ’ , ’ new_ellipse ’ , ’
new_moveto ’ , ’ p o i n t s ’ , ’ r o t a t e ’ , ’ s c a l e ’ , ’ t r a n s l a t e ’ , ’ v e c t o r s _ I D ’ ]
# Premier chemin : 3 B é z i e r s o u v e r t e s
>>> v0 . s t r o k e s [ 0 ] . p o i n t s
( [ 1 5 0 . 0 , 100.0 , 200.0 , 50.0 , 150.0 , 50.0 , 50.0 , 50.0 , 50.0 , 100.0 , 50.0 , 150.0 ,
1 0 0 . 0 , 2 0 0 . 0 , 1 0 0 . 0 , 2 5 0 . 0 , 5 0 . 0 , 2 5 0 . 0 ] , False )
>>> v0 . s t r o k e s [ 1 ] . p o i n t s
( [ 1 5 0 . 0 , 250.0 , 200.0 , 250.0 , 250.0 , 250.0 , 250.0 , 200.0 , 250.0 , 150.0 , 250.0 ,
1 0 0 . 0 ] , False )
>>> v0 . s t r o k e s [ 2 ] . p o i n t s
( [ 1 5 0 . 0 , 1 5 0 . 0 , 1 5 0 . 0 , 1 5 0 . 0 , 1 5 0 . 0 , 1 5 0 . 0 ] , False )
# Second chemin : 1 B é z i e r o u v e r t e ( en b l e u s u r l ’ image de r é f é r e n c e )
>>> v1 . s t r o k e s [ 0 ] . p o i n t s
( [ 1 0 0 . 0 , 150.0 , 200.0 , 100.0 , 300.0 , 50.0 , 400.0 , 150.0 , 350.0 , 200.0 , 300.0 ,
2 5 0 . 0 ] , False )
Distribué sous licence CC by-nc-sa
page 31 / 79
Distribué sous licence CC by-nc-sa
20
www.VVpix.com
Selections
2
4
i m p o r t gimp
img = gimp . i m a g e _ l i s t ( ) [ 0 ]
i f ( gimp . pdb . g i m p _ s e l e c t i o n _ i s _ e m p t y ( img ) ) :
strM = " I l n ’ y a aucune s e l e c t i o n dans c e t t e image "
6
s e l = gimp . pdb . g i m p _ i m a g e _ g e t _ s e l e c t i o n ( img )
8
10
1
x = 10
y = 10
nVal = gimp . pdb . g i m p _ s e l e c t i o n _ v a l u e ( img , x , y ) # 0 s i x , y en dehors , 255 à l ’
intérieur
d i r ( sel )
[ ’ ID ’ , ’ __class__ ’ , ’ __cmp__ ’ , ’ _ _ d e l a t t r _ _ ’ , ’ __doc__ ’ , ’ __format__ ’ , ’
_ _ g e t a t t r i b u t e _ _ ’ , ’ __hash__ ’ , ’ _ _ i n i t _ _ ’ , ’ __new__ ’ , ’ __reduce__ ’ , ’
__reduce_ex__ ’ , ’ __repr__ ’ , ’ _ _ s e t a t t r _ _ ’ , ’ _ _ s i z e o f _ _ ’ , ’ _ _ s t r _ _ ’ , ’
__subclasshook__ ’ , ’ a t t a c h _ n e w _ p a r a s i t e ’ , ’ bpp ’ , ’ c h i l d r e n ’ , ’ c o l o r ’ , ’ c o l o u r ’ ,
’ combine_masks ’ , ’ copy ’ , ’ f i l l ’ , ’ f l u s h ’ , ’ free_shadow ’ , ’ f r o m _ i d ’ , ’ g e t _ p i x e l
’ , ’ g e t _ p i x e l _ r g n ’ , ’ g e t _ t i l e ’ , ’ g e t _ t i l e 2 ’ , ’ has_alpha ’ , ’ h e i g h t ’ , ’ image ’ , ’
is_gray ’ , ’ is_grey ’ , ’ is_indexed ’ , ’ is_layer_mask ’ , ’ is_rgb ’ , ’ l i n k e d ’ , ’
mask_bounds ’ , ’ m a s k _ i n t e r s e c t ’ , ’ merge_shadow ’ , ’ name ’ , ’ o f f s e t ’ , ’ o f f s e t s ’ , ’
opacity ’ , ’ parasite_attach ’ , ’ parasite_detach ’ , ’ parasite_find ’ , ’ p a r a s i t e _ l i s t
’ , ’ p a r e n t ’ , ’ s e t _ p i x e l ’ , ’ show_masked ’ , ’ t a t t o o ’ , ’ t r a n s f o r m _ 2 d ’ , ’
transform_2d_default ’ , ’ transform_flip ’ , ’ transform_flip_default ’ , ’
transform_flip_simple ’ , ’ transform_matrix ’ , ’ transform_matrix_default ’ , ’
transform_perspective ’ , ’ transform_perspective_default ’ , ’ transform_rotate ’ , ’
transform_rotate_default ’ , ’ transform_rotate_simple ’ , ’ transform_scale ’ , ’
transform_scale_default ’ , ’ transform_shear ’ , ’ transform_shear_default ’ , ’ type ’ ,
’ t y p e _ w i t h _ a l p h a ’ , ’ update ’ , ’ v i s i b l e ’ , ’ w i d t h ’ ]
Distribué sous licence CC by-nc-sa
page 32 / 79
Distribué sous licence CC by-nc-sa
21
www.VVpix.com
Accès rapide aux pixels
Pour traiter rapidement une image, il faut la convertir en tableau, comme dans l’exemple ci-dessous.
from a r r a y i m p o r t a r r a y
2
...
4
6
8
10
d e f traitement_X_image ( inImage ) :
" " " A p p l i q u e l e t r a i t e m e n t X à l ’ image reçue " " "
# Récupération du calque où d e s s i n e r
l s t L a y e r s = inImage . l a y e r s
layerImg_src = lstLayers [ 0 ]
16
strTypeImage = s t r ( t y p e ( inImage ) )
i f ( strTypeImage == " < t y p e ’ NoneType ’ > " ) :
strM = " I l f a u t d ’ abord c r e e r une image avant d ’ a p p e l e r ce s c r i p t "
gimp . message ( strM )
return
18
pdb . gimp_image_undo_group_start ( inImage )
20
nHauteur = inImage . h e i g h t
nLargeur = inImage . w i d t h
12
14
22
24
26
28
30
32
34
36
srcRgn = l a y e r I m g _ s r c . g e t _ p i x e l _ r g n ( 0 , 0 , nLargeur , nHauteur , False , False )
s r c _ p i x e l s = a r r a y ( "B" , srcRgn [ 0 : nLargeur , 0 : nHauteur ] ) # image source
p _ s i z e = l e n ( srcRgn [ 0 , 0 ] ) # 3 pour RGB, 4 pour RGBA
d e s t _ p i x e l s = a r r a y ( "B" , " \ x00 " ∗ ( nLargeur ∗ nHauteur ∗ p _ s i z e ) ) # image
destination
# T r a i t e m e n t de l ’ image
f o r x i n range ( nLargeur ) : # ( x de 0 a nLargeur − 1 ]
f o r y i n range ( nHauteur ) :
pos = ( i n t ( x ) + nLargeur ∗ y ) ∗ p _ s i z e
c l _ p i x = s r c _ p i x e l s [ pos +0: pos+ p _ s i z e ] # c l _ p i x , l i s t e de t a i l l e 3 ou 4
s u i v a n t RGB ou RGBA
#
# TODO : é c r i r e son t r a i t e m e n t i c i
# ( e c r i t u r e du t a b l e a u d e s t _ p i x e l s à p a r t i r de s r c _ p i x e l s )
#
#
38
40
42
44
46
# Recopie de l a r é g i o n de l ’ image t r a i t é e dans l a r é g i o n source
srcRgn [ 0 : nLargeur , 0 : nHauteur ] = d e s t _ p i x e l s . t o s t r i n g ( )
s r c _ p i x e l s = a r r a y ( "B" , srcRgn [ 0 : nLargeur , 0 : nHauteur ] ) # f a c u l t a t i f , seulement
pour un nouveau t r a i t e m e n t
layerImg_src . f l u s h ( )
l a y e r I m g _ s r c . update ( 0 , 0 , nLargeur , nHauteur )
gimp . pdb . gimp_drawable_update ( l a y e r I m g _ s r c , 0 , 0 , nLargeur , nHauteur )
pdb . gimp_selection_none ( inImage )
pdb . gimp_image_undo_group_end ( inImage )
r e t u r n inImage
Distribué sous licence CC by-nc-sa
page 33 / 79
Distribué sous licence CC by-nc-sa
22
www.VVpix.com
Barre de progression
Pour les traitements d’images longs (plus de 3 secondes), il est fortement conseillé de tenir l’utilisateur
informé de la progression du traitement.
1
3
5
7
gimp . p r o g r e s s _ i n i t ( " T r a i t e m e n t X de l ’ image \ " " + inImage . name + " \ " . . . " )
[...]
# Boucle de t r a i t e m e n t
f o r y i n range ( nHauteur ) :
gimp . progress_update ( f l o a t ( y ) / f l o a t ( nHauteur ) )
gimp . progress_update ( nProgress ) # nProgress e s t un f l o t t a n t de 0 . 0 à 1 . 0
[...]
gimp . pdb . gimp_progress_end ( )
Distribué sous licence CC by-nc-sa
page 34 / 79
Distribué sous licence CC by-nc-sa
23
23.1
www.VVpix.com
Exemples de manipulation des images
Création d’images
2
4
6
# Récupération de l a l i s t e des images de Gimp
l s t I m g = gimp . i m a g e _ l i s t ( )
p r i n t "Nb d ’ images : %d " %( l e n ( l s t I m g ) )
# Récupération de l a première image
img = l s t I m g [ 0 ]
8
10
12
# Créer une image
img = gimp . Image ( 5 0 , 5 0 )
# A f f i c h e r l a f e n ê t r e de l ’ image
gimp . D i s p l a y ( img )
14
16
# Récupérer des i n f o r m a t i o n s s u r l ’ image
p r i n t img . name
p r i n t img . f i l e n a m e
18
20
22
24
# D é f i n i r l e nom d ’ une image
gimp . pdb . gimp_image_set_filename ( img , " e s s a i " )
# A n n u l a t i o n des o p é r a t i o n s s u r une image
# − d é f i n i r l a l i s t e des o p é r a t i o n s à a n n u l e r
image . u n d o _ g r o u p _ s t a r t ( )
image . undo_group_end ( )
23.2
Utilisation des calques
1
i m p o r t gimp
3
# Récupérer l e nombre de calques dans une image
l e n ( inImage . l a y e r s )
5
7
9
#Récupérer l e calque a c t i f
l a y e r I m g _ s r c = gimp . pdb . g i m p _ i m a g e _ g e t _ a c t i v e _ l a y e r ( inImage )
#Récupérer l ’ i n d e x d ’ un calque
n I d x = gimp . pdb . g i m p _ i m a g e _ g e t _ l a y e r _ p o s i t i o n ( inImage , l a y e r I m g )
11
13
15
#Récupérer l e nom d ’ un calque
l a y e r I m g . name
# Déplacer un calque v e r s l e haut dans l a l i s t e des calques de l ’ image
gimp . pdb . g i m p _ i m a g e _ r a i s e _ l a y e r ( inImage , calque )
17
19
21
23
25
# Déplacer un calque v e r s l e bas dans l a l i s t e des calques de l ’ image
gimp . pdb . gimp_image_lower_layer ( inImage , calque )
# Changer l a v i s i b i l i t é d ’ un calque
b V i s i b l e = True
gimp . pdb . g i m p _ d r a w a b l e _ s e t _ v i s i b l e ( calque , b V i s i b l e )
# Récupération du t y p e de l ’ image
nType_image = gimp . pdb . gimp_image_base_type ( inImage ) # RGB, GRAY, INDEXED
27
# Récupération du t y p e de l ’ image
Distribué sous licence CC by-nc-sa
page 35 / 79
Distribué sous licence CC by-nc-sa
29
31
33
35
37
39
41
43
45
47
www.VVpix.com
nType_calque = gimp . pdb . gimp_drawable_type ( calque )
# RGB−IMAGE ( 0 ) , RGBA−IMAGE ( 1 ) , GRAY−IMAGE ( 2 ) , GRAYA−IMAGE ( 3 ) , INDEXED−IMAGE
( 4 ) , INDEXEDA−IMAGE ( 5 )
strM = " t y p e calque = " + s t r ( nLayer_type ) + " \ n "
nLargeur = 400
nLayer_type = 200
l a y e r = gimp . pdb . gimp_layer_new ( inImage , \
nLargeur , \
nHauteur , \
nLayer_type , \
" nom_calque " , \
100 , \
NORMAL_MODE )
# A j o u t du calque créé dans l ’ image en d e r n i è r e p o s i t i o n
n P o s i t i o n = l e n ( inImage . l a y e r s )
gimp . pdb . gimp_image_add_layer ( inImage , l a y e r , n P o s i t i o n )
# Déterminer s i un calque a un c a n a l alpha
gimp . pdb . gimp_drawable_has_alpha ( l a y e r I m g ) ) :
49
51
# O p é r a t i o n s s u r l e s calques
l a y e r _ c a d r e . f i l l ( TRANSPARENT_FILL )
layer_cadre . t r a n s l a t e ( x , y )
53
55
# T a i l l e du calque
nLargeur = l a y e r _ c a d r e . w i d t h
nHauteur = l a y e r _ c a d r e . h e i g h t
57
59
61
63
65
# P o s i t i o n du calque
# − lire
x0 = l a y e r _ c a d r e . o f f s e t s [ 0 ]
y0 = l a y e r _ c a d r e . o f f s e t s [ 1 ]
# − ecrire
layer_cadre . s e t _ o f f s e t s ( 0 , 0)
# Suppression du calque
gimp . pdb . gimp_image_remove_layer ( inImage , l a y e r )
23.3
Parcours de la liste des calques et groupes de calque
2
4
6
8
10
# −∗− coding : l a t i n −1 −∗−
# ! / u s r / b i n / env python
from gimpfu i m p o r t ∗
from gimpenums i m p o r t ∗
i m p o r t sys
i m p o r t os
i m p o r t math
from math i m p o r t ∗
import time
from a r r a y i m p o r t a r r a y
12
14
# Variables globales
nCpt_calques = 0
nCpt_groupes_calques = 0
16
18
d e f compter_nombre_de_calques_du_calque ( calque ) :
" " " Compte l e nombre de calques du groupe de calques " " "
g l o b a l nCpt_calques
Distribué sous licence CC by-nc-sa
page 36 / 79
Distribué sous licence CC by-nc-sa
20
22
24
26
28
30
32
www.VVpix.com
g l o b a l nCpt_groupes_calques
i f ( t y p e ( calque ) == gimp . Layer ) :
#gimp . pdb . gimp_message ( calque . name )
nCpt_calques = nCpt_calques + 1
return
i f ( t y p e ( calque ) == gimp . GroupLayer ) :
# c ’ e s t un goupe de calques
nCpt_groupes_calques = nCpt_groupes_calques + 1
#gimp . pdb . gimp_message ( " grp : " + calque . name )
# − p a r c o u r s de l a l i s t e des calques
f o r calque2 i n calque . l a y e r s :
compter_nombre_de_calques_du_calque ( calque2 )
return
return
34
36
38
40
42
44
46
48
d e f compter_nombre_de_calques ( inImage ) :
" " " Compte l e nombre de calques de l image " " "
g l o b a l nCpt_calques
g l o b a l nCpt_groupes_calques
strTypeImage = s t r ( t y p e ( inImage ) )
i f ( strTypeImage == " < t y p e ’ NoneType ’ > " ) :
strM = " I l f a u t d ’ abord c r e e r une image avant d ’ a p p e l e r ce s c r i p t "
gimp . message ( strM )
return
nCpt_calques = 0
nCpt_groupes_calques = 0
f o r calque i n inImage . l a y e r s :
compter_nombre_de_calques_du_calque ( calque )
50
52
strM = " Nombre de calques : " + s t r ( nCpt_calques )
strM = strM + " , nombre de groupes de calques : "
strM = strM + s t r ( nCpt_groupes_calques )
54
56
58
f o r handle i n [ MESSAGE_BOX, ERROR_CONSOLE ] :
gimp . pdb . gimp_message_set_handler ( handle ) #GIMP_MESSAGE_BOX ( 0 ) , GIMP_CONSOLE
( 1 ) , GIMP_ERROR_CONSOLE ( 2 ) }
gimp . pdb . gimp_message ( strM )
return
60
62
64
66
68
70
72
74
76
78
80
#−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
# V e r s i o n 1.00 : 05/03/2013
#
: première v e r s i o n
# V e r s i o n 1.01 : 13/03/2013
#
: p r i s e en compte des groupes de calques
#−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
register (
" python_fu_compter_nombre_de_calques " , # Nom de l a f o n c t i o n
" Compter l e nombre de calques " , # pas d ’ accents i c i
" Compter l e nombre de calques " , # pas d ’ accents i c i
" V i n c e n t Vansuyt " ,
" Licence GPL v2 " ,
" 2013 " ,
" <Image > / Python−Fu / Calques / Compter l e nombre de calques " , # pas d ’ accents i c i
"" ,
[
( PF_IMAGE , " inImage " , " I n p u t image " , None ) , ] ,
[] , # resultats
compter_nombre_de_calques ,
menu= " <Image > / Python−Fu / Calques / Compter l e nombre de calques " ,
Distribué sous licence CC by-nc-sa
page 37 / 79
Distribué sous licence CC by-nc-sa
82
84
www.VVpix.com
)
main ( )
23.3.1
Modification des textes de calque
Listing 19 – Renommage de tous les textes d’une image par “toto"
i m p o r t gimp
2
4
6
8
10
[...]
l s t C a l q u e s = inImage . l a y e r s
f o r calque i n l s t C a l q u e s :
# T r a i t e m e n t du calque s i c ’ e s t un calque de t e x t e
i f gimp . pdb . g i m p _ d r a w a b l e _ i s _ t e x t _ l a y e r ( calque ) :
s t r T e x t e = gimp . pdb . g i m p _ t e x t _ l a y e r _ g e t _ t e x t ( calque )
gimp . pdb . g i m p _ t e x t _ l a y e r _ s e t _ t e x t ( calque , u " t o t o " )
23.3.2
Écriture de texte
Écriture de ’toto’ en Arial taille 14 et en position x = 10, y = 10, sur un nouveau calque de l’image image.
num = gimp . pdb . gimp_text_fontname ( image , None , 1 0 . 0 , 1 0 . 0 , " t o t o " , 1 , False ,
14.0 , 1 , " A r i a l " )
23.4
Manipulation des sélections
1
3
5
# Récupérer l a s é l e c t i o n dans une image
s e l = img . s e l e c t i o n
p r i n t sel . type
2
p r i n t sel . v i s i b l e
True
7
9
11
13
# Récupérer l e s l i m i t e s d ’ une s e l e c t i o n
( b S e l e c t i o n , x1 , y1 , x2 , y2 ) = gimp . pdb . gimp_selection_bounds ( image )
# D é f i n i r une s é l e c t i o n
gimp . pdb . g i m p _ i m a g e _ s e t _ a c t i v e _ l a y e r ( image , l a y e r _ c a d r e )
gimp . pdb . g i m p _ r e c t _ s e l e c t ( image , 0 , 0 , l a r g e u r _ c a d r e , hauteur_cadre ,
CHANNEL_OP_REPLACE, FALSE , 0 )
23.5
Utilisation des sélections enregistrées dans un canal
Récupération d’un canal
1
3
>>> c = gimp . pdb . gimp_image_get_active_channel ( img )
>>> p r i n t c
<gimp . Channel ’ Copie de Masque de s é l e c t i o n ’ >
Distribué sous licence CC by-nc-sa
page 38 / 79
Distribué sous licence CC by-nc-sa
23.6
www.VVpix.com
Manipulation des guides
1
3
5
1
3
5
7
9
11
13
15
# A j o u t / s u p p r e s s i o n de guides
guide_h = img . add_hguide ( 1 0 0 ) # a j o u t e
p a r t i r du haut de l ’ image
guide_v = img . add_vguide ( 1 0 0 ) # a j o u t e
p a r t i r de l a gauche de l ’ image
img . d e l e t e _ g u i d e ( guide_h ) # e f f a c e l e
img . d e l e t e _ g u i d e ( guide_v ) # e f f a c e l e
un guide h o r i z o n t a l à l a p o s i t i o n 100 à
un guide v e r t i c a l à l a p o s i t i o n 100 à
guide h o r i z o n t a l
guide v e r t i c a l
# L e c t u r e e t s u p p r e s s i o n de t o u s l e s guides
d e f e f f a c e r _ g u i d e s ( inImage ) :
" " " E f f a c e l e s guides de l image " " "
num_guide = gimp . pdb . gimp_image_find_next_guide ( inImage , 0 )
w h i l e ( num_guide > 0 ) :
# n O r i e n t a t i o n == ORIENTATION−HORIZONTAL ( 0 ) , ORIENTATION−VERTICAL ( 1 )
n O r i e n t a t i o n = gimp . pdb . g i m p _ i m a g e _ g e t _ g u i d e _ o r i e n t a t i o n ( inImage , num_guide )
# P o s i t i o n par r a p p o r t au c o i n haut−gauche de l ’ image
n P o s i t i o n = gimp . pdb . g i m p _ i m a g e _ g e t _ g u i d e _ p o s i t i o n ( inImage , num_guide )
# Suppression
#gimp . pdb . gimp_image_delete_guide ( inImage , num_guide )
# suiv
num_guide = gimp . pdb . gimp_image_find_next_guide ( inImage , num_guide )
return
Distribué sous licence CC by-nc-sa
page 39 / 79
Distribué sous licence CC by-nc-sa
24
24.1
www.VVpix.com
Annexes
Module gimp
Listing 20 – Module gimp
1
Help on module gimp :
3
NAME
gimp − T h i s module p r o v i d e s i n t e r f a c e s t o a l l o w you t o w r i t e gimp p l u g i n s
5
FILE
7
9
11
13
15
17
19
21
23
c : \ program f i l e s \ gimp −2.0\ l i b \ gimp \ 2 . 0 \ python \ gimp . pyd
CLASSES
__builtin__ . object
Display
Drawable
Channel
Layer
Image
Parasite
PixelFetcher
PixelRgn
Tile
Vectors
e x c e p t i o n s . RuntimeError ( e x c e p t i o n s . S t a n d a r d E r r o r )
error
VectorsStroke ( _ _ b u i l t i n _ _ . object )
VectorsBezierStroke
25
27
29
31
33
35
37
39
41
43
45
47
49
51
53
55
c l a s s Channel ( Drawable )
| Method r e s o l u t i o n o r d e r :
|
Channel
|
Drawable
|
__builtin__ . object
|
| Methods d e f i n e d here :
|
| __cmp__ ( . . . )
|
x . __cmp__ ( y ) <==> cmp ( x , y )
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| combine_masks ( . . . )
|
| copy ( . . . )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Data d e s c r i p t o r s d e f i n e d here :
|
|
color
|
| colour
|
| opacity
|
| show_masked
Distribué sous licence CC by-nc-sa
page 40 / 79
Distribué sous licence CC by-nc-sa
57
59
61
63
65
67
69
71
73
75
77
79
81
83
85
87
89
91
93
95
97
99
101
103
105
107
109
111
113
115
117
119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s d e f i n e d here :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C95240>
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Methods i n h e r i t e d from Drawable :
attach_new_parasite ( . . . )
fill (...)
flush ( . . . )
free_shadow ( . . . )
get_pixel ( . . . )
get_pixel_rgn ( . . . )
get_tile ( . . . )
get_tile2 ( . . . )
mask_intersect ( . . . )
merge_shadow ( . . . )
offset ( . . . )
parasite_attach ( . . . )
parasite_detach ( . . . )
parasite_find ( . . . )
parasite_list ( . . . )
set_pixel ( . . . )
transform_2d ( . . . )
transform_2d_default ( . . . )
transform_flip ( . . . )
transform_flip_default ( . . . )
transform_flip_simple ( . . . )
transform_matrix ( . . . )
transform_matrix_default ( . . . )
transform_perspective ( . . . )
transform_perspective_default ( . . . )
transform_rotate ( . . . )
transform_rotate_default ( . . . )
Distribué sous licence CC by-nc-sa
page 41 / 79
Distribué sous licence CC by-nc-sa
121
123
125
127
129
131
133
135
137
139
141
143
145
147
149
151
153
155
157
159
161
163
165
167
169
171
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
transform_rotate_simple ( . . . )
transform_scale ( . . . )
transform_scale_default ( . . . )
transform_shear ( . . . )
transform_shear_default ( . . . )
update ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s i n h e r i t e d from Drawable :
ID
bpp
has_alpha
height
image
is_gray
is_grey
is_indexed
is_layer_mask
is_rgb
linked
mask_bounds
name
offsets
tattoo
type
type_with_alpha
visible
width
173
175
177
179
181
class Display ( __builtin__ . object )
| Methods d e f i n e d here :
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
Distribué sous licence CC by-nc-sa
page 42 / 79
Distribué sous licence CC by-nc-sa
183
185
187
189
191
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s d e f i n e d here :
ID
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s d e f i n e d here :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C94600>
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
193
195
197
199
201
203
205
207
209
211
213
215
217
219
221
223
225
227
229
231
233
235
237
239
241
243
245
c l a s s Drawable ( _ _ b u i l t i n _ _ . o b j e c t )
| Methods d e f i n e d here :
|
| __cmp__ ( . . . )
|
x . __cmp__ ( y ) <==> cmp ( x , y )
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| attach_new_parasite ( . . . )
|
|
fill (...)
|
|
flush ( . . . )
|
| free_shadow ( . . . )
|
|
get_pixel ( . . . )
|
| get_pixel_rgn ( . . . )
|
|
get_tile ( . . . )
|
|
get_tile2 ( . . . )
|
| mask_intersect ( . . . )
|
| merge_shadow ( . . . )
|
|
offset ( . . . )
|
|
parasite_attach ( . . . )
|
| parasite_detach ( . . . )
|
|
parasite_find ( . . . )
|
|
parasite_list ( . . . )
|
|
set_pixel ( . . . )
|
| transform_2d ( . . . )
|
| transform_2d_default ( . . . )
|
|
transform_flip ( . . . )
|
|
transform_flip_default ( . . . )
|
|
transform_flip_simple ( . . . )
|
| transform_matrix ( . . . )
Distribué sous licence CC by-nc-sa
page 43 / 79
Distribué sous licence CC by-nc-sa
247
249
251
253
255
257
259
261
263
265
267
269
271
273
275
277
279
281
283
285
287
289
291
293
295
297
299
301
303
305
307
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
transform_matrix_default ( . . . )
transform_perspective ( . . . )
transform_perspective_default ( . . . )
transform_rotate ( . . . )
transform_rotate_default ( . . . )
transform_rotate_simple ( . . . )
transform_scale ( . . . )
transform_scale_default ( . . . )
transform_shear ( . . . )
transform_shear_default ( . . . )
update ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s d e f i n e d here :
ID
bpp
has_alpha
height
image
is_gray
is_grey
is_indexed
is_layer_mask
is_rgb
linked
mask_bounds
name
offsets
tattoo
type
type_with_alpha
visible
width
Distribué sous licence CC by-nc-sa
page 44 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
309
311
313
315
317
319
321
323
325
327
329
331
333
335
337
339
341
343
345
347
349
351
353
355
357
359
361
363
365
367
369
371
c l a s s Image ( _ _ b u i l t i n _ _ . o b j e c t )
| Methods d e f i n e d here :
|
| __cmp__ ( . . . )
|
x . __cmp__ ( y ) <==> cmp ( x , y )
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| add_channel ( . . . )
|
| add_hguide ( . . . )
|
| add_layer ( . . . )
|
| add_vguide ( . . . )
|
| attach_new_parasite ( . . . )
|
|
clean_all ( . . . )
|
| crop ( . . . )
|
| delete_guide ( . . . )
|
| disable_undo ( . . . )
|
|
duplicate ( . . . )
|
| enable_undo ( . . . )
|
| find_next_guide ( . . . )
|
|
flatten ( . . . )
|
| free_shadow ( . . . )
|
| get_channel_by_tattoo ( . . . )
|
| get_component_active ( . . . )
|
| get_component_visible ( . . . )
|
|
get_guide_orientation ( . . . )
|
| get_guide_position ( . . . )
|
|
get_layer_by_tattoo ( . . . )
|
| lower_channel ( . . . )
|
| lower_layer ( . . . )
|
| lower_layer_to_bottom ( . . . )
|
| merge_down ( . . . )
|
| merge_visible_layers ( . . . )
|
Distribué sous licence CC by-nc-sa
page 45 / 79
Distribué sous licence CC by-nc-sa
373
375
377
379
381
383
385
387
389
391
393
395
397
399
401
403
405
407
409
411
413
415
417
419
421
423
425
427
429
431
433
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
new_layer ( . . . )
parasite_attach ( . . . )
parasite_detach ( . . . )
parasite_find ( . . . )
parasite_list ( . . . )
pick_correlate_layer ( . . . )
raise_channel ( . . . )
raise_layer ( . . . )
raise_layer_to_top ( . . . )
remove_channel ( . . . )
remove_layer ( . . . )
resize ( . . . )
resize_to_layers ( . . . )
scale ( . . . )
set_component_active ( . . . )
set_component_visible ( . . . )
undo_freeze ( . . . )
undo_group_end ( . . . )
undo_group_start ( . . . )
undo_is_enabled ( . . . )
undo_thaw ( . . . )
unset_active_channel ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s d e f i n e d here :
ID
active_channel
active_drawable
active_layer
base_type
channels
colormap
dirty
Distribué sous licence CC by-nc-sa
page 46 / 79
Distribué sous licence CC by-nc-sa
435
437
439
441
443
445
447
449
451
453
455
457
459
461
463
465
467
469
471
473
475
477
479
481
483
485
487
489
491
493
495
497
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
filename
floating_sel_attached_to
floating_selection
height
layers
name
resolution
selection
tattoo_state
unit
vectors
width
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s d e f i n e d here :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C95840>
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
c l a s s Layer ( Drawable )
| Method r e s o l u t i o n o r d e r :
|
Layer
|
Drawable
|
__builtin__ . object
|
| Methods d e f i n e d here :
|
| __cmp__ ( . . . )
|
x . __cmp__ ( y ) <==> cmp ( x , y )
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| add_alpha ( . . . )
|
| add_mask ( . . . )
|
| copy ( . . . )
|
| create_mask ( . . . )
|
| remove_mask ( . . . )
|
|
resize ( . . . )
|
| resize_to_image_size ( . . . )
|
| scale ( . . . )
|
Distribué sous licence CC by-nc-sa
page 47 / 79
Distribué sous licence CC by-nc-sa
499
501
503
505
507
509
511
513
515
517
519
521
523
525
527
529
531
533
535
537
539
541
543
545
547
549
551
553
555
557
559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
set_offsets ( . . . )
translate ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s d e f i n e d here :
apply_mask
edit_mask
is_floating_sel
lock_alpha
mask
mode
opacity
preserve_trans
show_mask
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s d e f i n e d here :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C950A0>
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Methods i n h e r i t e d from Drawable :
attach_new_parasite ( . . . )
fill (...)
flush ( . . . )
free_shadow ( . . . )
get_pixel ( . . . )
get_pixel_rgn ( . . . )
get_tile ( . . . )
get_tile2 ( . . . )
mask_intersect ( . . . )
merge_shadow ( . . . )
offset ( . . . )
parasite_attach ( . . . )
parasite_detach ( . . . )
parasite_find ( . . . )
parasite_list ( . . . )
Distribué sous licence CC by-nc-sa
page 48 / 79
Distribué sous licence CC by-nc-sa
561
563
565
567
569
571
573
575
577
579
581
583
585
587
589
591
593
595
597
599
601
603
605
607
609
611
613
615
617
619
621
623
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
set_pixel ( . . . )
transform_2d ( . . . )
transform_2d_default ( . . . )
transform_flip ( . . . )
transform_flip_default ( . . . )
transform_flip_simple ( . . . )
transform_matrix ( . . . )
transform_matrix_default ( . . . )
transform_perspective ( . . . )
transform_perspective_default ( . . . )
transform_rotate ( . . . )
transform_rotate_default ( . . . )
transform_rotate_simple ( . . . )
transform_scale ( . . . )
transform_scale_default ( . . . )
transform_shear ( . . . )
transform_shear_default ( . . . )
update ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s i n h e r i t e d from Drawable :
ID
bpp
has_alpha
height
image
is_gray
is_grey
is_indexed
is_layer_mask
is_rgb
linked
mask_bounds
Distribué sous licence CC by-nc-sa
page 49 / 79
Distribué sous licence CC by-nc-sa
625
627
629
631
633
635
637
639
641
643
645
647
649
651
653
655
657
659
661
663
665
667
669
671
673
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
name
offsets
tattoo
type
type_with_alpha
visible
width
class Parasite ( __builtin__ . object )
| Methods d e f i n e d here :
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| __str__ ( . . . )
|
x . _ _ s t r _ _ ( ) <==> s t r ( x )
|
| copy ( . . . )
|
| has_flag ( . . . )
|
| is_type ( . . . )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Data d e s c r i p t o r s d e f i n e d here :
|
| data
|
|
flags
|
|
is_persistent
|
| is_undoable
|
| name
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Data and o t h e r a t t r i b u t e s d e f i n e d here :
|
| __new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C959E0>
|
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
675
677
679
681
683
685
class PixelFetcher ( __builtin__ . object )
| Methods d e f i n e d here :
|
| __delitem__ ( . . . )
|
x . __delitem__ ( y ) <==> d e l x [ y ]
|
| __getitem__ ( . . . )
|
x . __getitem__ ( y ) <==> x [ y ]
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
Distribué sous licence CC by-nc-sa
page 50 / 79
Distribué sous licence CC by-nc-sa
687
689
691
693
695
697
699
701
703
705
707
709
711
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
__len__ ( . . . )
x . __len__ ( ) <==> l e n ( x )
__repr__ ( . . . )
x . __repr__ ( ) <==> r e p r ( x )
__setitem__ ( . . . )
x . __setitem__ ( i , y ) <==> x [ i ] = y
get_pixel ( . . . )
put_pixel ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s d e f i n e d here :
bg_color
edge_mode
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s d e f i n e d here :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C961A0>
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
713
715
717
719
721
723
725
727
729
731
733
735
737
739
741
743
745
747
749
c l a s s PixelRgn ( _ _ b u i l t i n _ _ . o b j e c t )
| Methods d e f i n e d here :
|
| __delitem__ ( . . . )
|
x . __delitem__ ( y ) <==> d e l x [ y ]
|
| __getitem__ ( . . . )
|
x . __getitem__ ( y ) <==> x [ y ]
|
| __len__ ( . . . )
|
x . __len__ ( ) <==> l e n ( x )
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| __setitem__ ( . . . )
|
x . __setitem__ ( i , y ) <==> x [ i ] = y
|
|
resize ( . . . )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Data d e s c r i p t o r s d e f i n e d here :
|
| bpp
|
|
dirty
|
| drawable
|
| h
|
|
rowstride
|
| shadow
|
| w
Distribué sous licence CC by-nc-sa
page 51 / 79
Distribué sous licence CC by-nc-sa
751
753
755
757
759
761
763
765
767
769
771
773
775
777
779
781
783
785
787
789
|
|
|
|
www.VVpix.com
x
y
class T i l e ( __builtin__ . object )
| Methods d e f i n e d here :
|
| __delitem__ ( . . . )
|
x . __delitem__ ( y ) <==> d e l x [ y ]
|
| __getitem__ ( . . . )
|
x . __getitem__ ( y ) <==> x [ y ]
|
| __len__ ( . . . )
|
x . __len__ ( ) <==> l e n ( x )
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| __setitem__ ( . . . )
|
x . __setitem__ ( i , y ) <==> x [ i ] = y
|
|
flush ( . . . )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Data d e s c r i p t o r s d e f i n e d here :
|
| bpp
|
|
dirty
|
| drawable
|
| eheight
|
| ewidth
|
| shadow
|
| tile_num
791
793
795
797
799
801
803
805
807
809
811
class Vectors ( _ _ b u i l t i n _ _ . o b j e c t )
| Methods d e f i n e d here :
|
| __cmp__ ( . . . )
|
x . __cmp__ ( y ) <==> cmp ( x , y )
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
|
parasite_attach ( . . . )
|
| parasite_detach ( . . . )
|
|
parasite_find ( . . . )
|
|
parasite_list ( . . . )
|
| remove_stroke ( . . . )
Distribué sous licence CC by-nc-sa
page 52 / 79
Distribué sous licence CC by-nc-sa
813
815
817
819
821
823
825
827
829
831
833
835
837
839
841
843
845
847
849
851
853
855
857
859
861
863
865
867
869
871
873
875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
to_selection ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s d e f i n e d here :
ID
image
linked
name
strokes
tattoo
visible
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s d e f i n e d here :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C967C0>
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
class VectorsBezierStroke ( VectorsStroke )
| Method r e s o l u t i o n o r d e r :
|
VectorsBezierStroke
|
VectorsStroke
|
__builtin__ . object
|
| Methods d e f i n e d here :
|
| __cmp__ ( . . . )
|
x . __cmp__ ( y ) <==> cmp ( x , y )
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| __repr__ ( . . . )
|
x . __repr__ ( ) <==> r e p r ( x )
|
| conicto ( . . . )
|
| cubicto ( . . . )
|
|
lineto ( . . . )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Data and o t h e r a t t r i b u t e s d e f i n e d here :
|
| __new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x70C965A0>
|
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
|
| n e w _ e l l i p s e = < b u i l t −i n method n e w _ e l l i p s e o f t y p e o b j e c t a t 0x70C965A . . .
|
|
| new_moveto = < b u i l t −i n method new_moveto o f t y p e o b j e c t a t 0x70C965A0>
|
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Methods i n h e r i t e d from V e c t o r s S t r o k e :
Distribué sous licence CC by-nc-sa
page 53 / 79
Distribué sous licence CC by-nc-sa
877
879
881
883
885
887
889
891
893
895
897
899
901
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
close ( . . . )
flip (...)
flip_free ( . . . )
get_length ( . . . )
get_point_at_dist ( . . . )
interpolate ( . . . )
rotate ( . . . )
scale ( . . . )
translate ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s i n h e r i t e d from V e c t o r s S t r o k e :
ID
points
vectors_ID
903
905
907
909
911
913
915
917
919
921
923
925
927
929
931
933
935
937
c l a s s e r r o r ( e x c e p t i o n s . RuntimeError )
| Method r e s o l u t i o n o r d e r :
|
error
|
e x c e p t i o n s . RuntimeError
|
exceptions . StandardError
|
exceptions . Exception
|
e x c e p t i o n s . BaseException
|
__builtin__ . object
|
| Data d e s c r i p t o r s d e f i n e d here :
|
| __weakref__
|
l i s t o f weak r e f e r e n c e s t o t h e o b j e c t ( i f d e f i n e d )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Methods i n h e r i t e d from e x c e p t i o n s . RuntimeError :
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see x . __class__ . __doc__ f o r s i g n a t u r e
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Data and o t h e r a t t r i b u t e s i n h e r i t e d from e x c e p t i o n s . RuntimeError :
|
| __new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t a t 0x1E1CD748>
|
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Methods i n h e r i t e d from e x c e p t i o n s . BaseException :
|
|
__delattr__ ( . . . )
|
x . _ _ d e l a t t r _ _ ( ’ name ’ ) <==> d e l x . name
|
|
__getattribute__ ( . . . )
|
x . _ _ g e t a t t r i b u t e _ _ ( ’ name ’ ) <==> x . name
|
Distribué sous licence CC by-nc-sa
page 54 / 79
Distribué sous licence CC by-nc-sa
939
941
943
945
947
949
951
953
955
957
959
961
963
965
967
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
__getitem__ ( . . . )
x . __getitem__ ( y ) <==> x [ y ]
__getslice__ ( . . . )
x . _ _ g e t s l i c e _ _ ( i , j ) <==> x [ i : j ]
Use o f n e g a t i v e i n d i c e s i s n o t supported .
__reduce__ ( . . . )
__repr__ ( . . . )
x . __repr__ ( ) <==> r e p r ( x )
__setattr__ ( . . . )
x . _ _ s e t a t t r _ _ ( ’ name ’ , v a l u e ) <==> x . name = v a l u e
__setstate__ ( . . . )
__str__ ( . . . )
x . _ _ s t r _ _ ( ) <==> s t r ( x )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s i n h e r i t e d from e x c e p t i o n s . BaseException :
__dict__
args
message
e x c e p t i o n message
969
971
FUNCTIONS
attach_new_parasite ( . . . )
973
check_size ( . . . )
975
check_type ( . . . )
977
checks_get_shades ( . . . )
979
context_get_gradient ( . . . )
981
context_pop ( . . . )
983
context_push ( . . . )
985
context_set_gradient ( . . . )
987
default_display ( . . . )
989
delete ( . . . )
991
display_name ( . . . )
993
displays_flush ( . . . )
995
displays_reconnect ( . . . )
997
domain_register ( . . . )
999
exit ( . . . )
1001
extension_ack ( . . . )
Distribué sous licence CC by-nc-sa
page 55 / 79
Distribué sous licence CC by-nc-sa
1003
extension_enable ( . . . )
1005
extension_process ( . . . )
1007
fonts_get_list ( . . . )
1009
fonts_refresh ( . . . )
1011
gamma ( . . . )
1013
get_background ( . . . )
1015
get_data ( . . . )
1017
get_foreground ( . . . )
1019
get_progname ( . . . )
1021
gradient_get_custom_samples ( . . . )
1023
gradient_get_uniform_samples ( . . . )
1025
gradients_get_gradient ( . . . )
1027
gradients_get_list ( . . . )
1029
gradients_sample_custom ( . . . )
1031
gradients_sample_uniform ( . . . )
1033
gradients_set_gradient ( . . . )
1035
gtkrc ( . . . )
1037
image_list ( . . . )
1039
install_cmap ( . . . )
1041
install_procedure ( . . . )
1043
install_temp_proc ( . . . )
1045
main ( . . . )
1047
menu_register ( . . . )
1049
message ( . . . )
1051
min_colors ( . . . )
1053
monitor_number ( . . . )
1055
parasite_attach ( . . . )
1057
parasite_detach ( . . . )
1059
parasite_find ( . . . )
1061
parasite_list ( . . . )
1063
personal_rc_file ( . . . )
Distribué sous licence CC by-nc-sa
www.VVpix.com
page 56 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
1065
progress_init ( . . . )
1067
progress_install ( . . . )
1069
progress_uninstall ( . . . )
1071
progress_update ( . . . )
1073
quit ( . . . )
1075
register_load_handler ( . . . )
1077
register_magic_load_handler ( . . . )
1079
register_save_handler ( . . . )
1081
set_background ( . . . )
1083
set_data ( . . . )
1085
set_foreground ( . . . )
1087
show_help_button ( . . . )
1089
show_tool_tips ( . . . )
1091
tile_cache_ntiles ( . . . )
1093
tile_cache_size ( . . . )
1095
tile_height ( . . . )
1097
tile_width ( . . . )
1099
uninstall_temp_proc ( . . . )
1101
user_directory ( . . . )
1103
vectors_import_from_file ( . . . )
1105
vectors_import_from_string ( . . . )
1107
wm_class ( . . . )
1109
DATA
d a t a _ d i r e c t o r y = r ’C : \ Program F i l e s \ GIMP−2.0\ share \ gimp \ 2 . 0 ’
d i r e c t o r y = r ’C : \ Documents and S e t t i n g s \ PC_JYD \ . gimp −2.6 ’
l o c a l e _ d i r e c t o r y = r ’C : \ Program F i l e s \ GIMP−2.0\ share \ l o c a l e ’
pdb = <gimp p r o c e d u r a l database >
p l u g _ i n _ d i r e c t o r y = r ’C : \ Program F i l e s \ GIMP−2.0\ l i b \ gimp \ 2 . 0 ’
s y s c o n f _ d i r e c t o r y = r ’C : \ Program F i l e s \ GIMP−2.0\ e t c \ gimp \ 2 . 0 ’
version = (2 , 6 , 6)
1111
1113
1115
24.2
Module gimp.pdb
Listing 21 – Module gimp.pdb
2
>>> d i r ( gimp . pdb )
[ ’ __class__ ’ , ’ _ _ d e l a t t r _ _ ’ , ’ __doc__ ’ , ’ _ _ g e t a t t r i b u t e _ _ ’ , ’ __getitem__ ’ , ’
__hash__ ’ , ’ _ _ i n i t _ _ ’ , ’ __new__ ’ , ’ __reduce__ ’ , ’ __reduce_ex__ ’ , ’ __repr__ ’ , ’
__setattr__ ’ , ’ __str__ ’ ,
Distribué sous licence CC by-nc-sa
page 57 / 79
Distribué sous licence CC by-nc-sa
4
1
3
2
4
6
2
www.VVpix.com
’ extension_gimp_help ’ ,
’ extension_script_fu ’ ,
’ f i l e _ b m p _ l o a d ’ , ’ file_bmp_save ’ , ’ f i l e _ b z 2 _ l o a d ’ , ’ f i l e _ b z 2 _ s a v e ’ , ’ f i l e _ c e l _ l o a d
’ , ’ file_cel_save ’ , ’ file_colorxhtml_save ’ , ’ file_csource_save ’ , ’
file_desktop_link_load ’ , ’ file_dicom_load ’ , ’ file_dicom_save ’ , ’ file_eps_load ’ ,
’ file_eps_save ’ , ’ file_faxg3_load ’ , ’ f i l e _ f i t s _ l o a d ’ , ’ f i l e _ f i t s _ s a v e ’ , ’
f i l e _ f l i _ i n f o ’ , ’ f i l e _ f l i _ l o a d ’ , ’ file_fli_save ’ , ’ file_gbr_load ’ , ’
file_gbr_save ’ , ’ f i l e _ g i f _ l o a d ’ , ’ file_gif_load_thumb ’ , ’ file_gif_save ’ , ’
f i l e _ g i h _ l o a d ’ , ’ file_gih_save ’ , ’ f i l e _ g l o b ’ , ’ file_gtm_save ’ , ’ file_gz_load ’ ,
’ file_gz_save ’ , ’ file_header_save ’ , ’ f i l e _ i c o _ l o a d ’ , ’ file_ico_load_thumb ’ , ’
file_ico_save ’ , ’ file_jpeg_load ’ , ’ file_jpeg_load_thumb ’ , ’ file_jpeg_save ’ , ’
file_mng_save ’ , ’ f i l e _ p a t _ l o a d ’ , ’ f i l e _ p a t _ s a v e ’ , ’ file_pbm_save ’ , ’
file_pcx_load ’ , ’ file_pcx_save ’ , ’ file_pdf_load ’ , ’ file_pdf_load_thumb ’ , ’
file_pgm_save ’ , ’ f i l e _ p i x _ l o a d ’ , ’ f i l e _ p i x _ s a v e ’ , ’ f i l e _ p n g _ g e t _ d e f a u l t s ’ , ’
file_png_load ’ , ’ file_png_save ’ , ’ file_png_save2 ’ , ’ file_png_save_defaults ’ , ’
f i l e _ p n g _ s e t _ d e f a u l t s ’ , ’ f i l e _ p n m _ l o a d ’ , ’ file_pnm_save ’ , ’ file_ppm_save ’ , ’
f i l e _ p r i n t _ g t k ’ , ’ file_print_gtk_page_setup ’ , ’ file_ps_load ’ , ’
file_ps_load_setargs ’ , ’ file_ps_load_thumb ’ , ’ file_ps_save ’ , ’ file_psd_load ’ , ’
file_psd_load_thumb ’ , ’ file_psd_save ’ , ’ file_psp_load ’ , ’ file_raw_load ’ , ’
file_raw_save ’ , ’ f i l e _ s g i _ l o a d ’ , ’ file_sgi_save ’ , ’ file_sunras_load ’ , ’
file_sunras_save ’ , ’ file_svg_load ’ , ’ file_svg_load_thumb ’ , ’ f i l e _ t g a _ l o a d ’ , ’
file_tga_save ’ , ’ f i l e _ t i f f _ l o a d ’ , ’ f i l e _ t i f f _ s a v e ’ , ’ f i l e _ t i f f _ s a v e 2 ’ , ’
f i l e _ u r i _ l o a d ’ , ’ f i l e _ u r i _ s a v e ’ , ’ f i l e _ w m f _ l o a d ’ , ’ file_wmf_load_thumb ’ , ’
file_xbm_load ’ , ’ file_xbm_save ’ , ’ file_xpm_load ’ , ’ file_xpm_save ’ , ’
file_xwd_load ’ , ’ file_xwd_save ’ ,
’ g i m p _ a i r b r u s h ’ , ’ g i m p _ a i r b r u s h _ d e f a u l t ’ , ’ gimp_blend ’ , ’ g i m p _ b r i g h t n e s s _ c o n t r a s t ’
,
’ gimp_brush_delete ’ , ’ g i m p _ b r u s h _ d u p l i c a t e ’ , ’ gimp_brush_get_angle ’ , ’
g i m p _ b r u s h _ g e t _ a s p e c t _ r a t i o ’ , ’ gimp_brush_get_hardness ’ , ’ g i m p _ b r u s h _ g e t _ i n f o ’ ,
’ g i m p _ b r u s h _ g e t _ p i x e l s ’ , ’ gimp_brush_get_radius ’ , ’ gimp_brush_get_shape ’ , ’
gimp_brush_get_spacing ’ , ’ gimp_brush_get_spikes ’ , ’ g i m p _ b r u s h _ i s _ e d i t a b l e ’ , ’
gimp_brush_is_generated ’ , ’ gimp_brush_new ’ , ’ gimp_brush_rename ’ , ’
gimp_brush_set_angle ’ , ’ g i m p _ b r u s h _ s e t _ a s p e c t _ r a t i o ’ , ’ gimp_brush_set_hardness ’
, ’ g i m p _ b r u s h _ s e t _ r a d i u s ’ , ’ gimp_brush_set_shape ’ , ’ gimp_brush_set_spacing ’ , ’
gimp_brush_set_spikes ’ , ’ gimp_brushes_close_popup ’ , ’ gimp_brushes_get_brush ’ , ’
gimp_brushes_get_brush_data ’ , ’ g i m p _ b r u s h e s _ g e t _ l i s t ’ , ’
gimp_brushes_get_opacity ’ , ’ gimp_brushes_get_paint_mode ’ , ’
gimp_brushes_get_spacing ’ , ’ g i m p _ b r u s h e s _ l i s t ’ , ’ gimp_brushes_popup ’ , ’
gimp_brushes_refresh ’ , ’ gimp_brushes_set_brush ’ , ’ g i m p _ b r u s h e s _ s e t _ o p a c i t y ’ , ’
gimp_brushes_set_paint_mode ’ , ’ gimp_brushes_set_popup ’ , ’
gimp_brushes_set_spacing ’ ,
’ gimp_bucket_fill ’ ,
’ gimp_buffer_delete ’ , ’ gimp_buffer_get_bytes ’ , ’ gimp_buffer_get_height ’ , ’
gimp_buffer_get_image_type ’ , ’ g i m p _ b u f f e r _ g e t _ w i d t h ’ , ’ gimp_buffer_rename ’ , ’
gimp_buffers_get_list ’ ,
’ g i m p _ b y _ c o l o r _ s e l e c t ’ , ’ g i m p _ b y _ c o l o r _ s e l e c t _ f u l l ’ , ’ gimp_channel_combine_masks ’ ,
’ gimp_channel_copy ’ , ’ gimp_channel_delete ’ , ’ g i m p _ c h a n n e l _ g e t _ c o l o r ’ , ’
gimp_channel_get_name ’ ,
’ g i m p _ c h a n n e l _ g e t _ o p a c i t y ’ , ’ gimp_channel_get_show_masked ’ , ’
gimp_channel_get_tattoo ’ ,
’ g i m p _ c h a n n e l _ g e t _ v i s i b l e ’ , ’ gimp_channel_new ’ , ’ gimp_channel_new_from_component ’ ,
’ gimp_channel_ops_duplicate ’ , ’ g i m p _ c h a n n e l _ o p s _ o f f s e t ’ , ’ g i m p _ c h a n n e l _ s e t _ c o l o r ’ ,
’ gimp_channel_set_name ’ , ’ g i m p _ c h a n n e l _ s e t _ o p a c i t y ’ , ’ gimp_channel_set_show_masked
’,
’ gimp_channel_set_tattoo ’ , ’ gimp_channel_set_visible ’ ,
’ gimp_clone ’ , ’ g i m p _ c l o n e _ d e f a u l t ’ ,
’ gimp_color_balance ’ , ’ g i m p _ c o l o r _ p i c k e r ’ , ’ g i m p _ c o l o r i z e ’ , ’
gimp_context_get_background ’ , ’ gimp_context_get_brush ’ , ’ g i m p _ c o n t e x t _ g e t _ f o n t ’
, ’ gimp_context_get_foreground ’ , ’ gimp_context_get_gradient ’ , ’
Distribué sous licence CC by-nc-sa
page 58 / 79
Distribué sous licence CC by-nc-sa
4
2
www.VVpix.com
g i m p _ c o n t e x t _ g e t _ o p a c i t y ’ , ’ gimp_context_get_paint_method ’ , ’
gimp_context_get_paint_mode ’ , ’ g i m p _ c o n t e x t _ g e t _ p a l e t t e ’ , ’
g i m p _ c o n t e x t _ g e t _ p a t t e r n ’ , ’ g i m p _ c o n t e x t _ l i s t _ p a i n t _ m e t h o d s ’ , ’ gimp_context_pop
’ , ’ gimp_context_push ’ , ’ gimp_context_set_background ’ , ’ g i m p _ c o n t e x t _ s e t _b r u s h ’
, ’ gimp_context_set_default_colors ’ , ’ gimp_context_set_font ’ , ’
gimp_context_set_foreground ’ , ’ gimp_context_set_gradient ’ , ’
g i m p _ c o n t e x t _ s e t _ o p a c i t y ’ , ’ gimp_context_set_paint_method ’ , ’
gimp_context_set_paint_mode ’ , ’ g i m p _ c o n t e x t _ s e t _ p a l e t t e ’ , ’
g i m p _ c o n t e x t _ s e t _ p a t t e r n ’ , ’ gimp_context_swap_colors ’ , ’ g i m p _ c o n v e r t _ g r a y s c a l e ’
, ’ gimp_convert_indexed ’ , ’ gimp_convert_rgb ’ , ’ gimp_convolve ’ , ’
g i m p _ c o n v o l v e _ d e f a u l t ’ , ’ gimp_crop ’ , ’ g i m p _ c u r v e s _ e x p l i c i t ’ , ’
g i m p _ c u r v e s _ s p l i n e ’ , ’ gimp_desaturate ’ , ’ g i m p _ d e s a t u r a t e _ f u l l ’ ,
’ g i m p _ d i s p l a y _ d e l e t e ’ , ’ gimp_display_get_window_handle ’ , ’ g i m p _ d i s p l a y _ i s _ v a l i d ’ ,
’ gimp_display_new ’ , ’ g i m p _ d i s p l a y s _ f l u s h ’ , ’ g i m p _ d i s p l a y s _ r e c o n n e c t ’ ,
’ gimp_dodgeburn ’ , ’ gimp_dodgeburn_default ’ ,
’ gimp_drawable_bpp ’ , ’ gimp_drawable_bytes ’ , ’ gimp_drawable_delete ’ , ’
gimp_drawable_fill ’ , ’ gimp_drawable_foreground_extract ’ , ’
gimp_drawable_free_shadow ’ , ’ gimp_drawable_get_image ’ , ’
g i m p _ d r a w a b l e _ g e t _ l i n k e d ’ , ’ gimp_drawable_get_name ’ , ’ g i m p _ d r a w a b l e _ g e t _ p i x e l ’ ,
’ gimp_drawable_get_tattoo ’ , ’ gimp_drawable_get_visible ’ , ’
gimp_drawable_has_alpha ’ , ’ gimp_drawable_height ’ , ’ gimp_drawable_image ’ , ’
gimp_drawable_is_channel ’ , ’ gimp_drawable_is_gray ’ , ’ gimp_drawable_is_indexed ’ ,
’ g i m p _ d r a w a b l e _ i s _ l a y e r ’ , ’ gimp_drawable_is_layer_mask ’ , ’ gimp_drawable_is_rgb
’ , ’ gimp_drawable_is_text_layer ’ , ’ gimp_drawable_is_valid ’ , ’
gimp_drawable_mask_bounds ’ , ’ gimp_drawable_mask_intersect ’ , ’
gimp_drawable_merge_shadow ’ , ’ g i m p _ d r a w a b l e _ o f f s e t ’ , ’ g i m p _ d r a w a b l e _ o f f s e t s ’ , ’
g i m p _ d r a w a b l e _ p a r a s i t e _ a t t a c h ’ , ’ gimp_drawable_parasite_detach ’ , ’
gimp_drawable_parasite_find ’ , ’ gimp_drawable_parasite_list ’ , ’
gimp_drawable_set_image ’ , ’ g i m p _ d r a w a b l e _ s e t _ l i n k e d ’ , ’ gimp_drawable_set_name ’ ,
’ gimp_drawable_set_pixel ’ , ’ gimp_drawable_set_tattoo ’ , ’
g i m p _ d r a w a b l e _ s e t _ v i s i b l e ’ , ’ gimp_drawable_sub_thumbnail ’ , ’
gimp_drawable_thumbnail ’ , ’ gimp_drawable_transform_2d ’ , ’
gimp_drawable_transform_2d_default ’ ,
’ gimp_drawable_transform_flip ’ , ’ gimp_drawable_transform_flip_default ’ , ’
gimp_drawable_transform_flip_simple ’ , ’ gimp_drawable_transform_matrix ’ , ’
gimp_drawable_transform_matrix_default ’ , ’ gimp_drawable_transform_perspective ’ ,
’ gimp_drawable_transform_perspective_default ’ , ’ gimp_drawable_transform_rotate
’ , ’ gimp_drawable_transform_rotate_default ’ , ’
g i m p _ d r a w a b l e _ t r a n s f o r m _ r o t a t e _ s i m p l e ’ , ’ gimp_drawable_transform_scale ’ , ’
g i m p _ d r a w a b l e _ t r a n s f o r m _ s c a l e _ d e f a u l t ’ , ’ gimp_drawable_transform_shear ’ , ’
g i m p _ d r a w a b l e _ t r a n s f o r m _ s h e a r _ d e f a u l t ’ , ’ gimp_drawable_type ’ , ’
gimp_drawable_type_with_alpha ’ , ’ gimp_drawable_update ’ , ’ gimp_drawable_width ’ ,
4
’ gimp_edit_blend ’ , ’ g i m p _ e d i t _ b u c k e t _ f i l l ’ , ’ g i m p _ e d i t _ b u c k e t _ f i l l _ f u l l ’ , ’
g i m p _ e d i t _ c l e a r ’ , ’ gimp_edit_copy ’ , ’ g i m p _ e d i t _ c o p y _ v i s i b l e ’ , ’ g i m p _ e d i t _ c u t ’ ,
’ g i m p _ e d i t _ f i l l ’ , ’ gimp_edit_named_copy ’ , ’ gimp_edit_named_copy_visible ’ , ’
gimp_edit_named_cut ’ , ’ gimp_edit_named_paste ’ , ’ gimp_edit_named_paste_as_new ’ ,
’ g i m p _ e d i t _ p a s t e ’ , ’ gimp_edit_paste_as_new ’ , ’ g i m p _ e d i t _ s t r o k e ’ , ’
gimp_edit_stroke_vectors ’ ,
6
’ g i m p _ e l l i p s e _ s e l e c t ’ , ’ gimp_equalize ’ , ’ gimp_eraser ’ , ’ g i m p _ e r a s e r _ d e f a u l t ’ ,
’ gimp_file_load ’ , ’ gimp_file_load_layer ’ , ’ gimp_file_load_layers ’ ,
’ gimp_file_load_thumbnail ’ ,
’ gimp_file_save ’ ,
’ gimp_file_save_thumbnail ’ , ’ gimp_flip ’ , ’ gimp_floating_sel_anchor ’ , ’
gimp_floating_sel_attach ’ , ’ gimp_floating_sel_relax ’ , ’ gimp_floating_sel_remove
’ , ’ gimp_floating_sel_rigor ’ , ’ gimp_floating_sel_to_layer ’ , ’
gimp_fonts_close_popup ’ , ’ g i m p _ f o n t s _ g e t _ l i s t ’ , ’ gimp_fonts_popup ’ , ’
g i m p _ f o n t s _ r e f r e s h ’ , ’ gimp_fonts_set_popup ’ , ’ g i m p _ f r e e _ s e l e c t ’ , ’
gimp_fuzzy_select ’ , ’ gimp_fuzzy_select_full ’ , ’ gimp_get_color_configuration ’ , ’
gimp_get_default_comment ’ , ’ g i m p _ g e t _ d e f a u l t _ u n i t ’ , ’
gimp_get_module_load_inhibit ’ , ’ gimp_get_monitor_resolution ’ , ’
8
10
Distribué sous licence CC by-nc-sa
page 59 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
g i m p _ g e t _ p a t h _ b y _ t a t t o o ’ , ’ gimp_get_theme_dir ’ , ’ gimp_getpid ’ , ’
gimp_gimprc_query ’ , ’ gimp_gimprc_set ’ ,
2
4
’ gimp_gradient_delete ’ , ’ gimp_gradient_duplicate ’ , ’
gimp_gradient_get_custom_samples ’ , ’ gimp_gradient_get_number_of_segments ’ , ’
gimp_gradient_get_uniform_samples ’ , ’ g i m p _ g r a d i e n t _ i s _ e d i t a b l e ’ , ’
gimp_gradient_new ’ , ’ gimp_gradient_rename ’ ,
’ gimp_gradient_segment_get_blending_function ’ , ’
gimp_gradient_segment_get_coloring_type ’ , ’ gimp_gradient_segment_get_left_color
’ , ’ g i m p _ g r a d i e n t _ s e g m e n t _ g e t _ l e f t _ p o s ’ , ’ gimp_gradient_segment_get_middle_pos ’
, ’ gimp_gradient_segment_get_right_color ’ , ’ gimp_gradient_segment_get_right_pos
’ , ’ gimp_gradient_segment_range_blend_colors ’ , ’
gimp_gradient_segment_range_blend_opacity ’ , ’ gimp_gradient_segment_range_delete
’ , ’ g i m p _ g r a d i e n t _ s e g m e n t _ r a n g e _ f l i p ’ , ’ gimp_gradient_segment_range_move ’ , ’
gimp_gradient_segment_range_redistribute_handles ’ , ’
gimp_gradient_segment_range_replicate ’ , ’
gimp_gradient_segment_range_set_blending_function ’ , ’
gimp_gradient_segment_range_set_coloring_type ’ , ’
gimp_gradient_segment_range_split_midpoint ’ , ’
gimp_gradient_segment_range_split_uniform ’ , ’
gimp_gradient_segment_set_left_color ’ , ’ gimp_gradient_segment_set_left_pos ’ , ’
gimp_gradient_segment_set_middle_pos ’ , ’ g i m p _ g r a d i e n t _ s e g m e n t _ s e t _ r i g h t _ c o l o r ’ ,
’ gimp_gradient_segment_set_right_pos ’ ,
’ gimp_gradients_close_popup ’ , ’ g i m p _ g r a d i e n t s _ g e t _ a c t i v e ’ , ’
gimp_gradients_get_gradient ’ , ’ gimp_gradients_get_gradient_data ’ , ’
g i m p _ g r a d i e n t s _ g e t _ l i s t ’ , ’ gimp_gradients_popup ’ , ’ g i m p _ g r a d i e n t s _ r e f r e s h ’ , ’
gimp_gradients_sample_custom ’ , ’ gimp_gradients_sample_uniform ’ , ’
gimp_gradients_set_active ’ , ’ gimp_gradients_set_gradient ’ , ’
gimp_gradients_set_popup ’ ,
’ gimp_heal ’ , ’ g i m p _ h e a l _ d e f a u l t ’ , ’ gimp_help ’ , ’ gimp_help_2_concepts_paths ’ , ’
gimp_help_2_concepts_usage ’ , ’ gimp_help_2_using_docks ’ , ’
g i m p _ h e l p _ 2 _ u s i n g _ f i l e f o r m a t s ’ , ’ gimp_help_2_using_photography ’ , ’
gimp_help_2_using_selections ’ , ’ gimp_help_2_using_simpleobjects ’ , ’
gimp_help_2_using_web ’ , ’ gimp_histogram ’ , ’ g i m p _ h u e _ s a t u r a t i o n ’ ,
’ gimp_image_active_drawable ’ , ’ gimp_image_add_channel ’ , ’ gimp_image_add_hguide ’ , ’
gimp_image_add_layer ’ , ’ gimp_image_add_layer_mask ’ , ’ gimp_image_add_vectors ’ , ’
gimp_image_add_vguide ’ , ’ gimp_image_base_type ’ , ’ gimp_image_clean_all ’ , ’
gimp_image_convert_grayscale ’ , ’ gimp_image_convert_indexed ’ , ’
gimp_image_convert_rgb ’ , ’ g i m p _ i m a g e _ c o n v e r t _ s e t _ d i t h e r _ m a t r i x ’ , ’
gimp_image_crop ’ , ’ gimp_image_delete ’ , ’ gimp_image_delete_guide ’ , ’
gimp_image_duplicate ’ , ’ gimp_image_find_next_guide ’ , ’ g i m p _ i m a g e _ f l a t t e n ’ , ’
gimp_image_flip ’ , ’ gimp_image_floating_sel_attached_to ’ , ’
g i m p _ i m a g e _ f l o a t i n g _ s e l e c t i o n ’ , ’ gimp_image_free_shadow ’ ,
1
1
’ gimp_image_get_active_channel ’ , ’ gimp_image_get_active_drawable ’ , ’
gimp_image_get_active_layer ’ , ’ gimp_image_get_active_vectors ’ , ’
gimp_image_get_channel_by_tattoo ’ , ’ gimp_image_get_channel_position ’ , ’
gimp_image_get_channels ’ , ’ gimp_image_get_cmap ’ , ’ gimp_image_get_colormap ’ , ’
gimp_image_get_component_active ’ , ’ gimp_image_get_component_visible ’ , ’
gimp_image_get_filename ’ , ’ g i m p _ i m a g e _ g e t _ f l o a t i n g _ s e l ’ , ’
gimp_image_get_guide_orientation ’ , ’ gimp_image_get_guide_position ’ , ’
gimp_image_get_layer_by_tattoo ’ , ’ gimp_image_get_layer_position ’ , ’
gimp_image_get_layers ’ , ’ gimp_image_get_name ’ , ’ g i m p _ i m a g e _ g e t _ r e s o l u t i o n ’ , ’
g i m p _ i m ag e _ g e t _ s e l e c t i o n ’ , ’ g i m p _ i m a g e _ g e t _ t a t t o o _ s t a t e ’ , ’ gimp_image_get_unit ’
, ’ gimp_image_get_vectors ’ , ’ g i m p _ i m a g e _ g e t _ v e c t o r s _ b y _ t a t t o o ’ ,
’ gimp_image_get_vectors_position ’ ,
’ gimp_image_grid_get_background_color ’ , ’ g i m p _ i m a g e _ g r i d _ g e t _ f o r e g r o u n d _ c o l o r ’ , ’
g i m p _ i m a g e _ g r i d _ g e t _ o f f s e t ’ , ’ gimp_image_grid_get_spacing ’ , ’
g i m p _ i m a g e _ g r i d _ g e t _ s t y l e ’ , ’ gimp_image_grid_set_background_color ’ , ’
Distribué sous licence CC by-nc-sa
page 60 / 79
Distribué sous licence CC by-nc-sa
3
5
7
1
1
www.VVpix.com
gimp_image_grid_set_foreground_color ’ , ’ gimp_image_grid_set_offset ’ , ’
gimp_image_grid_set_spacing ’ , ’ g i m p _ i m a g e _ g r i d _ s e t _ s t y l e ’ ,
’ gimp_image_height ’ ,
’ gimp_image_is_dirty ’ ,
’ gimp_image_is_valid ’ ,
’ gimp_image_list ’ ,
’ gimp_image_lower_channel ’ , ’ gimp_image_lower_layer ’ , ’
gimp_image_lower_layer_to_bottom ’ , ’ gimp_image_lower_vectors ’ , ’
gimp_image_lower_vectors_to_bottom ’ , ’ gimp_image_merge_down ’ , ’
g i m p _ i m ag e _ m e r g e _ v i s i b l e _ l a y e r s ’ , ’ gimp_image_new ’ , ’ g i m p _ i m a g e _ p a r a s i t e _ a t t a c h
’ , ’ gimp_image_parasite_detach ’ , ’ g i m p _ i m a g e _ p a r a s i t e _ f i n d ’ , ’
g i m p _ i m a g e _ p a r a s i t e _ l i s t ’ , ’ gimp_image_pick_color ’ , ’
g i m p _ i m a g e _ p i c k _ c o r r e l a t e _ l a y e r ’ , ’ gimp_image_raise_channel ’ , ’
gimp_image_raise_layer ’ , ’ gimp_image_raise_layer_to_top ’ , ’
gimp_image_raise_vectors ’ , ’ g i m p _ i m a g e _ r a i s e _ v e c t o r s _ t o _ t o p ’ , ’
gimp_image_remove_channel ’ , ’ gimp_image_remove_layer ’ , ’
gimp_image_remove_layer_mask ’ , ’ gimp_image_remove_vectors ’ , ’ gimp_image_resize ’
, ’ g i m p _ i m a g e _ r e s i z e _ t o _ l a y e r s ’ , ’ gimp_image_rotate ’ , ’ gimp_image_scale ’ , ’
g i m p _ i m a g e _ s c a l e _ f u l l ’ , ’ gimp_image_set_active_channel ’ , ’
gimp_image_set_active_layer ’ , ’ gimp_image_set_active_vectors ’ , ’
gimp_image_set_cmap ’ , ’ gimp_image_set_colormap ’ , ’
gimp_image_set_component_active ’ , ’ gimp_image_set_component_visible ’ , ’
gimp_image_set_filename ’ , ’ g i m p _ i m a g e _ s e t _ r e s o l u t i o n ’ , ’
g i m p _ i m a g e _ s e t _ t a t t o o _ s t a t e ’ , ’ gimp_image_set_unit ’ , ’ gimp_image_thumbnail ’ , ’
gimp_image_undo_disable ’ , ’ gimp_image_undo_enable ’ , ’ gimp_image_undo_freeze ’ , ’
gimp_image_undo_group_end ’ , ’ gimp_image_undo_group_start ’ , ’
gimp_image_undo_is_enabled ’ , ’ gimp_image_undo_thaw ’ , ’
gimp_image_unset_active_channel ’ , ’ gimp_image_width ’ , ’ g i m p _ i n v e r t ’ ,
’ gimp_layer_add_alpha ’ , ’ gimp_layer_add_mask ’ , ’ gimp_layer_copy ’ , ’
gimp_layer_create_mask ’ , ’ g i m p _ l a y e r _ d e l e t e ’ , ’ g i m p _ l a y e r _ f l a t t e n ’ , ’
gimp_layer_from_mask ’ , ’ gimp_layer_get_apply_mask ’ , ’ gimp_layer_get_edit_mask ’ ,
’ g i m p _ l a y e r _ g e t _ l i n k e d ’ , ’ g i m p _ l a y e r _ g e t _ l o c k _ a l p h a ’ , ’ gimp_layer_get_mask ’ , ’
gimp_layer_get_mode ’ , ’ gimp_layer_get_name ’ , ’ g i m p _ l a y e r _ g e t _ o p a c i t y ’ , ’
g i m p _ l a y e r _ g e t _ p r e s e r v e _ t r a n s ’ , ’ gimp_layer_get_show_mask ’ , ’
gimp_layer_get_tattoo ’ , ’ gimp_layer_get_visible ’ , ’ gimp_layer_is_floating_sel ’ ,
’ gimp_layer_mask ’ , ’ gimp_layer_new ’ , ’ gimp_layer_new_from_drawable ’ , ’
g i m p _ l a y e r _ n e w _ f r o m _ v i s i b l e ’ , ’ gimp_layer_remove_mask ’ , ’ g i m p _ l a y e r _ r e s i z e ’ , ’
gimp_layer_resize_to_image_size ’ , ’ gimp_layer_scale ’ , ’ gimp_layer_scale_full ’ ,
’ gimp_layer_set_apply_mask ’ , ’ g i m p _ l a y e r _ s e t _ e d i t _ m a s k ’ , ’ g i m p _ l a y e r _ s e t _ l i n k e d
’ , ’ g i m p _ l a y e r _ s e t _ l o c k _ a l p h a ’ , ’ gimp_layer_set_mode ’ , ’ gimp_layer_set_name ’ , ’
gimp_layer_set_offsets ’ , ’ gimp_layer_set_opacity ’ , ’
g i m p _ l a y e r _ s e t _ p r e s e r v e _ t r a n s ’ , ’ gimp_layer_set_show_mask ’ , ’
gimp_layer_set_tattoo ’ , ’ gimp_layer_set_visible ’ , ’ gimp_layer_translate ’ ,
’ g i m p _ l e v e l s ’ , ’ g i m p _ l e v e l s _ a u t o ’ , ’ g i m p _ l e v e l s _ s t r e t c h ’ , ’ gimp_message ’ , ’
gimp_message_get_handler ’ , ’ gimp_message_set_handler ’ , ’
g i m p _ o n l i n e _ d e v e l o p e r _ w e b _ s i t e ’ , ’ gimp_online_docs_web_site ’ , ’
gimp_online_main_web_site ’ , ’ g i m p _ o n l i n e _ p l u g _ i n _ w e b _ s i t e ’ , ’ g i m p _ p a i n t b r u s h ’ ,
’ gimp_paintbrush_default ’ ,
’ gimp_palette_add_entry ’ , ’ gimp_palette_delete ’ , ’ gimp_palette_delete_entry ’ , ’
gimp_palette_duplicate ’ , ’ gimp_palette_entry_get_color ’ , ’
gimp_palette_entry_get_name ’ , ’ g i m p _ p a l e t t e _ e n t r y _ s e t _ c o l o r ’ , ’
gimp_palette_entry_set_name ’ , ’ gimp_palette_get_background ’ , ’
g i m p _ p a l e t t e _ g e t _ c o l o r s ’ , ’ gimp_palette_get_columns ’ , ’
gimp_palette_get_foreground ’ , ’ gimp_palette_get_info ’ , ’
g i m p _ p a l e t t e _ i s _ e d i t a b l e ’ , ’ gimp_palette_new ’ , ’ g i m p _ p a l e t t e _ r e f r e s h ’ , ’
gimp_palette_rename ’ , ’ g i m p _ p a l e t t e _ s e t _ b a c k g r o u n d ’ , ’ g i m p _ p a l e t t e _ s e t _ c o l u m n s ’
, ’ gimp_palette_set_default_colors ’ , ’ gimp_palette_set_foreground ’ , ’
g i m p _ p a l e t t e _ s w a p _ c o l o r s ’ , ’ gimp_palettes_close_popup ’ , ’ g i m p _ p a l e t t e s _ g e t _ l i s t
’ , ’ gimp_palettes_get_palette ’ , ’ gimp_palettes_get_palette_entry ’ , ’
gimp_palettes_popup ’ , ’ g i m p _ p a l e t t e s _ r e f r e s h ’ , ’ g i m p _ p a l e t t e s _ s e t _ p a l e t t e ’ , ’
Distribué sous licence CC by-nc-sa
page 61 / 79
Distribué sous licence CC by-nc-sa
3
www.VVpix.com
gimp_palettes_set_popup ’ , ’ g i m p _ p a r a s i t e _ a t t a c h ’ , ’ g i m p _ p a r a s i t e _ d e t a c h ’ , ’
gimp_parasite_find ’ , ’ gimp_parasite_list ’ ,
’ gimp_path_delete ’ , ’ g i m p _ p a t h _ g e t _ c u r r e n t ’ ,
’ gimp_path_get_locked ’ , ’ g i m p _ p a t h _ g e t _ p o i n t _ a t _ d i s t ’ , ’ g i m p _ p a t h _ g e t _ p o i n t s ’ , ’
g i m p _ p a t h _ g e t _ t a t t o o ’ , ’ gimp_path_import ’ , ’ g i m p _ p a t h _ l i s t ’ , ’
g i m p _ p a t h _ s e t _ c u r r e n t ’ , ’ gimp_path_set_locked ’ , ’ g i m p _ p a t h _ s e t _ p o i n t s ’ , ’
gimp_path_set_tattoo ’ , ’ gimp_path_stroke_current ’ , ’ gimp_path_to_selection ’ ,
’ g i m p _ p a t t e r n _ g e t _ i n f o ’ , ’ g i m p _ p a t t e r n _ g e t _ p i x e l s ’ , ’ gimp_patterns_close_popup ’ , ’
gimp_patterns_get_list ’ , ’ gimp_patterns_get_pattern ’ , ’
g i m p _ p a t t e r n s _ g e t _ p a t t e r n _ d a t a ’ , ’ g i m p _ p a t t e r n s _ l i s t ’ , ’ gimp_patterns_popup ’ , ’
g i m p _ p a t t e r n s _ r e f r e s h ’ , ’ g i m p _ p a t t e r n s _ s e t _ p a t t e r n ’ , ’ gimp_patterns_set_popup ’ ,
1
3
1
’ gimp_pencil ’ , ’ gimp_perspective ’ , ’ gimp_plugin_domain_register ’ , ’
gimp_plugin_get_pdb_error_handler ’ , ’ gimp_plugin_help_register ’ , ’
g i m p _ p l u g i n _ i c o n _ r e g i s t e r ’ , ’ gimp_plugin_menu_branch_register ’ , ’
gimp_plugin_menu_register ’ , ’ gimp_plugin_set_pdb_error_handler ’ , ’
g i m p _ p l u g i n _ t e x t u r i z e ’ , ’ gimp_plugins_query ’ , ’ g i m p _ p o s t e r i z e ’ , ’
gimp_procedural_db_dump ’ , ’ gimp_procedural_db_get_data ’ , ’
g i m p _ p r o c e d u r a l _ d b _ g e t _ d a t a _ s i z e ’ , ’ gimp_procedural_db_proc_arg ’ , ’
gimp_procedural_db_proc_exists ’ , ’ gimp_procedural_db_proc_info ’ , ’
gimp_procedural_db_proc_val ’ , ’ gimp_procedural_db_query ’ , ’
gimp_procedural_db_set_data ’ , ’ gimp_procedural_db_temp_name ’ , ’
gimp_progress_cancel ’ , ’ gimp_progress_end ’ , ’ gimp_progress_get_window_handle ’ ,
’ g i m p _ p r o g r e s s _ i n i t ’ , ’ g i m p _ p r o g r e s s _ i n s t a l l ’ , ’ gimp_progress_pulse ’ , ’
g i m p _ p r o g r e s s _ s e t _ t e x t ’ , ’ g i m p _ p r o g r e s s _ u n i n s t a l l ’ , ’ gimp_progress_update ’ , ’
gimp_quit ’ , ’ gimp_rect_select ’ , ’ gimp_register_file_handler_mime ’ , ’
gimp_register_load_handler ’ , ’ gimp_register_magic_load_handler ’ , ’
gimp_register_save_handler ’ , ’ gimp_register_thumbnail_loader ’ , ’ gimp_rotate ’ , ’
g i m p _ r o u n d _ r e c t _ s e l e c t ’ , ’ gimp_scale ’ , ’ g i m p _ s e l e c t i o n _ a l l ’ , ’
g i m p _ s e l e c t i o n _ b o r d e r ’ , ’ gimp_selection_bounds ’ , ’ g i m p _ s e l e c t i o n _ c l e a r ’ , ’
gimp_selection_combine ’ , ’ g i m p _ s e l e c t i o n _ f e a t h e r ’ , ’ g i m p _ s e l e c t i o n _ f l o a t ’ , ’
gimp_selection_grow ’ , ’ g i m p _ s e l e c t i o n _ i n v e r t ’ , ’ gimp_selection_is_empty ’ , ’
g i m p _ s e l e c t i o n _ l a y e r _ a l p h a ’ , ’ g i m p _ s e l e c t i o n _ l o a d ’ , ’ gimp_selection_none ’ , ’
gimp_selection_save ’ , ’ gimp_selection_sharpen ’ , ’ gimp_selection_shrink ’ , ’
g i m p _ s e l e c t i o n _ t r a n s l a t e ’ , ’ g i m p _ s e l e c t i o n _ v a l u e ’ , ’ gimp_shear ’ , ’ gimp_smudge ’ ,
’ gimp_smudge_default ’ , ’ gimp_temp_PDB_name ’ , ’ gimp_temp_name ’ ,
’ g i m p _ t e x t ’ , ’ gimp_text_fontname ’ , ’ g i m p _ t e x t _ g e t _ e x t e n t s ’ , ’
gimp_text_get_extents_fontname ’ , ’ g i m p _ t e x t _ l a y e r _ g e t _ a n t i a l i a s ’ , ’
gimp_text_layer_get_base_direction ’ , ’ gimp_text_layer_get_color ’ , ’
gimp_text_layer_get_font ’ , ’ gimp_text_layer_get_font_size ’ , ’
gimp_text_layer_get_hinting ’ , ’ gimp_text_layer_get_indent ’ , ’
gimp_text_layer_get_justification ’ , ’ gimp_text_layer_get_kerning ’ , ’
gimp_text_layer_get_language ’ , ’ gimp_text_layer_get_letter_spacing ’ , ’
gimp_text_layer_get_line_spacing ’ , ’ gimp_text_layer_get_text ’ , ’
gimp_text_layer_new ’ , ’ g i m p _ t e x t _ l a y e r _ s e t _ a n t i a l i a s ’ , ’
gimp_text_layer_set_base_direction ’ , ’ gimp_text_layer_set_color ’ , ’
gimp_text_layer_set_font ’ , ’ gimp_text_layer_set_font_size ’ , ’
gimp_text_layer_set_hinting ’ , ’ gimp_text_layer_set_indent ’ , ’
gimp_text_layer_set_justification ’ , ’ gimp_text_layer_set_kerning ’ , ’
gimp_text_layer_set_language ’ , ’ gimp_text_layer_set_letter_spacing ’ , ’
gimp_text_layer_set_line_spacing ’ , ’ gimp_text_layer_set_text ’ ,
’ g i m p _ t h r e s h o l d ’ , ’ gimp_transform_2d ’ , ’ gimp_undo_push_group_end ’ , ’
gimp_undo_push_group_start ’ ,
’ gimp_unit_get_abbreviation ’ , ’ gimp_unit_get_deletion_flag ’ , ’ gimp_unit_get_digits
’ , ’ gimp_unit_get_factor ’ , ’ gimp_unit_get_identifier ’ , ’
gimp_unit_get_number_of_built_in_units ’ , ’ gimp_unit_get_number_of_units ’ , ’
g i m p _ u n i t _ g e t _ p l u r a l ’ , ’ g i m p _ u n i t _ g e t _ s i n g u l a r ’ , ’ gimp_unit_get_symbol ’ , ’
gimp_unit_new ’ , ’ g i m p _ u n i t _ s e t _ d e l e t i o n _ f l a g ’ , ’
gimp_vectors_bezier_stroke_conicto ’ , ’ gimp_vectors_bezier_stroke_cubicto ’ ,
Distribué sous licence CC by-nc-sa
page 62 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
’ gimp_vectors_bezier_stroke_lineto ’ ,
’ gimp_vectors_bezier_stroke_new_ellipse ’ ,
’ gimp_vectors_bezier_stroke_new_moveto ’ ,
’ gimp_vectors_copy ’ ,
’ gimp_vectors_export_to_file ’ ,
’ gimp_vectors_export_to_string ’ ,
’ gimp_vectors_get_image ’ ,
’ gimp_vectors_get_linked ’ ,
’ gimp_vectors_get_name ’ ,
’ gimp_vectors_get_strokes ’ ,
’ gimp_vectors_get_tattoo ’ ,
’ gimp_vectors_get_visible ’ ,
’ gimp_vectors_import_from_file ’ ,
’ gimp_vectors_import_from_string ’ ,
’ gimp_vectors_is_valid ’ ,
’ gimp_vectors_new ’ ,
’ gimp_vectors_new_from_text_layer ’ ,
’ gimp_vectors_parasite_attach ’ ,
’ gimp_vectors_parasite_detach ’ ,
’ gimp_vectors_parasite_find ’ ,
’ gimp_vectors_parasite_list ’ ,
’ gimp_vectors_remove_stroke ’ ,
’ gimp_vectors_set_linked ’ ,
’ gimp_vectors_set_name ’ ,
’ gimp_vectors_set_tattoo ’ ,
’ gimp_vectors_set_visible ’ ,
’ gimp_vectors_stroke_close ’ ,
’ gimp_vectors_stroke_flip ’ ,
’ gimp_vectors_stroke_flip_free ’ ,
’ gimp_vectors_stroke_get_length ’ ,
’ gimp_vectors_stroke_get_point_at_dist ’ ,
’ gimp_vectors_stroke_get_points ’ ,
’ gimp_vectors_stroke_interpolate ’ ,
’ gimp_vectors_stroke_new_from_points ’ ,
’ gimp_vectors_stroke_rotate ’ ,
’ gimp_vectors_stroke_scale ’ ,
’ gimp_vectors_stroke_translate ’ ,
’ gimp_vectors_to_selection ’ ,
’ gimp_version ’ , ’ gimp_xcf_load ’ , ’ gimp_xcf_save ’ ,
1
’ p l u g _ i n _ a l i en m a p 2 ’ , ’ p l u g _ i n _ a l i g n _ l a y e r s ’ , ’ p l u g _ i n _ a n i m a t i o n o p t i m i z e ’ , ’
plug_in_animationoptimize_diff ’ , ’ plug_in_animationplay ’ , ’
plug_in_animationunoptimize ’ , ’ p l u g _ i n _ a n t i a l i a s ’ , ’ plug_in_apply_canvas ’ , ’
plug_in_applylens ’ , ’ plug_in_autocrop ’ , ’ plug_in_autocrop_layer ’ , ’
plug_in_autostretch_hsv ’ , ’ plug_in_blinds ’ , ’ plug_in_blur ’ , ’
p l u g _ i n _ b o r d e r a v e r a g e ’ , ’ plug_in_bump_map ’ , ’ plug_in_bump_map_tiled ’ , ’
plug_in_c_astretch ’ , ’ plug_in_cartoon ’ , ’ plug_in_ccanalyze ’ , ’
plug_in_checkerboard ’ , ’ plug_in_cml_explorer ’ , ’ plug_in_color_enhance ’ , ’
p l u g _ i n _ c o l o r i f y ’ , ’ plug_in_colormap_remap ’ , ’ plug_in_colormap_swap ’ , ’
p l u g _ i n _ c o l o r s _ c h a n n e l _ m i x e r ’ , ’ p l u g _ i n _ c o l o r t o a l p h a ’ , ’ plug_in_compose ’ , ’
p l u g _ i n _ c o n v m a t r i x ’ , ’ plug_in_cubism ’ , ’ plug_in_curve_bend ’ , ’
p l u g _ i n _ c u r v e _ b e n d _ I t e r a t o r ’ , ’ plug_in_dbbrowser ’ , ’ plug_in_decompose ’ , ’
plug_in_decompose_registered ’ , ’ p l u g _ i n _ d e i n t e r l a c e ’ , ’ plug_in_depth_merge ’ , ’
plug_in_despeckle ’ , ’ plug_in_destripe ’ , ’ p l u g _ i n _ d i f f r a c t i o n ’ , ’ p l u g _ i n _ d i l a t e ’
, ’ p l u g _ i n _ d i s p l a c e ’ , ’ p l u g _ i n _ d i s p l a c e _ p o l a r ’ , ’ plug_in_dog ’ , ’
plug_in_drawable_compose ’ , ’ plug_in_edge ’ , ’ plug_in_emboss ’ , ’ p l u g _ i n _ e n g r a v e ’ ,
’ p l u g _ i n _ e r o d e ’ , ’ plug_in_exchange ’ , ’ p l u g _ i n _ f i l m ’ , ’ p l u g _ i n _ f i l t e r _ p a c k ’ , ’
plug_in_flame ’ , ’ p l u g _ i n _ f l a r e f x ’ , ’ p l u g _ i n _ f r a c t a l _ t r a c e ’ , ’
p l u g _ i n _ f r a c t a l e x p l o r e r ’ , ’ plug_in_gauss ’ , ’ p l u g _ i n _ g a u s s _ i i r ’ , ’
plug_in_gauss_iir2 ’ , ’ plug_in_gauss_rle ’ , ’ plug_in_gauss_rle2 ’ , ’ plug_in_gfig ’ ,
’ plug_in_gflare ’ , ’ plug_in_gimpressionist ’ , ’ plug_in_glasstile ’ , ’
Distribué sous licence CC by-nc-sa
page 63 / 79
Distribué sous licence CC by-nc-sa
3
5
2
4
6
8
10
12
2
4
www.VVpix.com
plug_in_gradmap ’ , ’ p l u g _ i n _ g r i d ’ , ’ p l u g _ i n _ g u i l l o t i n e ’ , ’ p l u g _ i n _ h o t ’ , ’
plug_in_hsv_noise ’ ,
’ plug_in_icc_profile_apply ’ , ’ plug_in_icc_profile_apply_rgb ’ ,
’ plug_in_icc_profile_file_info ’ , ’ plug_in_icc_profile_info ’ ,
’ plug_in_icc_profile_set ’ , ’ plug_in_icc_profile_set_rgb ’ ,
’ p l u g _ i n _ i f s c o m p o s e ’ , ’ p l u g _ i n _ i l l u s i o n ’ , ’ plug_in_imagemap ’ , ’ p l u g _ i n _ i w a r p ’ , ’
plug_in_jigsaw ’ , ’ plug_in_laplace ’ , ’ plug_in_lens_distortion ’ , ’ plug_in_lic ’ ,
’ p l u g _ i n _ l i g h t i n g ’ , ’ plug_in_make_seamless ’ , ’ plug_in_map_object ’ , ’
plug_in_max_rgb ’ , ’ plug_in_maze ’ , ’ p l u g _ i n _ m b l u r ’ , ’ p l u g _ i n _ m b l u r _ i n w a r d ’ , ’
plug_in_metadata_decode_xmp ’ , ’ plug_in_metadata_encode_xmp ’ , ’
plug_in_metadata_export ’ , ’ plug_in_metadata_get ’ , ’ plug_in_metadata_get_simple
’ , ’ plug_in_metadata_import ’ , ’ plug_in_metadata_set ’ , ’
p l u g _ i n _ m e t a d a t a _ s e t _ s i m p l e ’ , ’ plug_in_mosaic ’ , ’ plug_in_neon ’ , ’
plug_in_newsprint ’ , ’ p l u g _ i n _ n l f i l t ’ , ’ p lug_in_ noisify ’ , ’ plug_in_normalize ’ ,
’ plug_in_nova ’ , ’ p l u g _ i n _ o i l i f y ’ , ’ p l u g _ i n _ o i l i f y _ e n h a n c e d ’ , ’ p l u g _ i n _ p a g e c u r l
’ , ’ plug_in_palettemap ’ , ’ p l u g _ i n _ p a p e r t i l e ’ , ’ plug_in_photocopy ’ , ’
p l u g _ i n _ p i x e l i z e ’ , ’ p l u g _ i n _ p i x e l i z e 2 ’ , ’ plug_in_plasma ’ , ’
plug_in_plug_in_details ’ , ’ plug_in_polar_coords ’ , ’ plug_in_qbist ’ , ’
plug_in_randomize_hurl ’ , ’ plug_in_randomize_pick ’ , ’ plug_in_randomize_slur ’ , ’
plug_in_recompose ’ , ’ plug_in_red_eye_removal ’ , ’ p l u g _ i n _ r e t i n e x ’ , ’
plug_in_rgb_noise ’ , ’ plug_in_r ipple ’ , ’ plug_in_rotate ’ , ’
plug_in_rotate_colormap ’ , ’ plug_in_sample_colorize ’ , ’ plug_in_scatter_hsv ’ , ’
plug_in_script_fu_console ’ , ’ plug_in_script_fu_eval ’ , ’
plug_in_script_fu_server ’ , ’ plug_in_script_fu_text_console ’ , ’ plug_in_sel2path
’ , ’ plug_in_sel2path_advanced ’ , ’ p l u g _ i n _ s e l _ g a u s s ’ , ’ p l u g _ i n _ s e m i f l a t t e n ’ , ’
plug_in_sharpen ’ , ’ p l u g _ i n _ s h i f t ’ , ’ plug_in_sinus ’ , ’ p l u g _ i n _ s m a l l _ t i l e s ’ , ’
plug_in_smooth_palette ’ , ’ plug_in_sobel ’ , ’ plug_in_softglow ’ , ’
plug_in_solid_noise ’ , ’ plug_in_sparkle ’ , ’ plug_in_spheredesigner ’ , ’
plug_in_spread ’ , ’ plug_in_the_old_egg ’ , ’ plug_in_the_slimy_egg ’ , ’
plug_in_threshold_alpha ’ , ’ p l u g _ i n _ t i l e ’ , ’ plug_in_unit_editor ’ , ’
plug_in_unsharp_mask ’ , ’ p l u g _ i n _ v i d e o ’ , ’ p l u g _ i n _ v i n v e r t ’ , ’ p l u g _ i n _ v p r o p a g a t e
’ , ’ plug_in_warp ’ , ’ plug_in_waves ’ , ’ plug_in_web_browser ’ ,
’ p l u g _ i n _ w h i r l _ p i n c h ’ , ’ p l u g _ i n _ w i n d ’ , ’ plug_in_winsnap ’ , ’ p l u g _ i n _ z e a l o u s c r o p ’ , ’
python_fu_ajouter_valeur_couleurs ’ ,
’ p y t h o n _ f u _ co n s o l e ’ ,
’ python_fu_creer_texture ’ ,
’ python_fu_decouper ’ ,
’ python_fu_dessiner_damier ’ ,
’ python_fu_dessiner_demi_sphere ’ ,
’ python_fu_eval ’ ,
’ python_fu_foggify ’ ,
’ python_fu_importer_ligne_brisee ’ ,
’ python_fu_palette_offset ’ ,
’ python_fu_palette_sort ’ ,
’ python_fu_palette_to_gradient ’ ,
’ python_fu_palette_to_gradient_repeating ’ , ’ python_fu_slice ’ , ’
p y t h o n _ f u _ s u p p r i m e r _ a n t i _ a l i a s ’ , ’ query ’ ,
’ script_fu_3d_outline_logo ’ ,
’ script_fu_3d_outline_logo_alpha ’ ,
’ script_fu_3dtruchet ’ ,
’ script_fu_add_bevel ’ , ’ script_fu_addborder ’ , ’ script_fu_alien_glow_bullet ’ , ’
script_fu_alien_glow_button ’ , ’ script_fu_alien_glow_horizontal_ruler ’ , ’
script_fu_alien_glow_logo ’ , ’ script_fu_alien_glow_logo_alpha ’ , ’
script_fu_alien_glow_right_arrow ’ , ’ script_fu_alien_neon_logo ’ , ’
script_fu_alien_neon_logo_alpha ’ , ’ script_fu_basic1_logo ’ , ’
script_fu_basic1_logo_alpha ’ , ’ script_fu_basic2_logo ’ , ’
script_fu_basic2_logo_alpha ’ , ’ script_fu_beveled_pattern_arrow ’ , ’
script_fu_beveled_pattern_bullet ’ , ’ script_fu_beveled_pattern_button ’ , ’
script_fu_beveled_pattern_heading ’ , ’ script_fu_beveled_pattern_hrule ’ , ’
script_fu_big_header_gimp_org ’ , ’ script_fu_blend_anim ’ , ’ script_fu_blended_logo
’ , ’ script_fu_blended_logo_alpha ’ , ’ script_fu_bovinated_logo ’ , ’
Distribué sous licence CC by-nc-sa
page 64 / 79
Distribué sous licence CC by-nc-sa
www.VVpix.com
script_fu_bovinated_logo_alpha ’ , ’ script_fu_burn_in_anim ’ , ’ script_fu_button00 ’
, ’ script_fu_camo_pattern ’ , ’ s c r i p t _ f u _ c a r v e _ i t ’ , ’ script_fu_carved_logo ’ , ’
script_fu_chalk_logo ’ , ’ script_fu_chalk_logo_alpha ’ , ’ script_fu_chip_away_logo ’
, ’ script_fu_chip_away_logo_alpha ’ , ’ script_fu_chrome_logo ’ , ’
script_fu_chrome_logo_alpha ’ , ’ s c r i p t _ f u _ c i r c u i t ’ , ’ s c r i p t _ f u _ c l o t h i f y ’ , ’
script_fu_coffee_stain ’ , ’ script_fu_comic_logo ’ , ’ script_fu_comic_logo_alpha ’ ,
’ script_fu_cool_metal_logo ’ , ’ script_fu_cool_metal_logo_alpha ’ , ’
script_fu_copy_visible ’ , ’ script_fu_crystal_logo ’ , ’ script_fu_difference_clouds
’ , ’ s c r i p t _ f u _ d i s t r e s s _ s e l e c t i o n ’ , ’ script_fu_drop_shadow ’ , ’
script_fu_erase_rows ’ , ’ s c r i p t _ f u _ f l a t l a n d ’ , ’ script_fu_font_map ’ , ’
script_fu_frosty_logo ’ , ’ script_fu_frosty_logo_alpha ’ , ’ script_fu_fuzzy_border ’
, ’ script_fu_glossy_logo ’ , ’ script_fu_glossy_logo_alpha ’ , ’
script_fu_glowing_logo ’ , ’ script_fu_glowing_logo_alpha ’ , ’
script_fu_gradient_bevel_logo ’ , ’ script_fu_gradient_bevel_logo_alpha ’ , ’
script_fu_gradient_example ’ , ’ script_fu_grid_system ’ , ’ script_fu_guide_new ’ , ’
script_fu_guide_new_percent ’ , ’ script_fu_guides_from_selection ’ , ’
script_fu_guides_remove ’ , ’ script_fu_i26_gunya2 ’ , ’ script_fu_labels_gimp_org ’ ,
’ script_fu_land ’ ,
’ script_fu_lava ’ , ’ script_fu_line_nova ’ , ’ script_fu_make_brush_elliptical ’ , ’
script_fu_make_brush_elliptical_feathered ’ , ’ script_fu_make_brush_rectangular ’ ,
’ script_fu_make_brush_rectangular_feathered ’ , ’ script_fu_neon_logo ’ , ’
script_fu_neon_logo_alpha ’ , ’ script_fu_newsprint_text ’ , ’ script_fu_old_photo ’ ,
’ script_fu_paste_as_brush ’ , ’ script_fu_paste_as_pattern ’ , ’
script_fu_perspective_shadow ’ , ’ script_fu_predator ’ , ’ s c r i p t _ f u _ r e f r e s h ’ , ’
script_fu_render_map ’ , ’ s cri pt_ fu_ reve rse _la yer s ’ , ’ s c r i p t _ f u _ r i p p l y _ a n i m ’ , ’
script_fu_round_button ’ , ’ script_fu_round_corners ’ , ’ script_fu_selection_round ’
, ’ script_fu_selection_rounded_rectangle ’ , ’ script_fu_selection_to_brush ’ , ’
script_fu_selection_to_image ’ , ’ script_fu_selection_to_pattern ’ , ’
script_fu_set_cmap ’ , ’ s c r i p t _ f u _ s l i d e ’ , ’ script_fu_small_header_gimp_org ’ , ’
script_fu_sota_chrome_it ’ , ’ script_fu_sota_chrome_logo ’ , ’ script_fu_speed_text ’
, ’ script_fu_spinning_globe ’ , ’ script_fu_spyrogimp ’ , ’ script_fu_starscape_logo ’
, ’ s c r i p t _ f u _ s w i r l _ t i l e ’ , ’ script_fu_swirly_pattern ’ , ’ script_fu_t_o_p_logo ’ , ’
script_fu_t_o_p_logo_alpha ’ , ’ s c r i p t _ f u _ t e x t _ c i r c l e ’ , ’ script_fu_textured_logo ’
, ’ script_fu_textured_logo_alpha ’ , ’ s c r i p t _ f u _ t i l e _ b l u r ’ , ’
script_fu_title_header ’ , ’ script_fu_truchet ’ , ’
script_fu_tube_button_label_gimp_org ’ , ’ script_fu_tube_subbutton_label_gimp_org
’ , ’ script_fu_tube_subsubbutton_label_gimp_org ’ , ’ script_fu_unsharp_mask ’ , ’
script_fu_waves_anim ’ , ’ script_fu_weave ’ , ’ s c r i p t _ f u _ x a c h _ e f f e c t ’ , ’
twain_acquire ’ ]
24.3
Enumération gimpenums
1
i m p o r t gimpenums
h e l p ( gimpenums )
Listing 22 – Aide sur GimpEnum
Help on module gimpenums :
2
4
NAME
gimpenums
6
FILE
c : \ program f i l e s \ gimp −2.0\ l i b \ gimp \ 2 . 0 \ python \ gimpenums . py
8
10
12
14
DESCRIPTION
#
Gimp−Python − a l l o w s t h e w r i t i n g o f Gimp p l u g i n s i n Python .
#
C o p y r i g h t (C) 2005 Manish Singh <yosh@gimp . org >
#
# T h i s program i s f r e e s o f t w a r e ; you can r e d i s t r i b u t e i t and / o r modify
# i t under t h e terms o f t h e GNU General P u b l i c License as p u b l i s h e d by
Distribué sous licence CC by-nc-sa
page 65 / 79
Distribué sous licence CC by-nc-sa
16
18
20
22
24
#
#
#
#
#
#
#
#
#
#
#
www.VVpix.com
t h e Free Software Foundation ; e i t h e r v e r s i o n 2 o f t h e License , o r
( a t your o p t i o n ) any l a t e r v e r s i o n .
T h i s program i s d i s t r i b u t e d i n t h e hope t h a t i t w i l l be u s e f u l ,
b u t WITHOUT ANY WARRANTY; w i t h o u t even t h e i m p l i e d w a r r a n t y o f
MERCHANTABILITY o r FITNESS FOR A PARTICULAR PURPOSE. See t h e
GNU General P u b l i c License f o r more d e t a i l s .
You should have r e c e i v e d a copy o f t h e GNU General P u b l i c License
along w i t h t h i s program ; i f not , w r i t e t o t h e Free Software
Foundation , I n c . , 59 Temple Place − S u i t e 330 , Boston , MA 02111−1307, USA.
26
28
30
32
34
36
38
40
42
44
46
48
50
52
54
56
58
60
62
64
66
68
70
72
74
76
DATA
ABSOLUTE_CONVOL = 1
ADDITION_MODE = 7
ADD_ALPHA_MASK = 2
ADD_ALPHA_TRANSFER_MASK = 3
ADD_BLACK_MASK = 1
ADD_CHANNEL_MASK = 6
ADD_COPY_MASK = 5
ADD_SELECTION_MASK = 4
ADD_WHITE_MASK = 0
ALL_HUES = 0
ALPHA_CHANNEL = 5
BACKGROUND_FILL = 1
BEHIND_MODE = 2
BG_BUCKET_FILL = 1
BLUE_CHANNEL = 2
BLUE_HUES = 5
BLUR_CONVOLVE = 0
BRUSH_GENERATED_CIRCLE = 0
BRUSH_GENERATED_DIAMOND = 2
BRUSH_GENERATED_SQUARE = 1
BRUSH_HARD = 0
BRUSH_SOFT = 1
BURN = 1
BURN_MODE = 17
CHANNEL_OP_ADD = 0
CHANNEL_OP_INTERSECT = 3
CHANNEL_OP_REPLACE = 2
CHANNEL_OP_SUBTRACT = 1
CHECK_SIZE_LARGE_CHECKS = 2
CHECK_SIZE_MEDIUM_CHECKS = 1
CHECK_SIZE_SMALL_CHECKS = 0
CHECK_TYPE_BLACK_ONLY = 5
CHECK_TYPE_DARK_CHECKS = 2
CHECK_TYPE_GRAY_CHECKS = 1
CHECK_TYPE_GRAY_ONLY = 4
CHECK_TYPE_LIGHT_CHECKS = 0
CHECK_TYPE_WHITE_ONLY = 3
CLIP_TO_BOTTOM_LAYER = 2
CLIP_TO_IMAGE = 1
COLOR_ERASE_MODE = 22
COLOR_MODE = 13
CONSOLE = 1
CUSTOM_MODE = 3
CUSTOM_PALETTE = 4
CYAN_HUES = 4
DARKEN_ONLY_MODE = 9
DESATURATE_AVERAGE = 2
DESATURATE_LIGHTNESS = 0
DESATURATE_LUMINOSITY = 1
DIFFERENCE_MODE = 6
Distribué sous licence CC by-nc-sa
page 66 / 79
Distribué sous licence CC by-nc-sa
78
80
82
84
86
88
90
92
94
96
98
100
102
104
106
108
110
112
114
116
118
120
122
124
126
128
130
132
134
136
138
140
www.VVpix.com
DISSOLVE_MODE = 1
DIVIDE_MODE = 15
DODGE = 0
DODGE_MODE = 16
ERROR_CONSOLE = 2
EXPAND_AS_NECESSARY = 0
EXTENSION = 2
FALSE = False
FG_BG_HSV_MODE = 1
FG_BG_RGB_MODE = 0
FG_BUCKET_FILL = 0
FG_TRANSPARENT_MODE = 2
FIXED_DITHER = 3
FLATTEN_IMAGE = 3
FOREGROUND_EXTRACT_SIOX = 0
FOREGROUND_FILL = 0
FSLOWBLEED_DITHER = 2
FS_DITHER = 1
GRADIENT_BILINEAR = 1
GRADIENT_CONICAL_ASYMMETRIC = 5
GRADIENT_CONICAL_SYMMETRIC = 4
GRADIENT_LINEAR = 0
GRADIENT_RADIAL = 2
GRADIENT_SEGMENT_CURVED = 1
GRADIENT_SEGMENT_HSV_CCW = 1
GRADIENT_SEGMENT_HSV_CW = 2
GRADIENT_SEGMENT_LINEAR = 0
GRADIENT_SEGMENT_RGB = 0
GRADIENT_SEGMENT_SINE = 2
GRADIENT_SEGMENT_SPHERE_DECREASING = 4
GRADIENT_SEGMENT_SPHERE_INCREASING = 3
GRADIENT_SHAPEBURST_ANGULAR = 6
GRADIENT_SHAPEBURST_DIMPLED = 8
GRADIENT_SHAPEBURST_SPHERICAL = 7
GRADIENT_SPIRAL_ANTICLOCKWISE = 10
GRADIENT_SPIRAL_CLOCKWISE = 9
GRADIENT_SQUARE = 3
GRAIN_EXTRACT_MODE = 20
GRAIN_MERGE_MODE = 21
GRAY = 1
GRAYA_IMAGE = 3
GRAY_CHANNEL = 3
GRAY_IMAGE = 2
GREEN_CHANNEL = 1
GREEN_HUES = 3
GRID_DOTS = 0
GRID_DOUBLE_DASH = 3
GRID_INTERSECTIONS = 1
GRID_ON_OFF_DASH = 2
GRID_SOLID = 4
HARDLIGHT_MODE = 18
HIGHLIGHTS = 2
HISTOGRAM_ALPHA = 4
HISTOGRAM_BLUE = 3
HISTOGRAM_GREEN = 2
HISTOGRAM_RED = 1
HISTOGRAM_VALUE = 0
HUE_MODE = 11
ICON_TYPE_IMAGE_FILE = 2
ICON_TYPE_INLINE_PIXBUF = 1
ICON_TYPE_STOCK_ID = 0
IMAGE_CLONE = 0
INDEXED = 2
Distribué sous licence CC by-nc-sa
page 67 / 79
Distribué sous licence CC by-nc-sa
142
144
146
148
150
152
154
156
158
160
162
164
166
168
170
172
174
176
178
180
182
184
186
188
190
192
194
196
198
200
202
www.VVpix.com
INDEXEDA_IMAGE = 5
INDEXED_CHANNEL = 4
INDEXED_IMAGE = 4
INTERNAL = 0
INTERPOLATION_CUBIC = 2
INTERPOLATION_LANCZOS = 3
INTERPOLATION_LINEAR = 1
INTERPOLATION_NONE = 0
LIGHTEN_ONLY_MODE = 10
MAGENTA_HUES = 6
MAKE_PALETTE = 0
MASK_APPLY = 0
MASK_DISCARD = 1
MAX_IMAGE_SIZE = 262144
MAX_MEMSIZE = 4398046511104L
MAX_RESOLUTION = 65536.0
MESSAGE_BOX = 0
MIDTONES = 1
MIN_IMAGE_SIZE = 1
MIN_RESOLUTION = 0.0050000000000000001
MONO_PALETTE = 3
MULTIPLY_MODE = 3
NEGATIVE_CONVOL = 2
NORMAL_CONVOL = 0
NORMAL_MODE = 0
NO_DITHER = 0
OFFSET_BACKGROUND = 0
OFFSET_TRANSPARENT = 1
ORIENTATION_HORIZONTAL = 0
ORIENTATION_UNKNOWN = 2
ORIENTATION_VERTICAL = 1
OVERLAY_MODE = 5
PAINT_CONSTANT = 0
PAINT_INCREMENTAL = 1
PARASITE_ATTACH_GRANDPARENT = 8388608
PARASITE_ATTACH_PARENT = 32768
PARASITE_GRANDPARENT_PERSISTENT = 65536
PARASITE_GRANDPARENT_UNDOABLE = 131072
PARASITE_PARENT_PERSISTENT = 256
PARASITE_PARENT_UNDOABLE = 512
PARASITE_PERSISTENT = 1
PARASITE_UNDOABLE = 2
PATTERN_BUCKET_FILL = 2
PATTERN_CLONE = 1
PATTERN_FILL = 4
PDB_CALLING_ERROR = 1
PDB_CANCEL = 4
PDB_CHANNEL = 15
PDB_COLOR = 10
PDB_COLORARRAY = 18
PDB_DISPLAY = 12
PDB_DRAWABLE = 16
PDB_END = 22
PDB_ERROR_HANDLER_INTERNAL = 0
PDB_ERROR_HANDLER_PLUGIN = 1
PDB_EXECUTION_ERROR = 0
PDB_FLOAT = 3
PDB_FLOATARRAY = 8
PDB_IMAGE = 13
PDB_INT16 = 1
PDB_INT16ARRAY = 6
PDB_INT32 = 0
PDB_INT32ARRAY = 5
Distribué sous licence CC by-nc-sa
page 68 / 79
Distribué sous licence CC by-nc-sa
204
206
208
210
212
214
216
218
220
222
224
226
228
230
232
234
236
238
240
242
244
246
248
250
252
254
256
258
260
262
264
266
www.VVpix.com
PDB_INT8 = 2
PDB_INT8ARRAY = 7
PDB_LAYER = 14
PDB_PARASITE = 20
PDB_PASS_THROUGH = 2
PDB_REGION = 11
PDB_SELECTION = 17
PDB_STATUS = 21
PDB_STRING = 4
PDB_STRINGARRAY = 9
PDB_SUCCESS = 3
PDB_VECTORS = 19
PIXELS = 0
PIXEL_FETCHER_EDGE_BACKGROUND = 4
PIXEL_FETCHER_EDGE_BLACK = 3
PIXEL_FETCHER_EDGE_NONE = 0
PIXEL_FETCHER_EDGE_SMEAR = 2
PIXEL_FETCHER_EDGE_WRAP = 1
PLUGIN = 1
POINTS = 1
PROGRESS_COMMAND_END = 1
PROGRESS_COMMAND_GET_WINDOW = 5
PROGRESS_COMMAND_PULSE = 4
PROGRESS_COMMAND_SET_TEXT = 2
PROGRESS_COMMAND_SET_VALUE = 3
PROGRESS_COMMAND_START = 0
RED_CHANNEL = 0
RED_HUES = 1
REPEAT_NONE = 0
REPEAT_SAWTOOTH = 1
REPEAT_TRIANGULAR = 2
REUSE_PALETTE = 1
RGB = 0
RGBA_IMAGE = 1
RGB_IMAGE = 0
ROTATE_180 = 1
ROTATE_270 = 2
ROTATE_90 = 0
RUN_INTERACTIVE = 0
RUN_NONINTERACTIVE = 1
RUN_WITH_LAST_VALS = 2
SATURATION_MODE = 12
SCREEN_MODE = 4
SELECT_CRITERION_B = 3
SELECT_CRITERION_COMPOSITE = 0
SELECT_CRITERION_G = 2
SELECT_CRITERION_H = 4
SELECT_CRITERION_R = 1
SELECT_CRITERION_S = 5
SELECT_CRITERION_V = 6
SHADOWS = 0
SHARPEN_CONVOLVE = 1
SOFTLIGHT_MODE = 19
STACK_TRACE_ALWAYS = 2
STACK_TRACE_NEVER = 0
STACK_TRACE_QUERY = 1
SUBTRACT_MODE = 8
TEMPORARY = 3
TEXT_DIRECTION_LTR = 0
TEXT_DIRECTION_RTL = 1
TEXT_JUSTIFY_CENTER = 2
TEXT_JUSTIFY_FILL = 3
TEXT_JUSTIFY_LEFT = 0
Distribué sous licence CC by-nc-sa
page 69 / 79
Distribué sous licence CC by-nc-sa
268
270
272
274
276
278
280
282
284
286
288
290
292
www.VVpix.com
TEXT_JUSTIFY_RIGHT = 1
TRANSFORM_BACKWARD = 1
TRANSFORM_FORWARD = 0
TRANSFORM_RESIZE_ADJUST = 0
TRANSFORM_RESIZE_CLIP = 1
TRANSFORM_RESIZE_CROP = 2
TRANSFORM_RESIZE_CROP_WITH_ASPECT = 3
TRANSPARENT_FILL = 3
TRUE = True
UNIT_INCH = 1
UNIT_MM = 2
UNIT_PICA = 4
UNIT_PIXEL = 0
UNIT_POINT = 3
USER_DIRECTORY_DESKTOP = 0
USER_DIRECTORY_DOCUMENTS = 1
USER_DIRECTORY_DOWNLOAD = 2
USER_DIRECTORY_MUSIC = 3
USER_DIRECTORY_PICTURES = 4
USER_DIRECTORY_PUBLIC_SHARE = 5
USER_DIRECTORY_TEMPLATES = 6
USER_DIRECTORY_VIDEOS = 7
VALUE_MODE = 14
VECTORS_STROKE_TYPE_BEZIER = 0
WEB_PALETTE = 2
WHITE_FILL = 2
YELLOW_HUES = 2
24.4
Module gimpfu
Le module gimpfu permet en particulier d’écrire la fonction register qui permet à Gimp de reconnaitre
les greffons Python qui lui sont destinés.
Listing 23 – Module gimpfu
1
3
5
>>> i m p o r t gimpfu
>>> h e l p ( gimpfu )
Help on module gimpfu :
NAME
gimpfu − Simple i n t e r f a c e f o r w r i t i n g GIMP plug−i n s i n Python .
7
FILE
9
11
13
15
c : \ program f i l e s \ gimp 2 \ 3 2 \ l i b \ gimp \ 2 . 0 \ python \ gimpfu . py
DESCRIPTION
I n s t e a d o f w o r r y i n g about a l l t h e user i n t e r a c t i o n , s a v i n g l a s t used
v a l u e s and e v e r y t h i n g , t h e gimpfu module can t a k e care o f i t f o r you .
I t p r o v i d e s a s i m p l e r e g i s t e r ( ) f u n c t i o n t h a t w i l l r e g i s t e r your
plug−i n i f needed , and cause your plug−i n f u n c t i o n t o be c a l l e d when
needed .
17
19
21
Gimpfu w i l l a l s o handle showing a user i n t e r f a c e f o r e d i t i n g plug−i n
parameters i f t h e plug−i n i s c a l l e d i n t e r a c t i v e l y , and w i l l a l s o save
t h e l a s t used parameters , so t h e RUN_WITH_LAST_VALUES r u n _ t y p e w i l l
work c o r r e c t l y .
I t w i l l a l s o make sure t h a t t h e d i s p l a y s are f l u s h e d
on c o m p l e t i o n i f t h e plug−i n was run i n t e r a c t i v e l y .
23
25
When r e g i s t e r i n g t h e plug−i n , you do n o t need t o worry about
s p e c i f y i n g t h e r u n _ t y p e parameter .
Distribué sous licence CC by-nc-sa
page 70 / 79
Distribué sous licence CC by-nc-sa
27
www.VVpix.com
A t y p i c a l gimpfu plug−i n would l o o k l i k e t h i s :
from gimpfu i m p o r t ∗
29
31
33
35
37
39
41
43
45
47
d e f p l u g i n _ f u n c ( image , drawable , args ) :
# do what p l u g i n s do b e s t
register (
" plugin_func " ,
" blurb " ,
" h e l p message " ,
" author " ,
" copyright " ,
" year " ,
"My plug−i n " ,
"∗" ,
[
( PF_IMAGE , " image " , " I n p u t image " , None ) ,
(PF_DRAWABLE, " drawable " , " I n p u t drawable " , None ) ,
( PF_STRING , " arg " , " The argument " , " d e f a u l t −v a l u e " )
],
[] ,
p l u g i n _ f u n c , menu= " <Image > / Somewhere " )
main ( )
49
51
The c a l l t o " from gimpfu i m p o r t ∗ " w i l l i m p o r t a l l t h e gimp c o n s t a n t s
i n t o t h e plug−i n namespace , and a l s o i m p o r t t h e symbols gimp , pdb ,
r e g i s t e r and main . T h i s should be j u s t about a l l any plug−i n needs .
53
55
57
59
61
63
You can use any o f t h e PF_∗ c o n s t a n t s below as parameter types , and an
a p p r o p r i a t e user i n t e r f a c e element w i l l be d i s p l a y e d when t h e plug−i n
i s run i n i n t e r a c t i v e mode . Note t h a t t h e t h e PF_SPINNER and
PF_SLIDER t y p e s expect a f i f t h element i n t h e i r d e s c r i p t i o n t u p l e −− a
3− t u p l e o f t h e form ( lower , upper , s t e p ) , which d e f i n e s t h e l i m i t s f o r
the s l i d e r or spinner .
I f want t o l o c a l i z e your plug−i n , add an o p t i o n a l domain parameter t o
t h e r e g i s t e r c a l l . I t can be t h e name o f t h e t r a n s l a t i o n domain o r a
t u p l e t h a t c o n s i s t s o f t h e t r a n s l a t i o n domain and t h e d i r e c t o r y where
t h e t r a n s l a t i o n s are i n s t a l l e d .
65
67
69
71
73
75
77
79
81
83
85
87
89
CLASSES
e x c e p t i o n s . RuntimeError ( e x c e p t i o n s . S t a n d a r d E r r o r )
CancelError
error
c l a s s C a n c e l E r r o r ( e x c e p t i o n s . RuntimeError )
| Method r e s o l u t i o n o r d e r :
|
CancelError
|
e x c e p t i o n s . RuntimeError
|
exceptions . StandardError
|
exceptions . Exception
|
e x c e p t i o n s . BaseException
|
__builtin__ . object
|
| Data d e s c r i p t o r s d e f i n e d here :
|
| __weakref__
|
l i s t o f weak r e f e r e n c e s t o t h e o b j e c t ( i f d e f i n e d )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| Methods i n h e r i t e d from e x c e p t i o n s . RuntimeError :
|
|
__init__ ( . . . )
|
x . _ _ i n i t _ _ ( . . . ) i n i t i a l i z e s x ; see h e l p ( t y p e ( x ) ) f o r s i g n a t u r e
Distribué sous licence CC by-nc-sa
page 71 / 79
Distribué sous licence CC by-nc-sa
91
93
95
97
99
101
103
105
107
109
111
113
115
117
119
121
123
125
127
129
131
133
135
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s i n h e r i t e d from e x c e p t i o n s . RuntimeError :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t >
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Methods i n h e r i t e d from e x c e p t i o n s . BaseException :
__delattr__ ( . . . )
x . _ _ d e l a t t r _ _ ( ’ name ’ ) <==> d e l x . name
__getattribute__ ( . . . )
x . _ _ g e t a t t r i b u t e _ _ ( ’ name ’ ) <==> x . name
__getitem__ ( . . . )
x . __getitem__ ( y ) <==> x [ y ]
__getslice__ ( . . . )
x . _ _ g e t s l i c e _ _ ( i , j ) <==> x [ i : j ]
Use o f n e g a t i v e i n d i c e s i s n o t supported .
__reduce__ ( . . . )
__repr__ ( . . . )
x . __repr__ ( ) <==> r e p r ( x )
__setattr__ ( . . . )
x . _ _ s e t a t t r _ _ ( ’ name ’ , v a l u e ) <==> x . name = v a l u e
__setstate__ ( . . . )
__str__ ( . . . )
x . _ _ s t r _ _ ( ) <==> s t r ( x )
__unicode__ ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s i n h e r i t e d from e x c e p t i o n s . BaseException :
__dict__
args
message
137
139
141
143
145
147
149
151
c l a s s e r r o r ( e x c e p t i o n s . RuntimeError )
| Method r e s o l u t i o n o r d e r :
|
error
|
e x c e p t i o n s . RuntimeError
|
exceptions . StandardError
|
exceptions . Exception
|
e x c e p t i o n s . BaseException
|
__builtin__ . object
|
| Data d e s c r i p t o r s d e f i n e d here :
|
| __weakref__
|
l i s t o f weak r e f e r e n c e s t o t h e o b j e c t ( i f d e f i n e d )
|
| −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Distribué sous licence CC by-nc-sa
page 72 / 79
Distribué sous licence CC by-nc-sa
153
155
157
159
161
163
165
167
169
171
173
175
177
179
181
183
185
187
189
191
193
195
197
199
201
203
205
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
www.VVpix.com
Methods i n h e r i t e d from e x c e p t i o n s . RuntimeError :
__init__ ( . . . )
x . __init__ ( . . . )
i n i t i a l i z e s x ; see h e l p ( t y p e ( x ) ) f o r s i g n a t u r e
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data and o t h e r a t t r i b u t e s i n h e r i t e d from e x c e p t i o n s . RuntimeError :
__new__ = < b u i l t −i n method __new__ o f t y p e o b j e c t >
T . __new__ ( S , . . . ) −> a new o b j e c t w i t h t y p e S , a subtype o f T
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Methods i n h e r i t e d from e x c e p t i o n s . BaseException :
__delattr__ ( . . . )
x . _ _ d e l a t t r _ _ ( ’ name ’ ) <==> d e l x . name
__getattribute__ ( . . . )
x . _ _ g e t a t t r i b u t e _ _ ( ’ name ’ ) <==> x . name
__getitem__ ( . . . )
x . __getitem__ ( y ) <==> x [ y ]
__getslice__ ( . . . )
x . _ _ g e t s l i c e _ _ ( i , j ) <==> x [ i : j ]
Use o f n e g a t i v e i n d i c e s i s n o t supported .
__reduce__ ( . . . )
__repr__ ( . . . )
x . __repr__ ( ) <==> r e p r ( x )
__setattr__ ( . . . )
x . _ _ s e t a t t r _ _ ( ’ name ’ , v a l u e ) <==> x . name = v a l u e
__setstate__ ( . . . )
__str__ ( . . . )
x . _ _ s t r _ _ ( ) <==> s t r ( x )
__unicode__ ( . . . )
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Data d e s c r i p t o r s i n h e r i t e d from e x c e p t i o n s . BaseException :
__dict__
args
message
FUNCTIONS
N_ ( message )
207
209
211
f a i l ( msg )
D i s p l a y an e r r o r message and q u i t
main ( )
T h i s should be c a l l e d a f t e r r e g i s t e r i n g t h e plug−i n .
213
r e g i s t e r ( proc_name , b l u r b , help , author , c o p y r i g h t , date , l a b e l , imagetypes ,
params , r e s u l t s , f u n c t i o n , menu=None , domain=None , on_query=None , on_run=
Distribué sous licence CC by-nc-sa
page 73 / 79
Distribué sous licence CC by-nc-sa
215
217
219
221
223
225
227
229
231
233
235
237
239
241
243
245
247
249
251
253
255
257
259
261
263
265
267
269
271
273
275
www.VVpix.com
None )
T h i s i s c a l l e d t o r e g i s t e r a new plug−i n .
DATA
ABSOLUTE_CONVOL = 1
ADDITION_MODE = 7
ADD_ALPHA_MASK = 2
ADD_ALPHA_TRANSFER_MASK = 3
ADD_BLACK_MASK = 1
ADD_CHANNEL_MASK = 6
ADD_COPY_MASK = 5
ADD_SELECTION_MASK = 4
ADD_WHITE_MASK = 0
ALL_HUES = 0
ALPHA_CHANNEL = 5
BACKGROUND_FILL = 1
BEHIND_MODE = 2
BG_BUCKET_FILL = 1
BLUE_CHANNEL = 2
BLUE_HUES = 5
BLUR_CONVOLVE = 0
BRUSH_GENERATED_CIRCLE = 0
BRUSH_GENERATED_DIAMOND = 2
BRUSH_GENERATED_SQUARE = 1
BRUSH_HARD = 0
BRUSH_SOFT = 1
BURN = 1
BURN_MODE = 17
CHANNEL_OP_ADD = 0
CHANNEL_OP_INTERSECT = 3
CHANNEL_OP_REPLACE = 2
CHANNEL_OP_SUBTRACT = 1
CHECK_SIZE_LARGE_CHECKS = 2
CHECK_SIZE_MEDIUM_CHECKS = 1
CHECK_SIZE_SMALL_CHECKS = 0
CHECK_TYPE_BLACK_ONLY = 5
CHECK_TYPE_DARK_CHECKS = 2
CHECK_TYPE_GRAY_CHECKS = 1
CHECK_TYPE_GRAY_ONLY = 4
CHECK_TYPE_LIGHT_CHECKS = 0
CHECK_TYPE_WHITE_ONLY = 3
CLIP_TO_BOTTOM_LAYER = 2
CLIP_TO_IMAGE = 1
COLOR_ERASE_MODE = 22
COLOR_MODE = 13
CONSOLE = 1
CUSTOM_MODE = 3
CUSTOM_PALETTE = 4
CYAN_HUES = 4
DARKEN_ONLY_MODE = 9
DESATURATE_AVERAGE = 2
DESATURATE_LIGHTNESS = 0
DESATURATE_LUMINOSITY = 1
DIFFERENCE_MODE = 6
DISSOLVE_MODE = 1
DIVIDE_MODE = 15
DODGE = 0
DODGE_MODE = 16
ERROR_CONSOLE = 2
EXPAND_AS_NECESSARY = 0
EXTENSION = 2
FALSE = False
FG_BG_HSV_MODE = 1
Distribué sous licence CC by-nc-sa
page 74 / 79
Distribué sous licence CC by-nc-sa
277
279
281
283
285
287
289
291
293
295
297
299
301
303
305
307
309
311
313
315
317
319
321
323
325
327
329
331
333
335
337
339
www.VVpix.com
FG_BG_RGB_MODE = 0
FG_BUCKET_FILL = 0
FG_TRANSPARENT_MODE = 2
FIXED_DITHER = 3
FLATTEN_IMAGE = 3
FOREGROUND_EXTRACT_SIOX = 0
FOREGROUND_FILL = 0
FSLOWBLEED_DITHER = 2
FS_DITHER = 1
GRADIENT_BILINEAR = 1
GRADIENT_CONICAL_ASYMMETRIC = 5
GRADIENT_CONICAL_SYMMETRIC = 4
GRADIENT_LINEAR = 0
GRADIENT_RADIAL = 2
GRADIENT_SEGMENT_CURVED = 1
GRADIENT_SEGMENT_HSV_CCW = 1
GRADIENT_SEGMENT_HSV_CW = 2
GRADIENT_SEGMENT_LINEAR = 0
GRADIENT_SEGMENT_RGB = 0
GRADIENT_SEGMENT_SINE = 2
GRADIENT_SEGMENT_SPHERE_DECREASING = 4
GRADIENT_SEGMENT_SPHERE_INCREASING = 3
GRADIENT_SHAPEBURST_ANGULAR = 6
GRADIENT_SHAPEBURST_DIMPLED = 8
GRADIENT_SHAPEBURST_SPHERICAL = 7
GRADIENT_SPIRAL_ANTICLOCKWISE = 10
GRADIENT_SPIRAL_CLOCKWISE = 9
GRADIENT_SQUARE = 3
GRAIN_EXTRACT_MODE = 20
GRAIN_MERGE_MODE = 21
GRAY = 1
GRAYA_IMAGE = 3
GRAY_CHANNEL = 3
GRAY_IMAGE = 2
GREEN_CHANNEL = 1
GREEN_HUES = 3
GRID_DOTS = 0
GRID_DOUBLE_DASH = 3
GRID_INTERSECTIONS = 1
GRID_ON_OFF_DASH = 2
GRID_SOLID = 4
HARDLIGHT_MODE = 18
HIGHLIGHTS = 2
HISTOGRAM_ALPHA = 4
HISTOGRAM_BLUE = 3
HISTOGRAM_GREEN = 2
HISTOGRAM_RED = 1
HISTOGRAM_VALUE = 0
HUE_MODE = 11
ICON_TYPE_IMAGE_FILE = 2
ICON_TYPE_INLINE_PIXBUF = 1
ICON_TYPE_STOCK_ID = 0
IMAGE_CLONE = 0
INDEXED = 2
INDEXEDA_IMAGE = 5
INDEXED_CHANNEL = 4
INDEXED_IMAGE = 4
INK_BLOB_TYPE_CIRCLE = 0
INK_BLOB_TYPE_DIAMOND = 2
INK_BLOB_TYPE_SQUARE = 1
INTERNAL = 0
INTERPOLATION_CUBIC = 2
INTERPOLATION_LANCZOS = 3
Distribué sous licence CC by-nc-sa
page 75 / 79
Distribué sous licence CC by-nc-sa
341
343
345
347
349
351
353
355
357
359
361
363
365
367
369
371
373
375
377
379
381
383
385
387
389
391
393
395
397
399
401
www.VVpix.com
INTERPOLATION_LINEAR = 1
INTERPOLATION_NONE = 0
LIGHTEN_ONLY_MODE = 10
MAGENTA_HUES = 6
MAKE_PALETTE = 0
MASK_APPLY = 0
MASK_DISCARD = 1
MAX_IMAGE_SIZE = 262144
MAX_MEMSIZE = 4398046511104L
MAX_RESOLUTION = 65536.0
MESSAGE_BOX = 0
MIDTONES = 1
MIN_IMAGE_SIZE = 1
MIN_RESOLUTION = 0.005
MONO_PALETTE = 3
MULTIPLY_MODE = 3
NEGATIVE_CONVOL = 2
NORMAL_CONVOL = 0
NORMAL_MODE = 0
NO_DITHER = 0
OFFSET_BACKGROUND = 0
OFFSET_TRANSPARENT = 1
ORIENTATION_HORIZONTAL = 0
ORIENTATION_UNKNOWN = 2
ORIENTATION_VERTICAL = 1
OVERLAY_MODE = 5
PAINT_CONSTANT = 0
PAINT_INCREMENTAL = 1
PARASITE_ATTACH_GRANDPARENT = 8388608
PARASITE_ATTACH_PARENT = 32768
PARASITE_GRANDPARENT_PERSISTENT = 65536
PARASITE_GRANDPARENT_UNDOABLE = 131072
PARASITE_PARENT_PERSISTENT = 256
PARASITE_PARENT_UNDOABLE = 512
PARASITE_PERSISTENT = 1
PARASITE_UNDOABLE = 2
PATTERN_BUCKET_FILL = 2
PATTERN_CLONE = 1
PATTERN_FILL = 4
PDB_CALLING_ERROR = 1
PDB_CANCEL = 4
PDB_CHANNEL = 15
PDB_COLOR = 10
PDB_COLORARRAY = 18
PDB_DISPLAY = 12
PDB_DRAWABLE = 16
PDB_END = 22
PDB_ERROR_HANDLER_INTERNAL = 0
PDB_ERROR_HANDLER_PLUGIN = 1
PDB_EXECUTION_ERROR = 0
PDB_FLOAT = 3
PDB_FLOATARRAY = 8
PDB_IMAGE = 13
PDB_INT16 = 1
PDB_INT16ARRAY = 6
PDB_INT32 = 0
PDB_INT32ARRAY = 5
PDB_INT8 = 2
PDB_INT8ARRAY = 7
PDB_ITEM = 11
PDB_LAYER = 14
PDB_PARASITE = 20
PDB_PASS_THROUGH = 2
Distribué sous licence CC by-nc-sa
page 76 / 79
Distribué sous licence CC by-nc-sa
403
405
407
409
411
413
415
417
419
421
423
425
427
429
431
433
435
437
439
441
443
445
447
449
451
453
455
457
459
461
463
465
www.VVpix.com
PDB_SELECTION = 17
PDB_STATUS = 21
PDB_STRING = 4
PDB_STRINGARRAY = 9
PDB_SUCCESS = 3
PDB_VECTORS = 19
PF_ADJUSTMENT = 1002
PF_BOOL = 1000
PF_BRUSH = 1005
PF_CHANNEL = 15
PF_COLOR = 10
PF_COLOUR = 10
PF_DIRNAME = 1012
PF_DISPLAY = 12
PF_DRAWABLE = 16
PF_FILE = 1004
PF_FILENAME = 1011
PF_FLOAT = 3
PF_FONT = 1003
PF_GRADIENT = 1007
PF_IMAGE = 13
PF_INT = 0
PF_INT16 = 1
PF_INT32 = 0
PF_INT8 = 2
PF_ITEM = 11
PF_LAYER = 14
PF_OPTION = 1013
PF_PALETTE = 1010
PF_PATTERN = 1006
PF_RADIO = 1008
PF_SLIDER = 1001
PF_SPINNER = 1002
PF_STRING = 4
PF_TEXT = 1009
PF_TOGGLE = 1000
PF_VALUE = 4
PF_VECTORS = 19
PIXELS = 0
PIXEL_FETCHER_EDGE_BACKGROUND = 4
PIXEL_FETCHER_EDGE_BLACK = 3
PIXEL_FETCHER_EDGE_NONE = 0
PIXEL_FETCHER_EDGE_SMEAR = 2
PIXEL_FETCHER_EDGE_WRAP = 1
PLUGIN = 1
POINTS = 1
PROGRESS_COMMAND_END = 1
PROGRESS_COMMAND_GET_WINDOW = 5
PROGRESS_COMMAND_PULSE = 4
PROGRESS_COMMAND_SET_TEXT = 2
PROGRESS_COMMAND_SET_VALUE = 3
PROGRESS_COMMAND_START = 0
RED_CHANNEL = 0
RED_HUES = 1
REPEAT_NONE = 0
REPEAT_SAWTOOTH = 1
REPEAT_TRIANGULAR = 2
REUSE_PALETTE = 1
RGB = 0
RGBA_IMAGE = 1
RGB_IMAGE = 0
ROTATE_180 = 1
ROTATE_270 = 2
Distribué sous licence CC by-nc-sa
page 77 / 79
Distribué sous licence CC by-nc-sa
467
469
471
473
475
477
479
481
483
485
487
489
491
493
495
497
499
501
503
505
507
509
511
513
515
517
519
521
523
www.VVpix.com
ROTATE_90 = 0
RUN_INTERACTIVE = 0
RUN_NONINTERACTIVE = 1
RUN_WITH_LAST_VALS = 2
SATURATION_MODE = 12
SCREEN_MODE = 4
SELECT_CRITERION_B = 3
SELECT_CRITERION_COMPOSITE = 0
SELECT_CRITERION_G = 2
SELECT_CRITERION_H = 4
SELECT_CRITERION_R = 1
SELECT_CRITERION_S = 5
SELECT_CRITERION_V = 6
SHADOWS = 0
SHARPEN_CONVOLVE = 1
SOFTLIGHT_MODE = 19
STACK_TRACE_ALWAYS = 2
STACK_TRACE_NEVER = 0
STACK_TRACE_QUERY = 1
SUBTRACT_MODE = 8
TEMPORARY = 3
TEXT_DIRECTION_LTR = 0
TEXT_DIRECTION_RTL = 1
TEXT_HINT_STYLE_FULL = 3
TEXT_HINT_STYLE_MEDIUM = 2
TEXT_HINT_STYLE_NONE = 0
TEXT_HINT_STYLE_SLIGHT = 1
TEXT_JUSTIFY_CENTER = 2
TEXT_JUSTIFY_FILL = 3
TEXT_JUSTIFY_LEFT = 0
TEXT_JUSTIFY_RIGHT = 1
TRANSFORM_BACKWARD = 1
TRANSFORM_FORWARD = 0
TRANSFORM_RESIZE_ADJUST = 0
TRANSFORM_RESIZE_CLIP = 1
TRANSFORM_RESIZE_CROP = 2
TRANSFORM_RESIZE_CROP_WITH_ASPECT = 3
TRANSPARENT_FILL = 3
TRUE = True
UNIT_INCH = 1
UNIT_MM = 2
UNIT_PICA = 4
UNIT_PIXEL = 0
UNIT_POINT = 3
USER_DIRECTORY_DESKTOP = 0
USER_DIRECTORY_DOCUMENTS = 1
USER_DIRECTORY_DOWNLOAD = 2
USER_DIRECTORY_MUSIC = 3
USER_DIRECTORY_PICTURES = 4
USER_DIRECTORY_PUBLIC_SHARE = 5
USER_DIRECTORY_TEMPLATES = 6
USER_DIRECTORY_VIDEOS = 7
VALUE_MODE = 14
VECTORS_STROKE_TYPE_BEZIER = 0
WEB_PALETTE = 2
WHITE_FILL = 2
YELLOW_HUES = 2
pdb = <gimp p r o c e d u r a l database >
t = < g e t t e x t . N u l l T r a n s l a t i o n s instance >
Distribué sous licence CC by-nc-sa
page 78 / 79
Distribué sous licence CC by-nc-sa
24.5
www.VVpix.com
Liens
Le site Gimp officiel
La référence de l’API Python de Gimp
Distribué sous licence CC by-nc-sa
page 79 / 79