informatica:linux:gimp:script
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:linux:gimp:script [2021/09/22 18:23] – jose | informatica:linux:gimp:script [2021/09/22 20:55] (current) – [Ejemplo 2 (RISK)] jose | ||
|---|---|---|---|
| Line 104: | Line 104: | ||
| ====== Ejemplos ====== | ====== Ejemplos ====== | ||
| - | ====== Ejemplo 1 ====== | + | ===== Ejemplo 1 ===== |
| Desde una selección, amplía, hace borde y rellena con BG | Desde una selección, amplía, hace borde y rellena con BG | ||
| < | < | ||
| Line 136: | Line 136: | ||
| </ | </ | ||
| + | Guardando selecciones: | ||
| + | < | ||
| + | (let* ( | ||
| + | (MyIMAGE (aref (cadr (gimp-image-list)) 0)) | ||
| + | (MyLAYER (car (gimp-image-get-active-layer MyIMAGE))) | ||
| + | (MySELECTION1 (car (gimp-selection-save MyIMAGE))) | ||
| + | ) | ||
| + | (gimp-selection-grow MyIMAGE 8) | ||
| + | (gimp-selection-border MyIMAGE 8) | ||
| + | (gimp-edit-copy MyLAYER) | ||
| + | (let* ( | ||
| + | (MySELECTION2 (car (gimp-selection-save MyIMAGE))) | ||
| + | (MyFLOATING (car (gimp-edit-paste MyLAYER FALSE))) | ||
| + | ) | ||
| + | (gimp-floating-sel-to-layer MyFLOATING) | ||
| + | (let ( | ||
| + | | ||
| + | ) | ||
| + | (gimp-image-select-item MyIMAGE 2 MySELECTION1) | ||
| + | (gimp-drawable-edit-fill MyLAYER2 0) | ||
| + | (gimp-image-select-item MyIMAGE 2 MySELECTION2) | ||
| + | (gimp-drawable-edit-fill MyLAYER2 1) | ||
| + | ) | ||
| + | ) | ||
| + | ) | ||
| + | </ | ||
| + | ====== Ejecutar Script ====== | ||
| + | Copiamos este script en el directorio de scripts con la extensión scm. Para saber cual es el directorio de scripts, vamos a: | ||
| + | Edit > Preferences > Folders > Scripts | ||
| + | Suele ser: | ||
| + | < | ||
| + | En este ejemplo, aparece con el nombre **Risk** en el menu de Filters. Una vez copiado, para que aparezca en el menú, pulsamos: **Filters > Script-Fu > Refresh Scripts** | ||
| + | < | ||
| + | ( define (script-fu-risk) | ||
| + | (let* ( | ||
| + | (MyIMAGE (aref (cadr (gimp-image-list)) 0)) | ||
| + | (MyLAYER (car (gimp-image-get-active-layer MyIMAGE))) | ||
| + | (MySELECTION1 (car (gimp-selection-save MyIMAGE))) | ||
| + | ) | ||
| + | (gimp-selection-grow MyIMAGE 8) | ||
| + | (gimp-selection-border MyIMAGE 8) | ||
| + | (gimp-edit-copy MyLAYER) | ||
| + | (let* ( | ||
| + | (MySELECTION2 (car (gimp-selection-save MyIMAGE))) | ||
| + | (MyFLOATING (car (gimp-edit-paste MyLAYER FALSE))) | ||
| + | ) | ||
| + | (gimp-floating-sel-to-layer MyFLOATING) | ||
| + | (let ( | ||
| + | | ||
| + | ) | ||
| + | (gimp-image-select-item MyIMAGE 2 MySELECTION1) | ||
| + | (gimp-drawable-edit-fill MyLAYER2 0) | ||
| + | (gimp-image-select-item MyIMAGE 2 MySELECTION2) | ||
| + | (gimp-drawable-edit-fill MyLAYER2 1) | ||
| + | (gimp-selection-none MyIMAGE) | ||
| + | (gimp-image-remove-channel MyIMAGE MySELECTION1) | ||
| + | (gimp-image-remove-channel MyIMAGE MySELECTION2) | ||
| + | (gimp-displays-flush) | ||
| + | ) | ||
| + | ) | ||
| + | ) | ||
| + | ) | ||
| + | |||
| + | (script-fu-register | ||
| + | " | ||
| + | " | ||
| + | "Crea un Layer con el pais seleccionado | ||
| + | de color de FG y el borde mas gordo" | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | "" | ||
| + | ) | ||
| + | (script-fu-menu-register " | ||
| + | |||
| + | </ | ||
informatica/linux/gimp/script.1632335019.txt.gz · Last modified: by jose
