Compare commits
104 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6bcc159f6 | ||
|
|
4bb647421c | ||
|
|
49b170adf9 | ||
|
|
a156587545 | ||
|
|
f71bb04767 | ||
|
|
683c5d9a31 | ||
|
|
aba878dbbd | ||
|
|
cc68ec8af7 | ||
|
|
7b7c76a588 | ||
|
|
34678e9879 | ||
|
|
b56d0754e6 | ||
|
|
215a96b7ed | ||
|
|
1344b15c9c | ||
|
|
40a73a803e | ||
|
|
c024a34dec | ||
|
|
d5b72618dc | ||
|
|
40084f6841 | ||
|
|
f56dcdf172 | ||
|
|
8e12537499 | ||
|
|
3a4a0aae22 | ||
|
|
da9dcdb3e8 | ||
|
|
d0a86b2b9e | ||
|
|
e9861f621f | ||
|
|
424a5ef86b | ||
|
|
c7d1bbe566 | ||
|
|
30e77d4fee | ||
|
|
60ab5cb675 | ||
|
|
1b1ae8f7e0 | ||
|
|
7525248442 | ||
|
|
8355e40c3d | ||
|
|
451b4d19f7 | ||
|
|
dffcdfc5c5 | ||
|
|
3caf513493 | ||
|
|
8e69efe498 | ||
|
|
2d2d51a4ee | ||
|
|
2141ca66a0 | ||
|
|
dbda2223d0 | ||
|
|
01b91e878b | ||
|
|
52e6d15a10 | ||
|
|
eb13a19335 | ||
|
|
22708aee02 | ||
|
|
d74678a102 | ||
|
|
9a98919d27 | ||
|
|
75c47dfbec | ||
|
|
22bcc0853a | ||
|
|
abe6586c78 | ||
|
|
223de6a64b | ||
|
|
edbde06899 | ||
|
|
71454b7315 | ||
|
|
f70e8a53c5 | ||
|
|
a4040835a0 | ||
|
|
dcde3165bc | ||
|
|
0c5bf60f06 | ||
|
|
7040815a3a | ||
|
|
246c1fbb04 | ||
|
|
3a5cf20b03 | ||
|
|
357de53151 | ||
|
|
8bcbe0113d | ||
|
|
62b9591b21 | ||
|
|
0f30d30448 | ||
|
|
c96db15b00 | ||
|
|
2634d16361 | ||
|
|
1d13c3b580 | ||
|
|
90fbe82530 | ||
|
|
42606b8ce9 | ||
|
|
99a32dc1c2 | ||
|
|
0e5c83ff76 | ||
|
|
ab45b607f6 | ||
|
|
bd64aff77f | ||
|
|
747e383888 | ||
|
|
4049f66e93 | ||
|
|
e5a1e45412 | ||
|
|
3fd88b8e8b | ||
|
|
d37aa48204 | ||
|
|
34a4e7da22 | ||
|
|
6c77784a14 | ||
|
|
a973c61c3f | ||
|
|
69d91a830d | ||
|
|
f5ac0e1fa2 | ||
|
|
2ef37d81c2 | ||
|
|
5da2c7d3f3 | ||
|
|
4c745c9e68 | ||
|
|
e479b0b0d5 | ||
|
|
549a07861e | ||
|
|
139c9b3683 | ||
|
|
215f91e5e8 | ||
|
|
8561981db2 | ||
|
|
0545999c9c | ||
|
|
6a58435ca0 | ||
|
|
110a792ee2 | ||
|
|
c3d11faffc | ||
|
|
903dc25e6e | ||
|
|
35bed4e3ec | ||
|
|
9d4cb0244c | ||
|
|
27a21c9757 | ||
|
|
92bce9087e | ||
|
|
6393ac6161 | ||
|
|
ae95a80ac6 | ||
|
|
8982713e85 | ||
|
|
d8c60f817c | ||
|
|
62816506f5 | ||
|
|
ecdc1d0c30 | ||
|
|
a41534a250 | ||
|
|
bced8ac5ed |
9
.editorconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
9
.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Ignore Dynamic Linker
|
||||
.var/app/org.gimp.GIMP/.ld.so
|
||||
|
||||
# Ignore Personal GIMP Files
|
||||
.var/app/org.gimp.GIMP/data
|
||||
.var/app/org.gimp.GIMP/current
|
||||
|
||||
# VSCode Files
|
||||
.vscode/*
|
||||
@@ -2,12 +2,177 @@
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=PhotoGIMP
|
||||
GenericName=Editor de imagens
|
||||
Comment=Crie e edite imagens ou fotografias
|
||||
Icon=photogimp.png
|
||||
GenericName=Image Editor
|
||||
GenericName[ar]=محرر صور
|
||||
GenericName[ast]=Editor d'imaxe
|
||||
GenericName[be]=Рэдактар відарысаў
|
||||
GenericName[bg]=Редактор на изображения
|
||||
GenericName[br]=Embanner skeudennoù
|
||||
GenericName[bs]=Obrada slika
|
||||
GenericName[ca]=Editor d'imatges
|
||||
GenericName[ca@valencia]=Editor d'imatges
|
||||
GenericName[cs]=Editor obrázků
|
||||
GenericName[da]=Billedredigering
|
||||
GenericName[de]=Bildeditor
|
||||
GenericName[dz]=གཟུགས་བརྙན་ ཞུན་དག་པ།
|
||||
GenericName[el]=Επεξεργαστής εικόνων
|
||||
GenericName[en_CA]=Image Editor
|
||||
GenericName[en_GB]=Image Editor
|
||||
GenericName[eo]=Bildredaktilo
|
||||
GenericName[es]=Editor de imagen
|
||||
GenericName[et]=Pildiredaktor
|
||||
GenericName[eu]=Irudi-editorea
|
||||
GenericName[fa]=ویرایشگر تصویر
|
||||
GenericName[fi]=Kuvankäsittely
|
||||
GenericName[fr]=Éditeur d’image
|
||||
GenericName[gd]=Deasaiche dhealbhan
|
||||
GenericName[gl]=Editor de imaxes
|
||||
GenericName[gu]=ચિત્ર સંપાદક
|
||||
GenericName[hr]=Uređivač slika
|
||||
GenericName[hu]=Képszerkesztő
|
||||
GenericName[id]=Penyunting Gambar
|
||||
GenericName[is]=Myndvinnsluforrit
|
||||
GenericName[it]=Modifica immagine
|
||||
GenericName[ja]=画像エディター
|
||||
GenericName[ka]=გამოსახულებების რედაქტორი
|
||||
GenericName[kk]=Суреттерді өңдеу қолданбасы
|
||||
GenericName[km]=កម្មវិធីនិពន្ធរូបភាព
|
||||
GenericName[kn]=ಚಿತ್ರ ಸಂಪಾದಕ
|
||||
GenericName[ko]=이미지 편집기
|
||||
GenericName[ky]=Сүрөт редактору
|
||||
GenericName[lt]=Paveikslėlių rengyklė
|
||||
GenericName[lv]=Attēlu redaktors
|
||||
GenericName[mk]=Уредник за слики
|
||||
GenericName[mr]=प्रतिमा संपादक
|
||||
GenericName[my]=ရုပ်ပုံ တည်းဖြတ်ကိရိယာ
|
||||
GenericName[nb]=Bildebehandler
|
||||
GenericName[nds]=Billbewarker
|
||||
GenericName[ne]=छवि सम्पादक
|
||||
GenericName[nl]=Editor Afbeeldingen
|
||||
GenericName[nn]=Bilethandterar
|
||||
GenericName[oc]=Editor d'imatge
|
||||
GenericName[pa]=ਚਿੱਤਰ ਐਡੀਟਰ
|
||||
GenericName[pl]=Edytor obrazów
|
||||
GenericName[pt]=Editor de imagens
|
||||
GenericName[pt_BR]=Editor de imagens
|
||||
GenericName[ro]=Editor de imagini
|
||||
GenericName[ru]=Редактор изображений
|
||||
GenericName[sk]=Editor obrázkov
|
||||
GenericName[sl]=Urejevalnik slik
|
||||
GenericName[sr]=Обрада фотографија
|
||||
GenericName[sr@latin]=Obrada slika
|
||||
GenericName[sv]=Bildredigerare
|
||||
GenericName[ta]=பிம்ப திருத்தி
|
||||
GenericName[te]=బొమ్మ కూర్పకము
|
||||
GenericName[th]=เครื่องมือแก้ไขภาพ
|
||||
GenericName[tr]=Görüntü Düzenleyici
|
||||
GenericName[tt]=Sürät Tözätkeç
|
||||
GenericName[uk]=Редактор зображень
|
||||
GenericName[vi]=Bộ biên soạn ảnh
|
||||
GenericName[xh]=UmHleli woMfanekiso
|
||||
GenericName[zh_CN]=图像编辑器
|
||||
GenericName[zh_HK]=圖片編輯器
|
||||
GenericName[zh_TW]=影像編輯器
|
||||
Comment=Create images and edit photographs
|
||||
Comment[ar]=أنشئ صورا وحرّر لقطات
|
||||
Comment[ast]=Cree imáxenes y edite semeyes
|
||||
Comment[be]=Стварэньне відарысаў і праўленьне фатаздымкаў
|
||||
Comment[bg]=Създаване на изображения и редакция на снимки
|
||||
Comment[br]=Krouiñ hag embann skeudennoù pe luc'hskeudennoù
|
||||
Comment[bs]=Napravite slike i obradite fotografije
|
||||
Comment[ca]=Creeu imatges i editeu fotografies
|
||||
Comment[ca@valencia]=Creeu imatges i editeu fotografies
|
||||
Comment[cs]=Vytvářejte obrázky a upravujte fotografie
|
||||
Comment[da]=Opret billeder og redigér fotografier
|
||||
Comment[de]=Bilder erstellen und Fotografien bearbeiten
|
||||
Comment[dz]=གཟུགས་བརྙན་ཚུ་ གསར་བསྐྲུན་འབད་ནི་དང་ དཔར་ཚུ་ཞུན་དག་འབད།
|
||||
Comment[el]=Δημιουργία εικόνων και επεξεργασία φωτογραφιών
|
||||
Comment[en_CA]=Create images and edit photographs
|
||||
Comment[en_GB]=Create images and edit photographs
|
||||
Comment[eo]=Krei bildojn aŭ redakti fotaĵojn
|
||||
Comment[es]=Cree imágenes y edite fotografías
|
||||
Comment[et]=Joonistamine ja fotode töötlemine
|
||||
Comment[eu]=Sortu irudiak eta editatu argazkiak
|
||||
Comment[fi]=Luo kuvia ja muokkaa valokuvia
|
||||
Comment[fr]=Créer des images et modifier des photographies
|
||||
Comment[gd]=Cruthaich dealbhan is deasaich dealbhan camara
|
||||
Comment[gl]=Crear imaxes e editar fotografías
|
||||
Comment[gu]=ચિત્રો બનાવો અને ફોટાઓમાં ફેરફાર કરો
|
||||
Comment[hr]=Stvaraj slike i uređuj fotografije
|
||||
Comment[hu]=Képek létrehozása és fotók szerkesztése
|
||||
Comment[id]=Buat gambar dan sunting foto
|
||||
Comment[is]=Búa til myndir og breyta ljósmyndum
|
||||
Comment[it]=Crea immagini e modifica fotografie
|
||||
Comment[ja]=画像の作成と写真の編集を行います
|
||||
Comment[kk]=Суреттерді жасау және фотоларды түзету
|
||||
Comment[km]=បង្កើតរូបភាព និង កែសម្រួលរូបថត
|
||||
Comment[kn]=ಚಿತ್ರಗಳನ್ನು ರಚಿಸಿ ಹಾಗು ಫೋಟೋಗ್ರಾಫ್ಗಳನ್ನು ಸಂಪಾದಿಸಿ
|
||||
Comment[ko]=이미지를 만들고 사진을 편집합니다
|
||||
Comment[lt]=Kurti paveikslėlius ir redaguoti fotografijas
|
||||
Comment[lv]=Veido attēlus vai rediģē fotogrāfijas
|
||||
Comment[mk]=Направи слики и уреди фотографии
|
||||
Comment[mr]=प्रतिमा तयार करा आणि छायाचित्रे संपादित करा
|
||||
Comment[my]=ရုပ်ပုံများကို ဖန်တီးပြီး ဓါတ်ပုံများကို တည်းဖြတ်ပါ
|
||||
Comment[nb]=Lag bilder og rediger fotografier
|
||||
Comment[ne]=छवि सिर्जना गर्नुहोस् र फोटोग्राफ सम्पादन गर्नुहोस्
|
||||
Comment[nl]=Afbeeldingen aanmaken en foto's bewerken
|
||||
Comment[nn]=Lag teikningar eller rediger foto
|
||||
Comment[oc]=Crear d'imatges e modificar de fotografias
|
||||
Comment[pa]=ਚਿੱਤਰ ਬਣਾਓ ਅਤੇ ਤਸਵੀਰਾਂ ਸੋਧੋ
|
||||
Comment[pl]=Tworzenie oraz obróbka obrazów i fotografii
|
||||
Comment[pt]=Criar imagens e editar fotografias
|
||||
Comment[pt_BR]=Crie e edite imagens ou fotografias
|
||||
Comment[ro]=Creează imagini și editează fotografii
|
||||
Comment[ru]=Создание изображений и редактирование фотографий
|
||||
Comment[sk]=Vytvárajte a upravujte obrázky alebo fotografie
|
||||
Comment[sl]=Ustvari slike in uredi fotografije
|
||||
Comment[sr]=Направите нове сличице и средите ваше фотографије
|
||||
Comment[sr@latin]=Napravite slike i uredite fotografije
|
||||
Comment[sv]=Skapa bilder och redigera fotografier
|
||||
Comment[ta]=பிம்பங்களை உருவாக்கவும் மற்றும் படங்களை திருத்தவும்
|
||||
Comment[te]=బొమ్మలను సృష్టించు మరియు చిత్రాలను సవరించు
|
||||
Comment[tr]=Görüntü oluşturur ve fotoğraf düzenler
|
||||
Comment[uk]=Створення зображень та редагування фотографій
|
||||
Comment[vi]=Tạo và biên soạn ảnh hay ảnh chụp
|
||||
Comment[zh_CN]=创建图像或编辑照片
|
||||
Comment[zh_HK]=建立圖像與編輯照片
|
||||
Comment[zh_TW]=建立圖像與編輯照片
|
||||
Icon=photogimp
|
||||
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=gimp-2.10 --file-forwarding org.gimp.GIMP @@u %U @@
|
||||
Actions=
|
||||
MimeType=image/bmp;image/g3fax;image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/tiff;image/jpeg;image/x-psp;application/postscript;image/png;image/x-icon;image/x-xpixmap;image/x-exr;image/x-webp;image/heif;image/heic;image/svg+xml;application/pdf;image/x-wmf;image/jp2;image/x-xcursor;
|
||||
Categories=2DGraphics;GTK;Graphics;RasterGraphics;
|
||||
Keywords=GIMP;gráficos;design;ilustração;pintura;photo;
|
||||
Keywords=GIMP;PhotoGIMP;graphic;design;illustration;painting;
|
||||
Keywords[ar]=GIMP;PhotoGIMP;graphic;design;illustration;painting;
|
||||
Keywords[ca]=GIMP;PhotoGIMP;gràfics;disseny;il·lustració;pintura;
|
||||
Keywords[ca@valencia]=GIMP;PhotoGIMP;gràfic;disseny;il·lustració;pintura;
|
||||
Keywords[cs]=GIMP;PhotoGIMP;grafika;design;ilustrace;malování;
|
||||
Keywords[da]=GIMP;PhotoGIMP;grafisk;design;illustration;male;tegne;
|
||||
Keywords[de]=GIMP;PhotoGIMP;Grafik;Design;Illustration;Malen;
|
||||
Keywords[el]=GIMP;PhotoGIMP;γραφικό;σχεδίαση;επεξήγηση;βαφή;
|
||||
Keywords[en_GB]=GIMP;PhotoGIMP;graphic;design;illustration;painting;
|
||||
Keywords[es]=GIMP;PhotoGIMP;gráfico;diseño;ilustración;dibujo;
|
||||
Keywords[eu]=GIMP;PhotoGIMP;irudia;diseinua;ilustrazioa;margotzea;
|
||||
Keywords[fi]=GIMP;PhotoGIMP;grafiikka;maalaus;suunnittelu;valokuva;kuva;
|
||||
Keywords[fr]=GIMP;PhotoGIMP;graphisme;conception;design;illustration;image;peinture;
|
||||
Keywords[gl]=GIMP;PhotoGIMP;gráfico;deseño;ilustración;debuxo;
|
||||
Keywords[hr]=GIMP;PhotoGIMP;grafika;dizajn;ilustracija;slikanje;
|
||||
Keywords[hu]=GIMP;PhotoGIMP;grafika;dizájn;tervezés;illusztráció;festés;
|
||||
Keywords[is]=GIMP;PhotoGIMP;mynd;hönnun;myndskreyting;málun;myndvinnsla;
|
||||
Keywords[it]=GIMP;PhotoGIMP;grafica;design;illustrazioni;disegno;fotoritocco;
|
||||
Keywords[lv]=GIMP;PhotoGIMP;grafika;dizains;ilustrācija;glezna;
|
||||
Keywords[mr]=गिम्पसाठी;ग्राफिक्स;रचना;उदाहरण;चित्रकला;
|
||||
Keywords[nl]=GIMP;PhotoGIMP;grafisch;ontwerp;illustratie;tekenen;
|
||||
Keywords[pl]=GIMP;PhotoGIMP;grafika;graficzny;design;dizajn;projektowanie;wzornictwo;ilustracja;ilustrowanie;rysunek;rysowanie;rysownictwo;malowanie;malarstwo;obrazy;obrazki;fotografia;zdjęcia;retuszowanie;renderowanie;wtyczki;
|
||||
Keywords[pt]=GIMP;PhotoGIMP;gráficos;design;desenho;ilustração;pintura;
|
||||
Keywords[pt_BR]=GIMP;PhotoGIMP;gráficos;design;ilustração;pintura;
|
||||
Keywords[ro]=GIMP;PhotoGIMP;graphic;design;illustration;painting;
|
||||
Keywords[ru]=GIMP;PhotoGIMP;графика;дизайн;иллюстрация;рисование;
|
||||
Keywords[sk]=GIMP;PhotoGIMP;grafika;grafický;návrh;dizajn;ilustrácia;kresba;maľovanie;maľba;
|
||||
Keywords[sl]=GIMP;PhotoGIMP;grafika;oblikovanje;ilustracija;slikanje;
|
||||
Keywords[sr]=Гимп;обрада фотографија;графика;дизајн;илустрација;цртање;obrada fotografija;grafika;dizajn;ilustracija;crtanje;GIMP;PhotoGIMP;graphic;design;illustration;painting;
|
||||
Keywords[sv]=GIMP;PhotoGIMP;grafik;design;illustrera;målning;rita;
|
||||
Keywords[tr]=GIMP;PhotoGIMP;grafik;tasarım;örnekleme;boyama;illüstrasyon;resimleme;
|
||||
Keywords[uk]=GIMP;PhotoGIMP;graphic;design;illustration;painting;гімп;ґімп;графіка;дизайн;ілюстрації;малювання;
|
||||
Keywords[zh_CN]=GIMP;PhotoGIMP;图形;设计;绘画;graphic;design;illustration;painting;
|
||||
StartupNotify=true
|
||||
|
||||
BIN
.local/share/icons/hicolor/128x128/apps/photogimp.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
.local/share/icons/hicolor/16x16/apps/photogimp.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
.local/share/icons/hicolor/256x256/apps/photogimp.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
.local/share/icons/hicolor/32x32/apps/photogimp.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
.local/share/icons/hicolor/48x48/apps/photogimp.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
.local/share/icons/hicolor/512x512/apps/photogimp.png
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
.local/share/icons/hicolor/64x64/apps/photogimp.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 187 KiB |
@@ -1 +0,0 @@
|
||||
f987e6b9bd54b82c3668251d34c8b573e1f4ba22e117ecbd1dd0013ee8320202
|
||||
@@ -1,4 +0,0 @@
|
||||
# recently closed docks
|
||||
|
||||
|
||||
# end of recently closed docks
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# GIMP gimprc
|
||||
#
|
||||
#
|
||||
# This is your personal gimprc file. Any variable defined in this file takes
|
||||
# precedence over the value defined in the system-wide gimprc:
|
||||
# /app/etc/gimp/2.0/gimprc
|
||||
@@ -7,7 +7,7 @@
|
||||
# Preferences dialog.
|
||||
|
||||
(use-opencl yes)
|
||||
(language "en_US")
|
||||
(language "")
|
||||
(default-image
|
||||
(width 1280)
|
||||
(height 720)
|
||||
@@ -41,8 +41,8 @@
|
||||
(snap-to-grid no)
|
||||
(snap-to-canvas no)
|
||||
(snap-to-path no)
|
||||
(padding-mode default)
|
||||
(padding-color (color-rgb 1 1 1))
|
||||
(padding-mode custom)
|
||||
(padding-color (color-rgb 0.098039215686274508 0.098039215686274508 0.098039215686274508))
|
||||
(padding-in-show-all no))
|
||||
(filter-tool-show-color-options yes)
|
||||
(toolbox-wilber no)
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
GIMP Gradient
|
||||
Name: Custom
|
||||
2
|
||||
0 0.26039777684111548 0.52079555368222941 0 0 0 1 0.022415173491766974 0.00034873996086867313 0.10440560888171176 1 0 0 1 0
|
||||
0.52079555368222941 0.76039777684111642 1 0.022415173491766974 0.00034873996086867313 0.10440560888171176 1 1 1 1 1 0 0 0 3
|
||||
@@ -1,6 +0,0 @@
|
||||
# GIMP parasiterc
|
||||
#
|
||||
# This file will be entirely rewritten each time you exit.
|
||||
|
||||
|
||||
# end of parasiterc
|
||||
|
||||
@@ -41,112 +41,118 @@ def heal_selection(timg, tdrawable, samplingRadiusParam=50, directionParam=0, or
|
||||
if pdb.gimp_selection_is_empty(timg):
|
||||
pdb.gimp_message(_("You must first select a region to heal."))
|
||||
return
|
||||
|
||||
|
||||
pdb.gimp_image_undo_group_start(timg)
|
||||
|
||||
|
||||
targetBounds = tdrawable.mask_bounds
|
||||
|
||||
# In duplicate image, create the sample (corpus).
|
||||
# (I tried to use a temporary layer but found it easier to use duplicate image.)
|
||||
tempImage = pdb.gimp_image_duplicate(timg)
|
||||
|
||||
if not tempImage:
|
||||
raise RuntimeError, "Failed duplicate image"
|
||||
|
||||
|
||||
# !!! The drawable can be a mask (grayscale channel), don't restrict to layer.
|
||||
work_drawable = pdb.gimp_image_get_active_drawable(tempImage)
|
||||
|
||||
if not work_drawable:
|
||||
raise RuntimeError, "Failed get active drawable"
|
||||
|
||||
|
||||
'''
|
||||
grow and punch hole, making a frisket iow stencil iow donut
|
||||
|
||||
|
||||
'''
|
||||
orgSelection = pdb.gimp_selection_save(tempImage) # save for later use
|
||||
pdb.gimp_selection_grow(tempImage, samplingRadiusParam)
|
||||
# ??? returns None , docs say it returns SUCCESS
|
||||
|
||||
|
||||
# !!! Note that if selection is a bordering ring already, growing expanded it inwards.
|
||||
# Which is what we want, to make a corpus inwards.
|
||||
|
||||
|
||||
grownSelection = pdb.gimp_selection_save(tempImage)
|
||||
|
||||
|
||||
# Cut hole where the original selection was, so we don't sample from it.
|
||||
# !!! Note that gimp enums/constants are not prefixed with GIMP_
|
||||
pdb.gimp_image_select_item(tempImage, CHANNEL_OP_SUBTRACT, orgSelection)
|
||||
|
||||
pdb.gimp_selection_combine(orgSelection, CHANNEL_OP_SUBTRACT)
|
||||
|
||||
'''
|
||||
Selection (to be the corpus) is donut or frisket around the original target T
|
||||
xxx
|
||||
xTx
|
||||
xxx
|
||||
'''
|
||||
|
||||
|
||||
# crop the temp image to size of selection to save memory and for directional healing!!
|
||||
frisketBounds = grownSelection.mask_bounds
|
||||
|
||||
frisketLowerLeftX = frisketBounds[0]
|
||||
frisketLowerLeftY = frisketBounds[1]
|
||||
frisketUpperRightX = frisketBounds[2]
|
||||
frisketUpperRightY = frisketBounds[3]
|
||||
|
||||
targetLowerLeftX = targetBounds[0]
|
||||
targetLowerLeftY = targetBounds[1]
|
||||
targetUpperRightX = targetBounds[2]
|
||||
targetUpperRightY = targetBounds[3]
|
||||
|
||||
|
||||
frisketWidth = frisketUpperRightX - frisketLowerLeftX
|
||||
frisketHeight = frisketUpperRightY - frisketLowerLeftY
|
||||
|
||||
|
||||
# User's choice of direction affects the corpus shape, and is also passed to resynthesizer plugin
|
||||
if directionParam == 0: # all around
|
||||
# Crop to the entire frisket
|
||||
newWidth, newHeight, newLLX, newLLY = ( frisketWidth, frisketHeight,
|
||||
newWidth, newHeight, newLLX, newLLY = ( frisketWidth, frisketHeight,
|
||||
frisketLowerLeftX, frisketLowerLeftY )
|
||||
elif directionParam == 1: # sides
|
||||
# Crop to target height and frisket width: XTX
|
||||
newWidth, newHeight, newLLX, newLLY = ( frisketWidth, targetUpperRightY-targetLowerLeftY,
|
||||
newWidth, newHeight, newLLX, newLLY = ( frisketWidth, targetUpperRightY-targetLowerLeftY,
|
||||
frisketLowerLeftX, targetLowerLeftY )
|
||||
elif directionParam == 2: # above and below
|
||||
# X Crop to target width and frisket height
|
||||
# T
|
||||
# X
|
||||
newWidth, newHeight, newLLX, newLLY = ( targetUpperRightX-targetLowerLeftX, frisketHeight,
|
||||
newWidth, newHeight, newLLX, newLLY = ( targetUpperRightX-targetLowerLeftX, frisketHeight,
|
||||
targetLowerLeftX, frisketLowerLeftY )
|
||||
|
||||
# Restrict crop to image size (condition of gimp_image_crop) eg when off edge of image
|
||||
newWidth = min(pdb.gimp_image_width(tempImage) - newLLX, newWidth)
|
||||
newHeight = min(pdb.gimp_image_height(tempImage) - newLLY, newHeight)
|
||||
pdb.gimp_image_crop(tempImage, newWidth, newHeight, newLLX, newLLY)
|
||||
|
||||
|
||||
# Encode two script params into one resynthesizer param.
|
||||
# use border 1 means fill target in random order
|
||||
# use border 0 is for texture mapping operations, not used by this script
|
||||
if not orderParam :
|
||||
useBorder = 1 # User wants NO order, ie random filling
|
||||
elif orderParam == 1 : # Inward to corpus. 2,3,4
|
||||
useBorder = directionParam+2 # !!! Offset by 2 to get past the original two boolean values
|
||||
useBorder = directionParam + 2 # !!! Offset by 2 to get past the original two boolean values
|
||||
else:
|
||||
# Outward from image center.
|
||||
# Outward from image center.
|
||||
# 5+0=5 outward concentric
|
||||
# 5+1=6 outward from sides
|
||||
# 5+2=7 outward above and below
|
||||
useBorder = directionParam+5
|
||||
|
||||
useBorder = directionParam + 5
|
||||
|
||||
# Note that the old resynthesizer required an inverted selection !!
|
||||
|
||||
|
||||
if debug:
|
||||
try:
|
||||
gimp.Display(tempImage)
|
||||
gimp.Display(tempImage)
|
||||
gimp.displays_flush()
|
||||
except RuntimeError: # thrown if non-interactive
|
||||
pass
|
||||
|
||||
from time import sleep
|
||||
sleep(2)
|
||||
|
||||
|
||||
# Not necessary to restore image to initial condition of selection, activity,
|
||||
# the original image should not have been changed,
|
||||
# and the resynthesizer should only heal, not change selection.
|
||||
|
||||
# Note that the API hasn't changed but use_border param now has more values.
|
||||
pdb.plug_in_resynthesizer(timg, tdrawable, 0,0, useBorder, work_drawable.ID, -1, -1, 0.0, 0.117, 16, 500)
|
||||
|
||||
|
||||
# Clean up (comment out to debug)
|
||||
gimp.delete(tempImage)
|
||||
pdb.gimp_image_undo_group_end(timg)
|
||||
@@ -157,7 +163,7 @@ register(
|
||||
N_("Heal the selection from surroundings as if using the heal tool."),
|
||||
"Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker",
|
||||
"2009 Lloyd Konneker", # Copyright
|
||||
"2009 Lloyd Konneker", # Copyright
|
||||
"2009",
|
||||
N_("_Heal selection..."),
|
||||
"RGB*, GRAY*",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''
|
||||
"""
|
||||
Gimp plugin "Heal transparency"
|
||||
|
||||
Copyright 2010 lloyd konneker (bootch at nc.rr.com)
|
||||
@@ -22,71 +22,80 @@ License:
|
||||
|
||||
The GNU Public License is available at
|
||||
http://www.gnu.org/copyleft/gpl.html
|
||||
|
||||
'''
|
||||
|
||||
"""
|
||||
|
||||
from gimpfu import *
|
||||
|
||||
gettext.install("resynthesizer", gimp.locale_directory, unicode=True)
|
||||
|
||||
def heal_transparency(timg, tdrawable, samplingRadiusParam=50, orderParam=2):
|
||||
|
||||
# precondition should be enforced by Gimp according to image modes allowed.
|
||||
if not pdb.gimp_drawable_has_alpha(tdrawable):
|
||||
pdb.gimp_message("The active layer has no alpha channel to heal.")
|
||||
return
|
||||
|
||||
pdb.gimp_image_undo_group_start(timg)
|
||||
|
||||
# save selection for later restoration.
|
||||
# Saving selection channel makes it active, so we must save and restore the active layer
|
||||
org_selection = pdb.gimp_selection_save(timg)
|
||||
pdb.gimp_image_set_active_layer(timg, tdrawable)
|
||||
|
||||
# alpha to selection
|
||||
pdb.gimp_image_select_item(timg, CHANNEL_OP_REPLACE, tdrawable)
|
||||
# Want the transparent, not the opaque.
|
||||
pdb.gimp_selection_invert(timg)
|
||||
# Since transparency was probably anti-aliased (dithered with partial transpancy),
|
||||
# grow the selection to get past the dithering.
|
||||
pdb.gimp_selection_grow(timg, 1)
|
||||
# Remove the alpha from this layer. IE compose with current background color (often white.)
|
||||
# Resynthesizer won't heal transparent.
|
||||
pdb.gimp_layer_flatten(tdrawable)
|
||||
|
||||
# Call heal selection (not the resynthesizer), which will create a proper corpus.
|
||||
# 0 = sample from all around
|
||||
pdb.python_fu_heal_selection(timg, tdrawable, samplingRadiusParam, 0, orderParam, run_mode=RUN_NONINTERACTIVE)
|
||||
|
||||
# Restore image to initial conditions of user, except for later cleanup.
|
||||
|
||||
# restore selection
|
||||
pdb.gimp_image_select_item(timg, CHANNEL_OP_REPLACE, org_selection)
|
||||
|
||||
# Clean up (comment out to debug)
|
||||
pdb.gimp_image_undo_group_end(timg)
|
||||
def heal_transparency(timg, tdrawable, samplingRadiusParam=50, orderParam=2):
|
||||
# precondition should be enforced by Gimp according to image modes allowed.
|
||||
if not pdb.gimp_drawable_has_alpha(tdrawable):
|
||||
pdb.gimp_message("The active layer has no alpha channel to heal.")
|
||||
return
|
||||
|
||||
pdb.gimp_image_undo_group_start(timg)
|
||||
|
||||
# save selection for later restoration.
|
||||
# Saving selection channel makes it active, so we must save and restore the active layer
|
||||
org_selection = pdb.gimp_selection_save(timg)
|
||||
pdb.gimp_image_set_active_layer(timg, tdrawable)
|
||||
|
||||
# alpha to selection
|
||||
pdb.gimp_selection_layer_alpha(tdrawable)
|
||||
# Want the transparent, not the opaque.
|
||||
pdb.gimp_selection_invert(timg)
|
||||
# Since transparency was probably anti-aliased (dithered with partial transpancy),
|
||||
# grow the selection to get past the dithering.
|
||||
pdb.gimp_selection_grow(timg, 1)
|
||||
# Remove the alpha from this layer. IE compose with current background color (often white.)
|
||||
# Resynthesizer won't heal transparent.
|
||||
pdb.gimp_layer_flatten(tdrawable)
|
||||
|
||||
# Call heal selection (not the resynthesizer), which will create a proper corpus.
|
||||
# 0 = sample from all around
|
||||
pdb.python_fu_heal_selection(
|
||||
timg, tdrawable, samplingRadiusParam, 0, orderParam, run_mode=RUN_NONINTERACTIVE
|
||||
)
|
||||
|
||||
# Restore image to initial conditions of user, except for later cleanup.
|
||||
|
||||
# restore selection
|
||||
pdb.gimp_selection_load(org_selection)
|
||||
|
||||
# Clean up (comment out to debug)
|
||||
pdb.gimp_image_undo_group_end(timg)
|
||||
|
||||
|
||||
register(
|
||||
"python_fu_heal_transparency",
|
||||
N_("Removes alpha channel by synthesis. Fill outward for edges, inward for holes."),
|
||||
"Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker",
|
||||
"Copyright 2010 Lloyd Konneker",
|
||||
"2010",
|
||||
N_("Heal transparency..."),
|
||||
"RGBA, GRAYA", # !!! Requires an alpha channel to heal
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_INT, "samplingRadiusParam", _("Context sampling width (pixels):"), 50),
|
||||
(PF_OPTION, "orderParam", _("Filling order:"), 2, [_("Random"),
|
||||
_("Inwards towards center"), _("Outwards from center") ])
|
||||
],
|
||||
[],
|
||||
heal_transparency,
|
||||
menu="<Image>/Filters/Enhance",
|
||||
domain=("resynthesizer", gimp.locale_directory)
|
||||
)
|
||||
"python_fu_heal_transparency",
|
||||
N_(
|
||||
"Removes alpha channel by synthesis. Fill outward for edges, inward for holes."
|
||||
),
|
||||
"Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker",
|
||||
"Copyright 2010 Lloyd Konneker",
|
||||
"2010",
|
||||
N_("Heal transparency..."),
|
||||
"RGBA, GRAYA", # !!! Requires an alpha channel to heal
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_INT, "samplingRadiusParam", _("Context sampling width (pixels):"), 50),
|
||||
(
|
||||
PF_OPTION,
|
||||
"orderParam",
|
||||
_("Filling order:"),
|
||||
2,
|
||||
[_("Random"), _("Inwards towards center"), _("Outwards from center")],
|
||||
),
|
||||
],
|
||||
[],
|
||||
heal_transparency,
|
||||
menu="<Image>/Filters/Enhance",
|
||||
domain=("resynthesizer", gimp.locale_directory),
|
||||
)
|
||||
|
||||
main()
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''
|
||||
"""
|
||||
Gimp plugin.
|
||||
Transfer style (color and surface texture) from a source image to the active, target image.
|
||||
|
||||
Requires resynthesizer plug-in.
|
||||
|
||||
Author:
|
||||
Authors:
|
||||
lloyd konneker, lkk
|
||||
Gabriel Almir, avlye
|
||||
|
||||
Version:
|
||||
1.0 lkk 7/15/2010 Initial version. Released to Gimp Registry.
|
||||
1.1 lkk 8/1/2010 Unreleased
|
||||
1.2 lkk 8/10/2010
|
||||
1.2 lkk 8/10/2010
|
||||
1.3 avlye 01/10/2021
|
||||
|
||||
Change log:
|
||||
_________________
|
||||
1.1
|
||||
Bug: Fixed test of mode variable, since it is a string, needs explicit test for == 1
|
||||
Bug: Added remove Selection Mask copy channel in make_grayscale_map
|
||||
1.1
|
||||
Bug: Fixed test of mode variable, since it is a string, needs explicit test for == 1
|
||||
Bug: Added remove Selection Mask copy channel in make_grayscale_map
|
||||
1.2
|
||||
Changes for new resynthesizer: no need to synchronize, remove alphas
|
||||
Fixed improper adjustment of contrast of source: only adjust source map.
|
||||
Changes for new resynthesizer: no need to synchronize, remove alphas
|
||||
Fixed improper adjustment of contrast of source: only adjust source map.
|
||||
1.3
|
||||
Minor changes to improve developer experience
|
||||
|
||||
TODO
|
||||
a quality setting that changes the parameters to resynth
|
||||
@@ -93,7 +97,7 @@ _________________
|
||||
IN: The active image and layer.
|
||||
The selection in the active image.
|
||||
The selection in any layers chosen for source.
|
||||
OUT: The active image, altered. The source is unaltered.
|
||||
OUT: The active image, altered. The source is unaltered.
|
||||
Target mode can be altered, but with the implied consent of the user.
|
||||
|
||||
The print stmts go to the console, info to advanced users and debuggers.
|
||||
@@ -105,293 +109,316 @@ synchronization of modes
|
||||
abstracting the settings
|
||||
contrast adjustment
|
||||
|
||||
'''
|
||||
"""
|
||||
|
||||
from gimpfu import *
|
||||
from math import acos
|
||||
from math import acos, pi
|
||||
|
||||
gettext.install("resynthesizer", gimp.locale_directory, unicode=True)
|
||||
|
||||
# True if you want to display and retain working, temporary images
|
||||
debug = False
|
||||
|
||||
def display_debug_image(image) :
|
||||
if debug :
|
||||
try:
|
||||
pdb.gimp_display_new(image)
|
||||
pdb.gimp_displays_flush()
|
||||
except RuntimeError:
|
||||
pass # if run-mode not interactive, Gimp throws
|
||||
|
||||
def display_debug_image(image):
|
||||
if debug:
|
||||
try:
|
||||
pdb.gimp_display_new(image)
|
||||
pdb.gimp_displays_flush()
|
||||
except RuntimeError:
|
||||
pass # if run-mode not interactive, Gimp throws
|
||||
|
||||
|
||||
def make_grayscale_map(image, drawable):
|
||||
'''
|
||||
Make a grayscale copy for a map.
|
||||
|
||||
Maps must be same size as their parent image.
|
||||
|
||||
If image is already grayscale, return it without copying.
|
||||
|
||||
Maps don't need a selection, since the resynthesizer looks at parent drawables for the selection.
|
||||
'''
|
||||
if pdb.gimp_image_base_type(image) == GRAY :
|
||||
return image, drawable
|
||||
|
||||
# Save selection, copy entire image, and restore
|
||||
original_selection = pdb.gimp_selection_save(image)
|
||||
pdb.gimp_selection_all(image) # copy requires selection
|
||||
pdb.gimp_edit_copy(drawable)
|
||||
if original_selection:
|
||||
pdb.gimp_image_select_item(image, CHANNEL_OP_REPLACE, original_selection) # restore selection in image
|
||||
pdb.gimp_image_remove_channel(image, original_selection) # cleanup the copied selection mask
|
||||
# !!! Note remove_channel not drawable_delete
|
||||
|
||||
# Make a copy, greyscale
|
||||
temp_image = pdb.gimp_edit_paste_as_new()
|
||||
pdb.gimp_image_convert_grayscale(temp_image)
|
||||
display_debug_image(temp_image)
|
||||
temp_drawable = pdb.gimp_image_get_active_drawable(temp_image)
|
||||
return temp_image, temp_drawable
|
||||
"""
|
||||
Make a grayscale copy for a map.
|
||||
|
||||
Maps must be same size as their parent image.
|
||||
|
||||
If image is already grayscale, return it without copying.
|
||||
|
||||
Maps don't need a selection, since the resynthesizer looks at parent drawables for the selection.
|
||||
"""
|
||||
if pdb.gimp_image_base_type(image) == GRAY:
|
||||
return image, drawable
|
||||
|
||||
# Save selection, copy entire image, and restore
|
||||
original_selection = pdb.gimp_selection_save(image)
|
||||
pdb.gimp_selection_all(image) # copy requires selection
|
||||
pdb.gimp_edit_copy(drawable)
|
||||
|
||||
if original_selection:
|
||||
pdb.gimp_selection_load(original_selection) # restore selection in image
|
||||
pdb.gimp_image_remove_channel(
|
||||
image, original_selection
|
||||
) # cleanup the copied selection mask
|
||||
# !!! Note remove_channel not drawable_delete
|
||||
|
||||
# Make a copy, greyscale
|
||||
temp_image = pdb.gimp_edit_paste_as_new()
|
||||
pdb.gimp_image_convert_grayscale(temp_image)
|
||||
display_debug_image(temp_image)
|
||||
temp_drawable = pdb.gimp_image_get_active_drawable(temp_image)
|
||||
return temp_image, temp_drawable
|
||||
|
||||
|
||||
def synchronize_modes(target_image, source_image) :
|
||||
'''
|
||||
User-friendliness:
|
||||
If mode of target is not equal to mode of source source, change modes.
|
||||
Resynthesizer requires target and source to be same mode.
|
||||
Assert target is RGB or GRAY (since is precondition of plugin.)
|
||||
UI decision: make this quiet, presume user intends mode change.
|
||||
But don't permanently change mode of source.
|
||||
Always upgrade GRAY to RGB, not downgrade RGB to GRAY.
|
||||
'''
|
||||
target_mode = pdb.gimp_image_base_type(target_image)
|
||||
source_mode = pdb.gimp_image_base_type(source_image)
|
||||
if target_mode != source_mode :
|
||||
# print("Map style: converted mode\n.")
|
||||
if target_mode == GRAY:
|
||||
pdb.gimp_image_convert_rgb(target_image)
|
||||
else : # target is RGB and source is GRAY
|
||||
# Assert only convert a copy of source,
|
||||
# user NEVER intends original source be altered.
|
||||
pdb.gimp_image_convert_rgb(source_image)
|
||||
|
||||
'''
|
||||
Not used
|
||||
'''
|
||||
"""
|
||||
def synchronize_alphas(target_drawable, source_drawable) :
|
||||
'''
|
||||
User-friendliness:
|
||||
If source has alpha and target doesn't, remove or add alpha to source.
|
||||
Do this without user dialog since it is done on copies, and really, the alpha doesn't matter.
|
||||
'''
|
||||
if pdb.gimp_drawable_has_alpha(source_drawable) :
|
||||
if not pdb.gimp_drawable_has_alpha(target_drawable) :
|
||||
# Should never get here, since removed alpha from source_drawable copy earlier
|
||||
print "Adding alpha channel to target image since style source image has alpha."
|
||||
pdb.gimp_layer_add_alpha (target_drawable)
|
||||
else: # source has no alpha
|
||||
if pdb.gimp_drawable_has_alpha(target_drawable) :
|
||||
print "Map style: Adding alpha channel to style source image copy since target image has alpha."
|
||||
pdb.gimp_layer_add_alpha (source_drawable)
|
||||
"""
|
||||
|
||||
|
||||
def copy_selection_to_image(drawable) :
|
||||
'''
|
||||
If image has a selection, copy selection to new image, and prepare it for resynthesizer,
|
||||
else return a copy of the entire source image.
|
||||
This is called for the source image, where it helps performance to reduce size and flatten.
|
||||
'''
|
||||
image = pdb.gimp_drawable_get_image(drawable)
|
||||
|
||||
# copy selection or whole image
|
||||
pdb.gimp_edit_copy(drawable)
|
||||
image_copy = pdb.gimp_edit_paste_as_new()
|
||||
# Activate layer, and remove alpha channel
|
||||
pdb.gimp_image_flatten(image_copy)
|
||||
layer_copy = pdb.gimp_image_get_active_layer(image_copy)
|
||||
# In earlier version, futzed with selection to deal with transparencey
|
||||
display_debug_image(image_copy)
|
||||
return image_copy, layer_copy
|
||||
|
||||
|
||||
def synchronize_contrast( drawable, source_drawable, percent_transfer) :
|
||||
'''
|
||||
Adjust contrast of source, to match target.
|
||||
Adjustment depends inversely on percent_transfer.
|
||||
Very crude histogram matching.
|
||||
'''
|
||||
# histogram upper half: typical mean is 191 (3/4*255). Skew of mean towards 255 means high contrast.
|
||||
mean, deviation, median, pixels, count, percentile = pdb.gimp_histogram(drawable, HISTOGRAM_VALUE, 128, 255)
|
||||
source_mean, source_deviation, source_median, pixels, count, percentile = pdb.gimp_histogram(
|
||||
source_drawable, HISTOGRAM_VALUE, 128, 255)
|
||||
# if mean > source_mean: # target has more contrast than source
|
||||
# Adjust contrast of source.
|
||||
# Inversely proportional to percent transfer.
|
||||
# 2.5 is from experimentation with gimp_brightness_contrast which seems linear in its effect.
|
||||
contrast_control = (mean - source_mean) * 2.5 * (1 - (percent_transfer / 100))
|
||||
# clamp to valid range (above formula is lazy, ad hoc)
|
||||
if contrast_control < -127: contrast_control = -127
|
||||
if contrast_control > 127: contrast_control = 127
|
||||
pdb.gimp_brightness_contrast(source_drawable, 0, contrast_control)
|
||||
# For experimentation, print new values
|
||||
source_mean, source_deviation, source_median, pixels, count, percentile = pdb.gimp_histogram(
|
||||
source_drawable, HISTOGRAM_VALUE, 128, 255)
|
||||
# print "Map style: Source contrast changed by ", contrast_control
|
||||
# print "Map style: Target and source upper half histogram means", mean, source_mean
|
||||
def synchronize_modes(target_image, source_image):
|
||||
"""
|
||||
User-friendliness:
|
||||
If mode of target is not equal to mode of source source, change modes.
|
||||
Resynthesizer requires target and source to be same mode.
|
||||
Assert target is RGB or GRAY (since is precondition of plugin.)
|
||||
UI decision: make this quiet, presume user intends mode change.
|
||||
But don't permanently change mode of source.
|
||||
Always upgrade GRAY to RGB, not downgrade RGB to GRAY.
|
||||
"""
|
||||
target_mode = pdb.gimp_image_base_type(target_image)
|
||||
source_mode = pdb.gimp_image_base_type(source_image)
|
||||
if target_mode != source_mode:
|
||||
# print("Map style: converted mode\n.")
|
||||
if target_mode == GRAY:
|
||||
pdb.gimp_image_convert_rgb(target_image)
|
||||
else: # target is RGB and source is GRAY
|
||||
# Assert only convert a copy of source,
|
||||
# user NEVER intends original source be altered.
|
||||
pdb.gimp_image_convert_rgb(source_image)
|
||||
|
||||
|
||||
def calculate_map_weight(percent_transfer) :
|
||||
'''
|
||||
This is a GUI design discussion.
|
||||
Transform percent_transfer to map_weight parameter to resynthesizer.
|
||||
For resynthesizer:
|
||||
map weight 0 means copy source to target, meaning ALL style.
|
||||
map weight 0.5 means just a grainy transfer of style (as little as is possible.)
|
||||
Transform from a linear percent GUI, because user more comfortable than with a ratio [.5, 0]
|
||||
which is backwards to the usual *less on the left*.
|
||||
By experiment, a sinusoid gives good results for linearizing the non-linear map_weight control.
|
||||
'''
|
||||
return acos((percent_transfer/100)*2 -1)/(2*3.14)
|
||||
|
||||
def copy_selection_to_image(drawable):
|
||||
"""
|
||||
If image has a selection, copy selection to new image, and prepare it for resynthesizer,
|
||||
else return a copy of the entire source image.
|
||||
This is called for the source image, where it helps performance to reduce size and flatten.
|
||||
"""
|
||||
image = pdb.gimp_drawable_get_image(drawable)
|
||||
|
||||
def transfer_style(image, drawable, source_drawable, percent_transfer, map_mode ):
|
||||
'''
|
||||
Main body of plugin to transfer style from one image to another.
|
||||
|
||||
!!! Note map_mode is type string, "if map_mode:" will not work.
|
||||
'''
|
||||
|
||||
pdb.gimp_image_undo_group_start(image)
|
||||
|
||||
# Get image of source drawable
|
||||
source_image = pdb.gimp_drawable_get_image(source_drawable)
|
||||
|
||||
'''
|
||||
# copy selection or whole image
|
||||
pdb.gimp_edit_copy(drawable)
|
||||
image_copy = pdb.gimp_edit_paste_as_new()
|
||||
# Activate layer, and remove alpha channel
|
||||
pdb.gimp_image_flatten(image_copy)
|
||||
layer_copy = pdb.gimp_image_get_active_layer(image_copy)
|
||||
# In earlier version, futzed with selection to deal with transparencey
|
||||
display_debug_image(image_copy)
|
||||
|
||||
return image_copy, layer_copy
|
||||
|
||||
|
||||
def synchronize_contrast(drawable, source_drawable, percent_transfer):
|
||||
"""
|
||||
Adjust contrast of source, to match target.
|
||||
Adjustment depends inversely on percent_transfer.
|
||||
Very crude histogram matching.
|
||||
"""
|
||||
# histogram upper half: typical mean is 191 (3/4*255). Skew of mean towards 255 means high contrast.
|
||||
mean, deviation, median, pixels, count, percentile = pdb.gimp_histogram(
|
||||
drawable, HISTOGRAM_VALUE, 128, 255
|
||||
)
|
||||
(
|
||||
source_mean,
|
||||
source_deviation,
|
||||
source_median,
|
||||
pixels,
|
||||
count,
|
||||
percentile,
|
||||
) = pdb.gimp_histogram(source_drawable, HISTOGRAM_VALUE, 128, 255)
|
||||
|
||||
# if mean > source_mean: # target has more contrast than source
|
||||
# Adjust contrast of source.
|
||||
# Inversely proportional to percent transfer.
|
||||
# 2.5 is from experimentation with gimp_brightness_contrast which seems linear in its effect.
|
||||
contrast_control = (mean - source_mean) * 2.5 * (1 - (percent_transfer / 100))
|
||||
|
||||
# clamp to valid range
|
||||
contrast_control = max(min(contrast_control, 127), -127)
|
||||
|
||||
pdb.gimp_brightness_contrast(source_drawable, 0, contrast_control)
|
||||
|
||||
# For experimentation, print new values
|
||||
(
|
||||
source_mean,
|
||||
source_deviation,
|
||||
source_median,
|
||||
pixels,
|
||||
count,
|
||||
percentile,
|
||||
) = pdb.gimp_histogram(source_drawable, HISTOGRAM_VALUE, 128, 255)
|
||||
|
||||
# print "Map style: Source contrast changed by ", contrast_control
|
||||
# print "Map style: Target and source upper half histogram means", mean, source_mean
|
||||
|
||||
|
||||
def calculate_map_weight(percent_transfer):
|
||||
"""
|
||||
This is a GUI design discussion.
|
||||
Transform percent_transfer to map_weight parameter to resynthesizer.
|
||||
For resynthesizer:
|
||||
map weight 0 means copy source to target, meaning ALL style.
|
||||
map weight 0.5 means just a grainy transfer of style (as little as is possible.)
|
||||
Transform from a linear percent GUI, because user more comfortable than with a ratio [.5, 0]
|
||||
which is backwards to the usual *less on the left*.
|
||||
By experiment, a sinusoid gives good results for linearizing the non-linear map_weight control.
|
||||
"""
|
||||
return acos((percent_transfer / 100) * 2 - 1) / (2 * pi)
|
||||
|
||||
|
||||
def transfer_style(image, drawable, source_drawable, percent_transfer, map_mode):
|
||||
"""
|
||||
Main body of plugin to transfer style from one image to another.
|
||||
|
||||
!!! Note map_mode is type string, "if map_mode:" will not work.
|
||||
"""
|
||||
|
||||
pdb.gimp_image_undo_group_start(image)
|
||||
|
||||
# Get image of source drawable
|
||||
source_image = pdb.gimp_drawable_get_image(source_drawable)
|
||||
|
||||
"""
|
||||
User-friendliness.
|
||||
Note the drawable chooser widget in Pygimp does not allow us to prefilter INDEXED mode.
|
||||
So check here and give a warning.
|
||||
'''
|
||||
# These are the originals base types, and this plugin might change the base types
|
||||
original_source_base_type = pdb.gimp_image_base_type(source_image)
|
||||
original_target_base_type = pdb.gimp_image_base_type(image)
|
||||
|
||||
if original_source_base_type == INDEXED :
|
||||
pdb.gimp_message(_("The style source cannot be of mode INDEXED"));
|
||||
return
|
||||
"""
|
||||
# These are the originals base types, and this plugin might change the base types
|
||||
original_source_base_type = pdb.gimp_image_base_type(source_image)
|
||||
original_target_base_type = pdb.gimp_image_base_type(image)
|
||||
|
||||
if image == source_image and drawable == source_drawable:
|
||||
is_source_copy = False
|
||||
'''
|
||||
If source is same as target,
|
||||
if original_source_base_type == INDEXED:
|
||||
pdb.gimp_message(_("The style source cannot be of mode INDEXED"))
|
||||
return
|
||||
|
||||
if image == source_image and drawable == source_drawable:
|
||||
is_source_copy = False
|
||||
"""
|
||||
If source is same as target,
|
||||
then the old resynthesizer required a selection (engine used inverse selection for corpus).
|
||||
New resynthesizer doesn't need a selection.
|
||||
If source same as target, effect is similar to a blur.
|
||||
'''
|
||||
# assert modes and alphas are same (since they are same layer!)
|
||||
else: # target layer is not the source layer (source could be a copy of target, but effect is none)
|
||||
# Copy source always, for performance, and for possible mode change.
|
||||
is_source_copy = True
|
||||
source_image, source_drawable = copy_selection_to_image(source_drawable)
|
||||
|
||||
# Futz with modes if necessary.
|
||||
synchronize_modes(image, source_image)
|
||||
|
||||
'''
|
||||
Old resythesizer required both images to have alpha, or neither.
|
||||
synchronize_alphas( drawable, source_drawable)
|
||||
'''
|
||||
"""
|
||||
# assert modes and alphas are same (since they are same layer!)
|
||||
else: # target layer is not the source layer (source could be a copy of target, but effect is none)
|
||||
# Copy source always, for performance, and for possible mode change.
|
||||
is_source_copy = True
|
||||
source_image, source_drawable = copy_selection_to_image(source_drawable)
|
||||
|
||||
'''
|
||||
# Futz with modes if necessary.
|
||||
synchronize_modes(image, source_image)
|
||||
|
||||
"""
|
||||
Old resythesizer required both images to have alpha, or neither.
|
||||
synchronize_alphas( drawable, source_drawable)
|
||||
"""
|
||||
|
||||
"""
|
||||
TODO For performance, if there is a selection in target, it would be better to copy
|
||||
selection to a new layer, and later merge it back (since resynthesizer engine reads
|
||||
entire target into memory. Low priority since rarely does user make a selection in target.
|
||||
'''
|
||||
|
||||
'''
|
||||
!!! Note this plugin always sends maps to the resynthesizer,
|
||||
"""
|
||||
|
||||
"""
|
||||
!!! Note this plugin always sends maps to the resynthesizer,
|
||||
and the "percent transfer" setting is always effective.
|
||||
However, maps may not be separate,copied images unless converted to grayscale.
|
||||
'''
|
||||
|
||||
# Copy and reduce maps to grayscale: at the option of the user
|
||||
# !!! Or if the target was GRAY and source is RGB, in which case maps give a better result.
|
||||
# Note that if the target was GRAY, we already upgraded it to RGB.
|
||||
if map_mode == 1 or (original_source_base_type == RGB and original_target_base_type == GRAY) :
|
||||
# print "Map style: source mode: ", original_source_base_type, " target mode: ", original_target_base_type
|
||||
# print "Map style: Converting maps to grayscale"
|
||||
# Convert mode, but in new temp image and drawable
|
||||
target_map_image, target_map_drawable = make_grayscale_map(image, drawable)
|
||||
source_map_image, source_map_drawable = make_grayscale_map(source_image, source_drawable)
|
||||
|
||||
target_map = target_map_drawable
|
||||
source_map = source_map_drawable
|
||||
# later, delete temp images
|
||||
|
||||
# User control: adjust contrast of source_map as a function of percent transfer
|
||||
# Hard to explain why, but experimentation shows result more like user expectation.
|
||||
# TODO This could be improved.
|
||||
# !!! Don't change the original source, only a temporary map we created
|
||||
synchronize_contrast( drawable, source_map, percent_transfer)
|
||||
else :
|
||||
# !!! Maps ARE the target and source, not copies
|
||||
source_map = source_drawable
|
||||
target_map = drawable
|
||||
"""
|
||||
|
||||
|
||||
'''
|
||||
# Copy and reduce maps to grayscale: at the option of the user
|
||||
# !!! Or if the target was GRAY and source is RGB, in which case maps give a better result.
|
||||
# Note that if the target was GRAY, we already upgraded it to RGB.
|
||||
if map_mode == 1 or (
|
||||
original_source_base_type == RGB and original_target_base_type == GRAY
|
||||
):
|
||||
# print "Map style: source mode: ", original_source_base_type, " target mode: ", original_target_base_type
|
||||
# print "Map style: Converting maps to grayscale"
|
||||
# Convert mode, but in new temp image and drawable
|
||||
target_map_image, target_map_drawable = make_grayscale_map(image, drawable)
|
||||
source_map_image, source_map_drawable = make_grayscale_map(
|
||||
source_image, source_drawable
|
||||
)
|
||||
|
||||
target_map = target_map_drawable
|
||||
source_map = source_map_drawable
|
||||
# later, delete temp images
|
||||
|
||||
# User control: adjust contrast of source_map as a function of percent transfer
|
||||
# Hard to explain why, but experimentation shows result more like user expectation.
|
||||
# TODO This could be improved.
|
||||
# !!! Don't change the original source, only a temporary map we created
|
||||
synchronize_contrast(drawable, source_map, percent_transfer)
|
||||
else:
|
||||
# !!! Maps ARE the target and source, not copies
|
||||
source_map = source_drawable
|
||||
target_map = drawable
|
||||
|
||||
"""
|
||||
Parameters to resynthesizer:
|
||||
|
||||
|
||||
htile and vtile = 1 since it reduces artifacts around edge
|
||||
|
||||
|
||||
map_weight I linearize since easier on users than an exponential
|
||||
|
||||
|
||||
use_border = 1 since there might be a selection and context (outside target).
|
||||
|
||||
|
||||
9 neighbors (a 3x3 patch) and 200 tries for speed
|
||||
|
||||
'''
|
||||
|
||||
map_weight = calculate_map_weight(percent_transfer)
|
||||
|
||||
# !!! This is for version of resynthesizer, with an uninverted selection
|
||||
pdb.plug_in_resynthesizer(image, drawable, 1, 1, 1, source_drawable.ID, source_map.ID, target_map.ID, map_weight, 0.117, 9, 200)
|
||||
|
||||
# Clean up.
|
||||
# Delete working images: separate map images and copy of source image
|
||||
if not debug:
|
||||
if map_mode == 1: # if made working map images
|
||||
pdb.gimp_image_delete(target_map_image)
|
||||
pdb.gimp_image_delete(source_map_image)
|
||||
if is_source_copy: # if created a copy earlier
|
||||
pdb.gimp_image_delete(source_image)
|
||||
|
||||
pdb.gimp_image_undo_group_end(image)
|
||||
pdb.gimp_displays_flush()
|
||||
|
||||
|
||||
"""
|
||||
|
||||
map_weight = calculate_map_weight(percent_transfer)
|
||||
|
||||
# !!! This is for version of resynthesizer, with an uninverted selection
|
||||
pdb.plug_in_resynthesizer(
|
||||
image,
|
||||
drawable,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
source_drawable.ID,
|
||||
source_map.ID,
|
||||
target_map.ID,
|
||||
map_weight,
|
||||
0.117,
|
||||
9,
|
||||
200,
|
||||
)
|
||||
|
||||
# Clean up.
|
||||
# Delete working images: separate map images and copy of source image
|
||||
if not debug:
|
||||
if map_mode == 1: # if made working map images
|
||||
pdb.gimp_image_delete(target_map_image)
|
||||
pdb.gimp_image_delete(source_map_image)
|
||||
if is_source_copy: # if created a copy earlier
|
||||
pdb.gimp_image_delete(source_image)
|
||||
|
||||
pdb.gimp_image_undo_group_end(image)
|
||||
pdb.gimp_displays_flush()
|
||||
|
||||
|
||||
register(
|
||||
"python_fu_map_style",
|
||||
N_("Transfer style (color and surface) from a chosen source to the active layer. "),
|
||||
"Transforms image using art media and style from another image. Maps or synthesizes texture or theme from one image onto another. Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker (bootch nc.rr.com)",
|
||||
"Copyright 2010 Lloyd Konneker",
|
||||
"2010",
|
||||
N_("Style..."),
|
||||
"RGB*, GRAY*",
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_DRAWABLE, "source_drawable", _("Source of style:"), None),
|
||||
(PF_SLIDER, "percent_transfer", _("Percent transfer:"), 0, (10, 90, 10.0)),
|
||||
(PF_RADIO, "map_mode", _("Map by:"), 0, ((_("Color and brightness"), 0),(_("Brightness only"),1)))
|
||||
],
|
||||
[],
|
||||
transfer_style,
|
||||
menu="<Image>/Filters/Map",
|
||||
domain=("resynthesizer", gimp.locale_directory)
|
||||
)
|
||||
"python_fu_map_style",
|
||||
N_("Transfer style (color and surface) from a chosen source to the active layer. "),
|
||||
"Transforms image using art media and style from another image. Maps or synthesizes texture or theme from one image onto another. Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker (bootch nc.rr.com)",
|
||||
"Copyright 2010 Lloyd Konneker",
|
||||
"2010",
|
||||
N_("Style..."),
|
||||
"RGB*, GRAY*",
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_DRAWABLE, "source_drawable", _("Source of style:"), None),
|
||||
(PF_SLIDER, "percent_transfer", _("Percent transfer:"), 0, (10, 90, 10.0)),
|
||||
(
|
||||
PF_RADIO,
|
||||
"map_mode",
|
||||
_("Map by:"),
|
||||
0,
|
||||
((_("Color and brightness"), 0), (_("Brightness only"), 1)),
|
||||
),
|
||||
],
|
||||
[],
|
||||
transfer_style,
|
||||
menu="<Image>/Filters/Map",
|
||||
domain=("resynthesizer", gimp.locale_directory),
|
||||
)
|
||||
|
||||
main()
|
||||
|
||||
|
||||
@@ -11,12 +11,14 @@ Sometimes called rendering a texture.
|
||||
|
||||
Requires resynthesizer plug-in.
|
||||
|
||||
Author:
|
||||
Authors:
|
||||
lloyd konneker, lkk, bootch at nc.rr.com
|
||||
Gabriel Almir, avlye, avlye.me
|
||||
|
||||
Version:
|
||||
1.0 lkk 7/15/2010 Initial version
|
||||
1.1 lkk 4/10/2011 Fixed a bug with layer types impacting greyscale images.
|
||||
1.3 avlye 01/10/2020 Minor changes for improving developer experience
|
||||
|
||||
License:
|
||||
|
||||
@@ -48,9 +50,9 @@ The continuum of randomness versus speed:
|
||||
- Filte.Render.Texture an entire image is slower but seamless and moderately irregular.
|
||||
- Edit.Fill with resynthesized pattern is slowest but seamless and highly irregular, unpatterned.
|
||||
|
||||
This filter is not tiling (instead resynthesizing) but makes
|
||||
This filter is not tiling (instead resynthesizing) but makes
|
||||
an image that you can then use to tile with especially if
|
||||
you choose the option to make the edges suitable for tiling.
|
||||
you choose the option to make the edges suitable for tiling.
|
||||
|
||||
IN: The selection (or the entire active drawable) is the source of texture and is not changed.
|
||||
OUT New image, possibly resized canvas, same scale and resolution.
|
||||
@@ -64,11 +66,12 @@ gettext.install("resynthesizer", gimp.locale_directory, unicode=True)
|
||||
|
||||
debug = False
|
||||
|
||||
|
||||
|
||||
def new_resized_image(image, resize_ratio):
|
||||
# Create new image resized by a ratio from *selection* in the old image
|
||||
|
||||
|
||||
(is_selection, ulx, uly, lrx, lry) = pdb.gimp_selection_bounds(image)
|
||||
|
||||
if not is_selection :
|
||||
# Resynthesizer will use the entire source image as corpus.
|
||||
# Resize new image in proportion to entire source image.
|
||||
@@ -79,99 +82,98 @@ def new_resized_image(image, resize_ratio):
|
||||
# Resize new image in proportion to selection in source
|
||||
new_width = int((lrx - ulx) * resize_ratio)
|
||||
new_height = int((lry - uly) * resize_ratio)
|
||||
|
||||
|
||||
new_basetype = pdb.gimp_image_base_type(image) # same as source
|
||||
new_layertype = pdb.gimp_drawable_type(pdb.gimp_image_get_active_layer(image))
|
||||
new_image = pdb.gimp_image_new(new_width, new_height, new_basetype)
|
||||
|
||||
# !!! Note that gimp_layer_new wants a layer type, not an image basetype
|
||||
new_drawable = pdb.gimp_layer_new(new_image, new_width, new_height,
|
||||
new_layertype, "Texture", 100, NORMAL_MODE)
|
||||
pdb.gimp_image_add_layer(new_image, new_drawable, 0)
|
||||
|
||||
return new_image, new_drawable
|
||||
|
||||
|
||||
|
||||
def display_image(image):
|
||||
try:
|
||||
gimp.Display(image)
|
||||
except gimp.error:
|
||||
pass # If runmode is NONINTERACTIVE, expect gimp_display_new() to fail
|
||||
|
||||
gimp.displays_flush()
|
||||
|
||||
|
||||
|
||||
def render_texture(image, drawable, resize_ratio=2, make_tile=0):
|
||||
'''
|
||||
Create a randomized texture image from the selection.
|
||||
The image can be suited for further, seamless tiling.
|
||||
Create a randomized texture image from the selection.
|
||||
The image can be suited for further, seamless tiling.
|
||||
The image is same scale and resolution but resized from the selection.
|
||||
Not undoable, no changes to the source (you can just delete the new image.)
|
||||
|
||||
|
||||
A selection in the source image is optional.
|
||||
If there is no selection, the resynthesizer will use the entire source image.
|
||||
'''
|
||||
|
||||
|
||||
# Its all or nothing, user must delete new image if not happy.
|
||||
pdb.gimp_image_undo_disable(image)
|
||||
|
||||
|
||||
'''
|
||||
Create new image, optionally resized, and display for it.
|
||||
'''
|
||||
new_image, new_drawable = new_resized_image(image, resize_ratio)
|
||||
pdb.gimp_image_undo_disable(new_image)
|
||||
|
||||
if not new_drawable:
|
||||
raise RuntimeError, "Failed create layer."
|
||||
|
||||
|
||||
# If using new resynthesizer with animation for debugging
|
||||
if debug:
|
||||
display_image(new_image)
|
||||
|
||||
|
||||
'''
|
||||
copy original into temp and crop it to the selection to save memory in resynthesizer
|
||||
'''
|
||||
temp_image = pdb.gimp_image_duplicate(image)
|
||||
|
||||
if not temp_image:
|
||||
raise RuntimeError, "Failed duplicate image"
|
||||
|
||||
|
||||
# Get bounds, offset of selection
|
||||
(is_selection, ulx, uly, lrx, lry) = pdb.gimp_selection_bounds(image)
|
||||
if not is_selection :
|
||||
# No need to crop. Resynthesizer will use all if no selection.
|
||||
pass
|
||||
else :
|
||||
|
||||
if is_selection:
|
||||
pdb.gimp_image_crop(temp_image, lrx - ulx, lry - uly, ulx, uly)
|
||||
|
||||
|
||||
# Don't flatten because it turns transparency to background (white usually)
|
||||
work_layer = pdb.gimp_image_get_active_layer(temp_image)
|
||||
|
||||
if not work_layer:
|
||||
raise RuntimeError, "Failed get active layer"
|
||||
|
||||
|
||||
# Insure the selection is all (not necessary, resynthesizer will use all if no selection.)
|
||||
pdb.gimp_selection_all(temp_image)
|
||||
|
||||
|
||||
# Settings for making edges suitable for seamless tiling afterwards.
|
||||
# That is what these settings mean in the resynthesizer:
|
||||
# wrap context probes in the target so that edges of target will be suitable for seamless tiling.
|
||||
# I.E. treat the target as a sphere when matching.
|
||||
if make_tile :
|
||||
htile = 1
|
||||
vtile = 1
|
||||
else :
|
||||
htile = 0
|
||||
vtile = 0
|
||||
|
||||
tile = (1, 1) if make_tile else (0, 0)
|
||||
|
||||
# Call resynthesizer
|
||||
# use_border is moot since there is no context (outside the target) in the newImage.
|
||||
# The target is the entire new image, the source is the cropped copy of the selection.
|
||||
#
|
||||
# 9 neighbors (a 3x3 patch) and 200 tries for speed, since new image is probably large
|
||||
# and source is probably natural (fractal), where quality is not important.
|
||||
|
||||
|
||||
# For version of resynthesizer with uninverted selection
|
||||
# !!! Pass -1 for ID of no layer, not None
|
||||
pdb.plug_in_resynthesizer(new_image, new_drawable, htile, vtile, 0, work_layer.ID, -1, -1, 0.0, 0.117, 9, 200)
|
||||
|
||||
pdb.plug_in_resynthesizer(new_image, new_drawable, tile[0], tile[1], 0, work_layer.ID, -1, -1, 0.0, 0.117, 9, 200)
|
||||
|
||||
display_image(new_image)
|
||||
|
||||
# Clean up.
|
||||
|
||||
# Clean up.
|
||||
pdb.gimp_image_delete(temp_image)
|
||||
pdb.gimp_image_undo_enable(image)
|
||||
pdb.gimp_image_undo_enable(new_image)
|
||||
@@ -201,4 +203,3 @@ register(
|
||||
)
|
||||
|
||||
main()
|
||||
|
||||
|
||||
@@ -33,22 +33,22 @@ gettext.install("resynthesizer", gimp.locale_directory, unicode=True)
|
||||
def plugin_main(image, drawable, scale_factor):
|
||||
'''
|
||||
Algorithm:
|
||||
|
||||
|
||||
Scale image up.
|
||||
Resynthesize with:
|
||||
corpus = original size image
|
||||
in map = original size image but scaled up and down to blur
|
||||
out map = scaled up image
|
||||
|
||||
|
||||
This restores the detail that scaling up looses.
|
||||
It maintains the aspect ratio of all image features.
|
||||
|
||||
|
||||
Unlike the original smart-enlarge.scm, this alters the original image.
|
||||
|
||||
|
||||
original did not accept an alpha channel
|
||||
'''
|
||||
|
||||
|
||||
|
||||
temp_image1 = pdb.gimp_image_duplicate(image) # duplicate for in map
|
||||
if not temp_image1:
|
||||
raise RuntimeError, "Failed duplicate image"
|
||||
@@ -67,7 +67,7 @@ def plugin_main(image, drawable, scale_factor):
|
||||
height = pdb.gimp_drawable_height(drawable)
|
||||
pdb.gimp_image_scale(temp_image1, width/scale_factor, height/scale_factor)
|
||||
pdb.gimp_image_scale(temp_image1, width, height)
|
||||
|
||||
|
||||
# scale up the image
|
||||
pdb.gimp_image_scale(image, width * scale_factor, height*scale_factor)
|
||||
|
||||
@@ -80,7 +80,7 @@ def plugin_main(image, drawable, scale_factor):
|
||||
temp_layer2.ID, # corpus
|
||||
temp_layer1.ID, # input map
|
||||
drawable.ID, # output map is scaled up original itself
|
||||
1.0, 0.117, 8, 500)
|
||||
1.0, 0.117, 8, 500)
|
||||
|
||||
pdb.gimp_image_delete(temp_image1)
|
||||
pdb.gimp_image_delete(temp_image2)
|
||||
@@ -108,5 +108,5 @@ if __name__ == "__main__" :
|
||||
)
|
||||
|
||||
main()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''
|
||||
"""
|
||||
Gimp plugin "Fill with pattern seamless..."
|
||||
Front end to the resynthesizer plugin to make a seamless fill.
|
||||
|
||||
@@ -28,91 +28,103 @@ GNU General Public License for more details.
|
||||
The GNU Public License is available at
|
||||
http://www.gnu.org/copyleft/gpl.html
|
||||
|
||||
'''
|
||||
"""
|
||||
|
||||
from gimpfu import *
|
||||
|
||||
gettext.install("resynthesizer", gimp.locale_directory, unicode=True);
|
||||
gettext.install("resynthesizer", gimp.locale_directory, unicode=True)
|
||||
|
||||
debug = False
|
||||
|
||||
|
||||
def layer_from_pattern(image, pattern):
|
||||
'''
|
||||
Create a new image and layer having the same size as a pattern.
|
||||
'''
|
||||
new_basetype = pdb.gimp_image_base_type(image) # same as source
|
||||
new_layertype = pdb.gimp_drawable_type(pdb.gimp_image_get_active_layer(image))
|
||||
pattern_width, pattern_height, bpp = pdb.gimp_pattern_get_info(pattern)
|
||||
new_image = pdb.gimp_image_new(pattern_width, pattern_height, new_basetype)
|
||||
# !!! Note that gimp_layer_new wants a layer type, not an image basetype
|
||||
new_drawable = pdb.gimp_layer_new(new_image, pattern_width, pattern_height,
|
||||
new_layertype, "Texture", 100, NORMAL_MODE)
|
||||
pdb.gimp_image_add_layer(new_image, new_drawable, 0)
|
||||
return new_image, new_drawable
|
||||
|
||||
|
||||
"""
|
||||
Create a new image and layer having the same size as a pattern.
|
||||
"""
|
||||
new_basetype = pdb.gimp_image_base_type(image) # same as source
|
||||
new_layertype = pdb.gimp_drawable_type(pdb.gimp_image_get_active_layer(image))
|
||||
pattern_width, pattern_height, bpp = pdb.gimp_pattern_get_info(pattern)
|
||||
new_image = pdb.gimp_image_new(pattern_width, pattern_height, new_basetype)
|
||||
|
||||
# !!! Note that gimp_layer_new wants a layer type, not an image basetype
|
||||
new_drawable = pdb.gimp_layer_new(
|
||||
new_image,
|
||||
pattern_width,
|
||||
pattern_height,
|
||||
new_layertype,
|
||||
"Texture",
|
||||
100,
|
||||
NORMAL_MODE,
|
||||
)
|
||||
pdb.gimp_image_add_layer(new_image, new_drawable, 0)
|
||||
|
||||
return new_image, new_drawable
|
||||
|
||||
|
||||
def guts(image, drawable, pattern):
|
||||
''' Crux of algorithm '''
|
||||
|
||||
# Make drawble from pattern
|
||||
pattern_image, pattern_layer = layer_from_pattern(image, pattern)
|
||||
|
||||
# Fill it with pattern
|
||||
# NOT pass pattern_layer.ID !!!
|
||||
pdb.gimp_drawable_fill(pattern_layer, PATTERN_FILL)
|
||||
|
||||
if debug:
|
||||
gimp.Display(pattern_image)
|
||||
gimp.displays_flush()
|
||||
|
||||
# Resynthesize the selection from the pattern without using context
|
||||
# 0,0,0: Not use_border (context), not tile horiz, not tile vert
|
||||
# -1, -1, 0: No maps and no map weight
|
||||
# DO pass pattern_layer.ID !!!
|
||||
# Resynthesizer is an engine, never interactive
|
||||
pdb.plug_in_resynthesizer(image, drawable, 0, 0, 0, pattern_layer.ID, -1, -1, 0, 0.05, 8, 300)
|
||||
|
||||
# Clean up
|
||||
if not debug:
|
||||
# Delete image that is displayed throws RuntimeError
|
||||
pdb.gimp_image_delete(pattern_image)
|
||||
|
||||
|
||||
""" Crux of algorithm """
|
||||
|
||||
# Make drawble from pattern
|
||||
pattern_image, pattern_layer = layer_from_pattern(image, pattern)
|
||||
|
||||
# Fill it with pattern
|
||||
# NOT pass pattern_layer.ID !!!
|
||||
pdb.gimp_drawable_fill(pattern_layer, PATTERN_FILL)
|
||||
|
||||
if debug:
|
||||
gimp.Display(pattern_image)
|
||||
gimp.displays_flush()
|
||||
|
||||
# Resynthesize the selection from the pattern without using context
|
||||
# 0,0,0: Not use_border (context), not tile horiz, not tile vert
|
||||
# -1, -1, 0: No maps and no map weight
|
||||
# DO pass pattern_layer.ID !!!
|
||||
# Resynthesizer is an engine, never interactive
|
||||
pdb.plug_in_resynthesizer(
|
||||
image, drawable, 0, 0, 0, pattern_layer.ID, -1, -1, 0, 0.05, 8, 300
|
||||
)
|
||||
|
||||
# Clean up
|
||||
if not debug:
|
||||
# Delete image that is displayed throws RuntimeError
|
||||
pdb.gimp_image_delete(pattern_image)
|
||||
|
||||
|
||||
def plugin_main(image, drawable, pattern):
|
||||
'''
|
||||
Main: the usual user-friendly precondition checking, postcondition cleanup.
|
||||
pattern is a string
|
||||
'''
|
||||
# User_friendly: if no selection, use entire image.
|
||||
# But the resynthesizer does that for us.
|
||||
|
||||
# Save/restore the context since we change the pattern
|
||||
pdb.gimp_context_push()
|
||||
pdb.gimp_context_set_pattern(pattern)
|
||||
guts(image, drawable, pattern)
|
||||
pdb.gimp_context_pop()
|
||||
|
||||
gimp.displays_flush()
|
||||
"""
|
||||
Main: the usual user-friendly precondition checking, postcondition cleanup.
|
||||
pattern is a string
|
||||
"""
|
||||
# User_friendly: if no selection, use entire image.
|
||||
# But the resynthesizer does that for us.
|
||||
|
||||
# Save/restore the context since we change the pattern
|
||||
pdb.gimp_context_push()
|
||||
pdb.gimp_context_set_pattern(pattern)
|
||||
guts(image, drawable, pattern)
|
||||
pdb.gimp_context_pop()
|
||||
|
||||
gimp.displays_flush()
|
||||
|
||||
|
||||
register(
|
||||
"python_fu_fill_pattern_resynth",
|
||||
N_("Seamlessly fill with a pattern using synthesis."),
|
||||
"Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker",
|
||||
"Copyright 2011 Lloyd Konneker",
|
||||
"2011",
|
||||
N_("_Fill with pattern seamless..."),
|
||||
"RGB*, GRAY*",
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_PATTERN, "pattern", _("Pattern:"), 'Maple Leaves')
|
||||
],
|
||||
[],
|
||||
plugin_main,
|
||||
menu="<Image>/Edit",
|
||||
domain=("resynthesizer", gimp.locale_directory)
|
||||
)
|
||||
"python_fu_fill_pattern_resynth",
|
||||
N_("Seamlessly fill with a pattern using synthesis."),
|
||||
"Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker",
|
||||
"Copyright 2011 Lloyd Konneker",
|
||||
"2011",
|
||||
N_("_Fill with pattern seamless..."),
|
||||
"RGB*, GRAY*",
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_PATTERN, "pattern", _("Pattern:"), "Maple Leaves"),
|
||||
],
|
||||
[],
|
||||
plugin_main,
|
||||
menu="<Image>/Edit",
|
||||
domain=("resynthesizer", gimp.locale_directory),
|
||||
)
|
||||
|
||||
main()
|
||||
|
||||
@@ -7,6 +7,7 @@ Requires resynthesizer plug_in (v2).
|
||||
Author:
|
||||
lloyd konneker (bootch at nc.rr.com)
|
||||
Based on smart_enlarge.scm 2000 by Paul Harrison.
|
||||
Gabriel Almir, avlye
|
||||
|
||||
Version:
|
||||
1.0 lloyd konneker lkk 2010 Initial version in python.
|
||||
@@ -36,18 +37,18 @@ gettext.install("resynthesizer", gimp.locale_directory, unicode=True)
|
||||
def plugin_main(image, drawable, scale_factor):
|
||||
'''
|
||||
Algorithm:
|
||||
|
||||
|
||||
Resynthesize with:
|
||||
corpus = smaller image
|
||||
in map = smaller image but scaled up and down to blur
|
||||
out map = original image
|
||||
|
||||
|
||||
TODO undo
|
||||
|
||||
|
||||
original did not accept an alpha channel
|
||||
'''
|
||||
|
||||
|
||||
|
||||
temp_image1 = pdb.gimp_image_duplicate(image) # duplicate for in map
|
||||
if not temp_image1:
|
||||
raise RuntimeError, "Failed duplicate image"
|
||||
@@ -61,14 +62,14 @@ def plugin_main(image, drawable, scale_factor):
|
||||
if not temp_layer2:
|
||||
raise RuntimeError, "Failed get active layer"
|
||||
|
||||
|
||||
|
||||
width = pdb.gimp_drawable_width(drawable)
|
||||
height = pdb.gimp_drawable_height(drawable)
|
||||
|
||||
|
||||
|
||||
|
||||
# scale input image down, for corpus map
|
||||
pdb.gimp_image_scale(temp_image2, width/scale_factor, height/scale_factor)
|
||||
|
||||
|
||||
# scale input image way down, then back up to, to blur, for corpus
|
||||
# Final size is same size as corpus map.
|
||||
pdb.gimp_image_scale(temp_image1, width / (2 * scale_factor), height / (2 * scale_factor) )
|
||||
@@ -83,7 +84,7 @@ def plugin_main(image, drawable, scale_factor):
|
||||
temp_layer2.ID, # corpus is smaller original
|
||||
temp_layer1.ID, # input map is blurred smaller original
|
||||
drawable.ID, # output map is original itself
|
||||
1.0, 0.117, 8, 500)
|
||||
1.0, 0.117, 8, 500)
|
||||
|
||||
pdb.gimp_image_delete(temp_image1)
|
||||
pdb.gimp_image_delete(temp_image2)
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''
|
||||
"""
|
||||
Gimp plugin "Uncrop"
|
||||
|
||||
Increase image/canvas size and synthesize outer band from edge of original.
|
||||
|
||||
Author:
|
||||
lloyd konneker, lkk
|
||||
Gabriel Almir, avlye
|
||||
|
||||
Version:
|
||||
1.0 lkk 5/15/2009 Initial version in scheme, released to Gimp Registry.
|
||||
1.1 lkk 9/21/2009 Translate to python.
|
||||
1.3 avlye 01/11/2020
|
||||
|
||||
License:
|
||||
|
||||
@@ -28,134 +30,148 @@ The GNU Public License is available at
|
||||
http://www.gnu.org/copyleft/gpl.html
|
||||
|
||||
|
||||
The effect for users:
|
||||
The effect for users:
|
||||
widens the field of view, maintaining perspective of original
|
||||
Should be undoable, except for loss of selection.
|
||||
Should work on any image type, any count of layers and channels (although only active layer is affected.)
|
||||
|
||||
Programming notes:
|
||||
Scheme uses - in names, python uses _
|
||||
Programming devt. cycle:
|
||||
Programming devt. cycle:
|
||||
Initial creation: cp foo.py ~/.gimp-2.6/scripts, chmod +x, start gimp
|
||||
Refresh: just copy, no need to restart gimp if the pdb registration is unchanged
|
||||
|
||||
IN: Nothing special. The selection is immaterial but is not preserved.
|
||||
OUT larger layer and image. All other layers not enlarged.
|
||||
'''
|
||||
"""
|
||||
|
||||
from gimpfu import *
|
||||
|
||||
gettext.install("resynthesizer", gimp.locale_directory, unicode=True)
|
||||
|
||||
|
||||
|
||||
def resizeImageCentered(image, percentEnlarge):
|
||||
# resize and center image by percent (converted to pixel units)
|
||||
deltaFraction = (percentEnlarge / 100) + 1.0
|
||||
priorWidth = pdb.gimp_image_width(image)
|
||||
priorHeight = pdb.gimp_image_height(image)
|
||||
|
||||
deltaFraction = (percentEnlarge / 100) + 1.0
|
||||
deltaWidth = priorWidth * deltaFraction
|
||||
deltaHeight = priorHeight * deltaFraction
|
||||
centeredOffX = (deltaWidth - priorWidth)/ 2
|
||||
centeredOffY = (deltaHeight - priorHeight) / 2
|
||||
|
||||
centeredOffX = (deltaWidth - priorWidth) / 2
|
||||
centeredOffY = (deltaHeight - priorHeight) / 2
|
||||
|
||||
pdb.gimp_image_resize(image, deltaWidth, deltaHeight, centeredOffX, centeredOffY)
|
||||
#if not pdb.gimp_image_resize(image, deltaWidth, deltaHeight, centeredOffX, centeredOffY):
|
||||
# raise RuntimeError, "Failed resize"
|
||||
|
||||
|
||||
|
||||
def shrinkSelectionByPercent(image, percent):
|
||||
# shrink selection by percent (converted to pixel units)
|
||||
deltaFraction = percent / 100
|
||||
# convert to pixel dimensions
|
||||
priorWidth = pdb.gimp_image_width(image)
|
||||
priorHeight = pdb.gimp_image_height(image)
|
||||
|
||||
deltaWidth = priorWidth * deltaFraction
|
||||
deltaHeight = priorHeight * deltaFraction
|
||||
# shrink selection by percent (converted to pixel units)
|
||||
deltaFraction = percent / 100
|
||||
|
||||
# !!! Note total shrink percentage is halved (width of band is percentage/2)
|
||||
maxDelta = max(deltaWidth, deltaHeight) / 2
|
||||
|
||||
maxDelta = max(deltaWidth, deltaHeight) / 2
|
||||
|
||||
pdb.gimp_selection_shrink(image, maxDelta)
|
||||
#if not pdb.gimp_selection_shrink(image, maxDelta):
|
||||
# raise RuntimeError, "Failed shrink selection"
|
||||
|
||||
|
||||
def uncrop(orgImage, drawable, percentEnlargeParam=10):
|
||||
'''
|
||||
"""
|
||||
Create frisket stencil selection in a temp image to pass as source (corpus) to plugin resynthesizer,
|
||||
which does the substantive work.
|
||||
'''
|
||||
|
||||
if not pdb.gimp_item_is_layer(drawable):
|
||||
pdb.gimp_message(_("A layer must be active, not a channel."))
|
||||
return
|
||||
|
||||
"""
|
||||
|
||||
if not pdb.gimp_drawable_is_layer(drawable):
|
||||
pdb.gimp_message(_("A layer must be active, not a channel."))
|
||||
return
|
||||
|
||||
pdb.gimp_image_undo_group_start(orgImage)
|
||||
|
||||
|
||||
# copy original into temp for later use
|
||||
tempImage = pdb.gimp_image_duplicate(orgImage)
|
||||
|
||||
if not tempImage:
|
||||
raise RuntimeError, "Failed duplicate image"
|
||||
|
||||
'''
|
||||
|
||||
"""
|
||||
Prepare target: enlarge canvas and select the new, blank outer ring
|
||||
'''
|
||||
|
||||
"""
|
||||
|
||||
# Save original bounds to later select outer band
|
||||
pdb.gimp_selection_all(orgImage)
|
||||
selectAllPrior = pdb.gimp_selection_save(orgImage)
|
||||
|
||||
# Resize image alone doesn't resize layer, so resize layer also
|
||||
resizeImageCentered(orgImage, percentEnlargeParam)
|
||||
pdb.gimp_layer_resize_to_image_size(drawable)
|
||||
pdb.gimp_image_select_item(orgImage, CHANNEL_OP_REPLACE, selectAllPrior)
|
||||
pdb.gimp_selection_load(selectAllPrior)
|
||||
|
||||
# select outer band, the new blank canvas.
|
||||
pdb.gimp_selection_invert(orgImage)
|
||||
|
||||
# Assert target image is ready.
|
||||
|
||||
'''
|
||||
|
||||
"""
|
||||
Prepare source (corpus) layer, a band at edge of original, in a dupe.
|
||||
Note the width of corpus band is same as width of enlargement band.
|
||||
'''
|
||||
"""
|
||||
# Working with the original size.
|
||||
# Could be alpha channel transparency
|
||||
workLayer = pdb.gimp_image_get_active_layer(tempImage)
|
||||
|
||||
if not workLayer:
|
||||
raise RuntimeError, "Failed get active layer"
|
||||
|
||||
# Select outer band: select all, shrink
|
||||
pdb.gimp_selection_all(tempImage)
|
||||
shrinkSelectionByPercent(tempImage, percentEnlargeParam)
|
||||
pdb.gimp_selection_invert(tempImage) # invert interior selection into a frisket
|
||||
pdb.gimp_selection_invert(tempImage) # invert interior selection into a frisket
|
||||
|
||||
# Note that v1 resynthesizer required an inverted selection !!
|
||||
# No need to crop corpus to save memory.
|
||||
|
||||
|
||||
# Note that the API hasn't changed but use_border param now has more values.
|
||||
# !!! The crux: use_border param=5 means inside out direction
|
||||
pdb.plug_in_resynthesizer(orgImage, drawable, 0,0,5, workLayer.ID, -1, -1, 0.0, 0.117, 16, 500)
|
||||
|
||||
# Clean up.
|
||||
pdb.plug_in_resynthesizer(
|
||||
orgImage, drawable, 0, 0, 5, workLayer.ID, -1, -1, 0.0, 0.117, 16, 500
|
||||
)
|
||||
|
||||
# Clean up.
|
||||
# Any errors now are moot.
|
||||
pdb.gimp_selection_none(orgImage)
|
||||
pdb.gimp_image_remove_channel(orgImage, selectAllPrior)
|
||||
pdb.gimp_image_undo_group_end(orgImage)
|
||||
pdb.gimp_displays_flush()
|
||||
|
||||
gimp.delete(tempImage) # Comment out to debug corpus creation.
|
||||
|
||||
|
||||
register(
|
||||
"python_fu_uncrop",
|
||||
N_("Enlarge image by synthesizing a border that matches the edge, maintaining perspective. Works best for small enlargement of natural edges. Undo a Crop instead, if possible! "),
|
||||
"Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker",
|
||||
"Copyright 2009 Lloyd Konneker",
|
||||
"2009",
|
||||
N_("Uncrop..."),
|
||||
"RGB*, GRAY*",
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_SLIDER, "percentEnlargeParam", _("Percent enlargement"), 10, (0, 100, 1))
|
||||
],
|
||||
[],
|
||||
uncrop,
|
||||
menu="<Image>/Filters/Enhance",
|
||||
domain=("resynthesizer", gimp.locale_directory)
|
||||
)
|
||||
"python_fu_uncrop",
|
||||
N_(
|
||||
"Enlarge image by synthesizing a border that matches the edge, maintaining perspective. Works best for small enlargement of natural edges. Undo a Crop instead, if possible! "
|
||||
),
|
||||
"Requires separate resynthesizer plugin.",
|
||||
"Lloyd Konneker",
|
||||
"Copyright 2009 Lloyd Konneker",
|
||||
"2009",
|
||||
N_("Uncrop..."),
|
||||
"RGB*, GRAY*",
|
||||
[
|
||||
(PF_IMAGE, "image", "Input image", None),
|
||||
(PF_DRAWABLE, "drawable", "Input drawable", None),
|
||||
(PF_SLIDER, "percentEnlargeParam", _("Percent enlargement"), 10, (0, 100, 1)),
|
||||
],
|
||||
[],
|
||||
uncrop,
|
||||
menu="<Image>/Filters/Enhance",
|
||||
domain=("resynthesizer", gimp.locale_directory),
|
||||
)
|
||||
|
||||
main()
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# GIMP color profile history
|
||||
|
||||
|
||||
# end of color profile history
|
||||
@@ -1,5 +1,5 @@
|
||||
# GIMP sessionrc
|
||||
#
|
||||
#
|
||||
# This file takes session-specific info (that is info, you want to keep
|
||||
# between two GIMP sessions). You are not supposed to edit it manually, but
|
||||
# of course you can do. The sessionrc will be entirely rewritten every time
|
||||
@@ -11,29 +11,33 @@
|
||||
(size 620 200))
|
||||
(session-info "toplevel"
|
||||
(factory-entry "gimp-single-image-window")
|
||||
(position 255 82)
|
||||
(size 1920 856)
|
||||
(position 0 0)
|
||||
(size 1280 720)
|
||||
(open-on-exit)
|
||||
(aux-info
|
||||
(left-docks-width "52")
|
||||
(right-docks-width "363")
|
||||
(maximized "no"))
|
||||
(right-docks-width "372")
|
||||
(maximized "yes"))
|
||||
(gimp-toolbox
|
||||
(side left))
|
||||
(gimp-dock
|
||||
(side right)
|
||||
(book
|
||||
(current-page 0)
|
||||
(dockable "gimp-tool-options"
|
||||
(dockable "gimp-color-editor"
|
||||
(tab-style automatic)
|
||||
(aux-info
|
||||
(current-page "GimpColorSelect")))
|
||||
(dockable "gimp-font-list"
|
||||
(tab-style automatic)
|
||||
(aux-info
|
||||
(show-button-bar "true")))
|
||||
(dockable "gimp-font-list"
|
||||
(dockable "gimp-tool-options"
|
||||
(tab-style automatic)
|
||||
(aux-info
|
||||
(show-button-bar "true"))))
|
||||
(book
|
||||
(position 492)
|
||||
(position 293)
|
||||
(current-page 0)
|
||||
(dockable "gimp-layer-list"
|
||||
(tab-style automatic)
|
||||
@@ -41,6 +45,11 @@
|
||||
(aux-info
|
||||
(show-button-bar "true")))
|
||||
(dockable "gimp-channel-list"
|
||||
(tab-style automatic)
|
||||
(preview-size 32)
|
||||
(aux-info
|
||||
(show-button-bar "true")))
|
||||
(dockable "gimp-vectors-list"
|
||||
(tab-style automatic)
|
||||
(preview-size 32)
|
||||
(aux-info
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# GIMP templaterc
|
||||
#
|
||||
#
|
||||
# This file will be entirely rewritten each time you exit.
|
||||
|
||||
(GimpTemplate "Imagem blog"
|
||||
(GimpTemplate "Diolinux: Blog Post Image"
|
||||
(width 800)
|
||||
(height 450)
|
||||
(unit pixels)
|
||||
@@ -14,7 +14,7 @@
|
||||
(color-managed yes)
|
||||
(color-profile NULL)
|
||||
(fill-type background)
|
||||
(comment "Created with GIMP"))
|
||||
(comment "Default resolution for Diolinux's blog post images"))
|
||||
(GimpTemplate "640x480"
|
||||
(width 640)
|
||||
(height 480)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This file is written on GIMP startup and on every theme change.
|
||||
# It is NOT supposed to be edited manually. Edit your personal
|
||||
# gtkrc file instead (/home/dio/.var/app/org.gimp.GIMP/config/GIMP/2.10/gtkrc).
|
||||
# gtkrc file instead (~/.var/app/org.gimp.GIMP/config/GIMP/2.10/gtkrc).
|
||||
|
||||
style "gimp-spin-scale-style"
|
||||
{
|
||||
@@ -13,6 +13,6 @@ class "GimpSpinScale" style "gimp-spin-scale-style"
|
||||
|
||||
include "/app/share/gimp/2.0/themes/Dark/gtkrc"
|
||||
include "/app/etc/gimp/2.0/gtkrc"
|
||||
include "/home/dio/.var/app/org.gimp.GIMP/config/GIMP/2.10/gtkrc"
|
||||
include "~/.var/app/org.gimp.GIMP/config/GIMP/2.10/gtkrc"
|
||||
|
||||
# end of themerc
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
# GIMP units
|
||||
#
|
||||
# This file contains the user unit database. You can edit this list with the
|
||||
# unit editor. You are not supposed to edit it manually, but of course you
|
||||
# can do.
|
||||
# This file will be entirely rewritten each time you exit.
|
||||
|
||||
(unit-info "centimeters"
|
||||
(factor 2.54)
|
||||
(digits 2)
|
||||
(symbol "cm")
|
||||
(abbreviation "cm")
|
||||
(singular "centimeter")
|
||||
(plural "centimeters"))
|
||||
(unit-info "meters"
|
||||
(factor 0.025399999999999999)
|
||||
(digits 4)
|
||||
(symbol "m")
|
||||
(abbreviation "m")
|
||||
(singular "meter")
|
||||
(plural "meters"))
|
||||
(unit-info "feet"
|
||||
(factor 0.083333000000000004)
|
||||
(digits 4)
|
||||
(symbol "'")
|
||||
(abbreviation "ft")
|
||||
(singular "foot")
|
||||
(plural "feet"))
|
||||
(unit-info "yards"
|
||||
(factor 0.027778000000000001)
|
||||
(digits 4)
|
||||
(symbol "yd")
|
||||
(abbreviation "yd")
|
||||
(singular "yard")
|
||||
(plural "yards"))
|
||||
(unit-info "typogr. points"
|
||||
(factor 72.269999999999996)
|
||||
(digits 0)
|
||||
(symbol "tpt")
|
||||
(abbreviation "tpt")
|
||||
(singular "typogr. point")
|
||||
(plural "typogr. points"))
|
||||
(unit-info "typogr. picas"
|
||||
(factor 6.0225)
|
||||
(digits 1)
|
||||
(symbol "tpc")
|
||||
(abbreviation "tpc")
|
||||
(singular "typogr. pica")
|
||||
(plural "typogr. picas"))
|
||||
|
||||
# end of units
|
||||
@@ -1,11 +0,0 @@
|
||||
[Filechooser Settings]
|
||||
LocationMode=path-bar
|
||||
ShowHidden=true
|
||||
ShowSizeColumn=true
|
||||
GeometryX=2879
|
||||
GeometryY=77
|
||||
GeometryWidth=1128
|
||||
GeometryHeight=782
|
||||
SortColumn=name
|
||||
SortOrder=ascending
|
||||
StartupMode=recent
|
||||
@@ -1,252 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=PhotoGIMP
|
||||
Name[ar]=PhotoGIMP
|
||||
Name[ast]=PhotoGIMP
|
||||
Name[be]=PhotoGIMP
|
||||
Name[bg]=PhotoGIMP
|
||||
Name[br]=PhotoGIMP
|
||||
Name[bs]=PhotoGIMP
|
||||
Name[ca]=PhotoGIMP
|
||||
Name[ca@valencia]=PhotoGIMP
|
||||
Name[cs]=PhotoGIMP
|
||||
Name[csb]=EPhotoGIMP
|
||||
Name[da]=PhotoGIMP
|
||||
Name[de]=PhotoGIMP
|
||||
Name[dz]=PhotoGIMP
|
||||
Name[el]=PhotoGIMP
|
||||
Name[en_CA]=PhotoGIMP
|
||||
Name[en_GB]=PhotoGIMP
|
||||
Name[eo]=PhotoGIMP
|
||||
Name[es]=PhotoGIMP
|
||||
Name[et]=PhotoGIMP
|
||||
Name[eu]=PhotoGIMP
|
||||
Name[fa]=PhotoGIMP
|
||||
Name[fi]=PhotoGIMP
|
||||
Name[fr]=ÉPhotoGIMP
|
||||
Name[gd]=PhotoGIMP
|
||||
Name[gl]=PhotoGIMP
|
||||
Name[gu]=PhotoGIMP
|
||||
Name[he]=PhotoGIMP
|
||||
Name[hr]=PhotoGIMP
|
||||
Name[hu]=PhotoGIMP
|
||||
Name[id]=PhotoGIMP
|
||||
Name[is]=GPhotoGIMP
|
||||
Name[it]=GPhotoGIMP
|
||||
Name[ja]=PhotoGIMP
|
||||
Name[km]=PhotoGIMP
|
||||
Name[kn]=PhotoGIMP
|
||||
Name[ko]=PhotoGIMP
|
||||
Name[ky]=PhotoGIMP
|
||||
Name[lt]=PhotoGIMP
|
||||
Name[lv]=PhotoGIMP
|
||||
Name[mk]=PhotoGIMP
|
||||
Name[ml]=GPhotoGIMP
|
||||
Name[mr]=PhotoGIMP
|
||||
Name[my]=PhotoGIMP
|
||||
Name[nb]=PhotoGIMP
|
||||
Name[nds]=PhotoGIMP
|
||||
Name[ne]=PhotoGIMP
|
||||
Name[nl]=PhotoGIMP
|
||||
Name[nn]=PhotoGIMP
|
||||
Name[oc]=PhotoGIMP
|
||||
Name[pa]=PhotoGIMP
|
||||
Name[pl]=PhotoGIMP
|
||||
Name[pt]=PhotoGIMP
|
||||
Name[pt_BR]=PhotoGIMP
|
||||
Name[ro]=PhotoGIMP
|
||||
Name[ru]=PhotoGIMP
|
||||
Name[si]=PhotoGIMP
|
||||
Name[sk]=PhotoGIMP
|
||||
Name[sl]=PhotoGIMP
|
||||
Name[sr]=PhotoGIMP
|
||||
Name[sr@latin]=PhotoGIMP
|
||||
Name[sv]=PhotoGIMP
|
||||
Name[ta]=PhotoGIMP
|
||||
Name[te]=PhotoGIMP
|
||||
Name[th]=PhotoGIMP
|
||||
Name[tr]=PhotoGIMP
|
||||
Name[tt]=PhotoGIMP
|
||||
Name[uk]=PhotoGIMP
|
||||
Name[vi]=PhotoGIMP
|
||||
Name[zh_CN]=PhotoGIMP
|
||||
Name[zh_HK]=PhotoGIMP
|
||||
Name[zh_TW]=PhotoGIMP
|
||||
GenericName=PhotoGIMP
|
||||
GenericName[ar]=محرر صور
|
||||
GenericName[ast]=Editor d'imaxe
|
||||
GenericName[be]=Рэдактар відарысаў
|
||||
GenericName[bg]=Редактор на изображения
|
||||
GenericName[br]=Embanner skeudennoù
|
||||
GenericName[bs]=Obrada slika
|
||||
GenericName[ca]=Editor d'imatges
|
||||
GenericName[ca@valencia]=Editor d'imatges
|
||||
GenericName[cs]=Editor obrázků
|
||||
GenericName[da]=Billedredigering
|
||||
GenericName[de]=Bildeditor
|
||||
GenericName[dz]=གཟུགས་བརྙན་ ཞུན་དག་པ།
|
||||
GenericName[el]=Επεξεργαστής εικόνων
|
||||
GenericName[en_CA]=Image Editor
|
||||
GenericName[en_GB]=Image Editor
|
||||
GenericName[eo]=Bildredaktilo
|
||||
GenericName[es]=Editor de imagen
|
||||
GenericName[et]=Pildiredaktor
|
||||
GenericName[eu]=Irudi-editorea
|
||||
GenericName[fa]=ویرایشگر تصویر
|
||||
GenericName[fi]=Kuvankäsittely
|
||||
GenericName[fr]=Éditeur d’image
|
||||
GenericName[gd]=Deasaiche dhealbhan
|
||||
GenericName[gl]=Editor de imaxes
|
||||
GenericName[gu]=ચિત્ર સંપાદક
|
||||
GenericName[hr]=Uređivač slika
|
||||
GenericName[hu]=Képszerkesztő
|
||||
GenericName[id]=Penyunting Gambar
|
||||
GenericName[is]=Myndvinnsluforrit
|
||||
GenericName[it]=Modifica immagine
|
||||
GenericName[ja]=画像エディター
|
||||
GenericName[ka]=გამოსახულებების რედაქტორი
|
||||
GenericName[kk]=Суреттерді өңдеу қолданбасы
|
||||
GenericName[km]=កម្មវិធីនិពន្ធរូបភាព
|
||||
GenericName[kn]=ಚಿತ್ರ ಸಂಪಾದಕ
|
||||
GenericName[ko]=이미지 편집기
|
||||
GenericName[ky]=Сүрөт редактору
|
||||
GenericName[lt]=Paveikslėlių rengyklė
|
||||
GenericName[lv]=Attēlu redaktors
|
||||
GenericName[mk]=Уредник за слики
|
||||
GenericName[mr]=प्रतिमा संपादक
|
||||
GenericName[my]=ရုပ်ပုံ တည်းဖြတ်ကိရိယာ
|
||||
GenericName[nb]=Bildebehandler
|
||||
GenericName[nds]=Billbewarker
|
||||
GenericName[ne]=छवि सम्पादक
|
||||
GenericName[nl]=Editor Afbeeldingen
|
||||
GenericName[nn]=Bilethandterar
|
||||
GenericName[oc]=Editor d'imatge
|
||||
GenericName[pa]=ਚਿੱਤਰ ਐਡੀਟਰ
|
||||
GenericName[pl]=Edytor obrazów
|
||||
GenericName[pt]=Editor de imagens
|
||||
GenericName[pt_BR]=Editor de imagens
|
||||
GenericName[ro]=Editor de imagini
|
||||
GenericName[ru]=Редактор изображений
|
||||
GenericName[sk]=Editor obrázkov
|
||||
GenericName[sl]=Urejevalnik slik
|
||||
GenericName[sr]=Обрада фотографија
|
||||
GenericName[sr@latin]=Obrada slika
|
||||
GenericName[sv]=Bildredigerare
|
||||
GenericName[ta]=பிம்ப திருத்தி
|
||||
GenericName[te]=బొమ్మ కూర్పకము
|
||||
GenericName[th]=เครื่องมือแก้ไขภาพ
|
||||
GenericName[tr]=Görüntü Düzenleyici
|
||||
GenericName[tt]=Sürät Tözätkeç
|
||||
GenericName[uk]=Редактор зображень
|
||||
GenericName[vi]=Bộ biên soạn ảnh
|
||||
GenericName[xh]=UmHleli woMfanekiso
|
||||
GenericName[zh_CN]=图像编辑器
|
||||
GenericName[zh_HK]=圖片編輯器
|
||||
GenericName[zh_TW]=影像編輯器
|
||||
Comment=Create images and edit photographs
|
||||
Comment[ar]=أنشئ صورا وحرّر لقطات
|
||||
Comment[ast]=Cree imáxenes y edite semeyes
|
||||
Comment[be]=Стварэньне відарысаў і праўленьне фатаздымкаў
|
||||
Comment[bg]=Създаване на изображения и редакция на снимки
|
||||
Comment[br]=Krouiñ hag embann skeudennoù pe luc'hskeudennoù
|
||||
Comment[bs]=Napravite slike i obradite fotografije
|
||||
Comment[ca]=Creeu imatges i editeu fotografies
|
||||
Comment[ca@valencia]=Creeu imatges i editeu fotografies
|
||||
Comment[cs]=Vytvářejte obrázky a upravujte fotografie
|
||||
Comment[da]=Opret billeder og redigér fotografier
|
||||
Comment[de]=Bilder erstellen und Fotografien bearbeiten
|
||||
Comment[dz]=གཟུགས་བརྙན་ཚུ་ གསར་བསྐྲུན་འབད་ནི་དང་ དཔར་ཚུ་ཞུན་དག་འབད།
|
||||
Comment[el]=Δημιουργία εικόνων και επεξεργασία φωτογραφιών
|
||||
Comment[en_CA]=Create images and edit photographs
|
||||
Comment[en_GB]=Create images and edit photographs
|
||||
Comment[eo]=Krei bildojn aŭ redakti fotaĵojn
|
||||
Comment[es]=Cree imágenes y edite fotografías
|
||||
Comment[et]=Joonistamine ja fotode töötlemine
|
||||
Comment[eu]=Sortu irudiak eta editatu argazkiak
|
||||
Comment[fi]=Luo kuvia ja muokkaa valokuvia
|
||||
Comment[fr]=Créer des images et modifier des photographies
|
||||
Comment[gd]=Cruthaich dealbhan is deasaich dealbhan camara
|
||||
Comment[gl]=Crear imaxes e editar fotografías
|
||||
Comment[gu]=ચિત્રો બનાવો અને ફોટાઓમાં ફેરફાર કરો
|
||||
Comment[hr]=Stvaraj slike i uređuj fotografije
|
||||
Comment[hu]=Képek létrehozása és fotók szerkesztése
|
||||
Comment[id]=Buat gambar dan sunting foto
|
||||
Comment[is]=Búa til myndir og breyta ljósmyndum
|
||||
Comment[it]=Crea immagini e modifica fotografie
|
||||
Comment[ja]=画像の作成と写真の編集を行います
|
||||
Comment[kk]=Суреттерді жасау және фотоларды түзету
|
||||
Comment[km]=បង្កើតរូបភាព និង កែសម្រួលរូបថត
|
||||
Comment[kn]=ಚಿತ್ರಗಳನ್ನು ರಚಿಸಿ ಹಾಗು ಫೋಟೋಗ್ರಾಫ್ಗಳನ್ನು ಸಂಪಾದಿಸಿ
|
||||
Comment[ko]=이미지를 만들고 사진을 편집합니다
|
||||
Comment[lt]=Kurti paveikslėlius ir redaguoti fotografijas
|
||||
Comment[lv]=Veido attēlus vai rediģē fotogrāfijas
|
||||
Comment[mk]=Направи слики и уреди фотографии
|
||||
Comment[mr]=प्रतिमा तयार करा आणि छायाचित्रे संपादित करा
|
||||
Comment[my]=ရုပ်ပုံများကို ဖန်တီးပြီး ဓါတ်ပုံများကို တည်းဖြတ်ပါ
|
||||
Comment[nb]=Lag bilder og rediger fotografier
|
||||
Comment[ne]=छवि सिर्जना गर्नुहोस् र फोटोग्राफ सम्पादन गर्नुहोस्
|
||||
Comment[nl]=Afbeeldingen aanmaken en foto's bewerken
|
||||
Comment[nn]=Lag teikningar eller rediger foto
|
||||
Comment[oc]=Crear d'imatges e modificar de fotografias
|
||||
Comment[pa]=ਚਿੱਤਰ ਬਣਾਓ ਅਤੇ ਤਸਵੀਰਾਂ ਸੋਧੋ
|
||||
Comment[pl]=Tworzenie oraz obróbka obrazów i fotografii
|
||||
Comment[pt]=Criar imagens e editar fotografias
|
||||
Comment[pt_BR]=Crie e edite imagens ou fotografias
|
||||
Comment[ro]=Creează imagini și editează fotografii
|
||||
Comment[ru]=Создание изображений и редактирование фотографий
|
||||
Comment[sk]=Vytvárajte a upravujte obrázky alebo fotografie
|
||||
Comment[sl]=Ustvari slike in uredi fotografije
|
||||
Comment[sr]=Направите нове сличице и средите ваше фотографије
|
||||
Comment[sr@latin]=Napravite slike i uredite fotografije
|
||||
Comment[sv]=Skapa bilder och redigera fotografier
|
||||
Comment[ta]=பிம்பங்களை உருவாக்கவும் மற்றும் படங்களை திருத்தவும்
|
||||
Comment[te]=బొమ్మలను సృష్టించు మరియు చిత్రాలను సవరించు
|
||||
Comment[tr]=Görüntü oluşturur ve fotoğraf düzenler
|
||||
Comment[uk]=Створення зображень та редагування фотографій
|
||||
Comment[vi]=Tạo và biên soạn ảnh hay ảnh chụp
|
||||
Comment[zh_CN]=创建图像或编辑照片
|
||||
Comment[zh_HK]=建立圖像與編輯照片
|
||||
Comment[zh_TW]=建立圖像與編輯照片
|
||||
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords=GIMP;graphic;design;illustration;painting;
|
||||
Keywords[ar]=GIMP;graphic;design;illustration;painting;
|
||||
Keywords[ca]=GIMP;gràfics;disseny;il·lustració;pintura;
|
||||
Keywords[ca@valencia]=GIMP;gràfic;disseny;il·lustració;pintura;
|
||||
Keywords[cs]=GIMP;grafika;design;ilustrace;malování;
|
||||
Keywords[da]=GIMP;grafisk;design;illustration;male;tegne;
|
||||
Keywords[de]=GIMP;Grafik;Design;Illustration;Malen;
|
||||
Keywords[el]=GIMP;γραφικό;σχεδίαση;επεξήγηση;βαφή;
|
||||
Keywords[en_GB]=GIMP;graphic;design;illustration;painting;
|
||||
Keywords[es]=GIMP;gráfico;diseño;ilustración;dibujo;
|
||||
Keywords[eu]=GIMP;irudia;diseinua;ilustrazioa;margotzea;
|
||||
Keywords[fi]=GIMP;grafiikka;maalaus;suunnittelu;valokuva;kuva;
|
||||
Keywords[fr]=GIMP;graphisme;conception;design;illustration;image;peinture;
|
||||
Keywords[gl]=GIMP;gráfico;deseño;ilustración;debuxo;
|
||||
Keywords[hr]=GIMP;grafika;dizajn;ilustracija;slikanje;
|
||||
Keywords[hu]=GIMP;grafika;dizájn;tervezés;illusztráció;festés;
|
||||
Keywords[is]=GIMP;mynd;hönnun;myndskreyting;málun;myndvinnsla;
|
||||
Keywords[it]=GIMP;grafica;design;illustrazioni;disegno;fotoritocco;
|
||||
Keywords[lv]=GIMP;grafika;dizains;ilustrācija;glezna;
|
||||
Keywords[mr]=गिम्पसाठी;ग्राफिक्स;रचना;उदाहरण;चित्रकला;
|
||||
Keywords[nl]=GIMP;grafisch;ontwerp;illustratie;tekenen;
|
||||
Keywords[pl]=GIMP;grafika;graficzny;design;dizajn;projektowanie;wzornictwo;ilustracja;ilustrowanie;rysunek;rysowanie;rysownictwo;malowanie;malarstwo;obrazy;obrazki;fotografia;zdjęcia;retuszowanie;renderowanie;wtyczki;
|
||||
Keywords[pt]=GIMP;gráficos;design;desenho;ilustração;pintura;
|
||||
Keywords[pt_BR]=GIMP;gráficos;design;ilustração;pintura;
|
||||
Keywords[ro]=GIMP;graphic;design;illustration;painting;
|
||||
Keywords[ru]=GIMP;графика;дизайн;иллюстрация;рисование;
|
||||
Keywords[sk]=GIMP;grafika;grafický;návrh;dizajn;ilustrácia;kresba;maľovanie;maľba;
|
||||
Keywords[sl]=GIMP;grafika;oblikovanje;ilustracija;slikanje;
|
||||
Keywords[sr]=Гимп;обрада фотографија;графика;дизајн;илустрација;цртање;obrada fotografija;grafika;dizajn;ilustracija;crtanje;GIMP;graphic;design;illustration;painting;
|
||||
Keywords[sv]=GIMP;grafik;design;illustrera;målning;rita;
|
||||
Keywords[tr]=GIMP;grafik;tasarım;örnekleme;boyama;illüstrasyon;resimleme;
|
||||
Keywords[uk]=GIMP;graphic;design;illustration;painting;гімп;ґімп;графіка;дизайн;ілюстрації;малювання;
|
||||
Keywords[zh_CN]=GIMP;图形;设计;绘画;graphic;design;illustration;painting;
|
||||
Exec=gimp-2.10 %U
|
||||
TryExec=gimp-2.10
|
||||
Icon=org.gimp.GIMP
|
||||
Terminal=false
|
||||
Categories=Graphics;2DGraphics;RasterGraphics;GTK;
|
||||
StartupNotify=true
|
||||
MimeType=image/bmp;image/g3fax;image/gif;image/x-fits;image/x-pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/tiff;image/jpeg;image/x-psp;application/postscript;image/png;image/x-icon;image/x-xpixmap;image/x-exr;image/x-webp;image/heif;image/heic;image/svg+xml;application/pdf;image/x-wmf;image/jp2;image/x-xcursor;
|
||||
X-Flatpak-RenamedFrom=gimp.desktop;
|
||||
@@ -1,7 +0,0 @@
|
||||
Just Extract all *hidden* folder to your home repository
|
||||
|
||||
.icons
|
||||
.var
|
||||
.local
|
||||
|
||||
Only works with flatpak version for GIMP.
|
||||
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
108
README-PL.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# 🎨 PhotoGIMP
|
||||
|
||||
<img src="./.local/share/icons/hicolor/256x256/apps/photogimp.png" align="right" alt="PhotoGimp application icon" title="PhotoGimp application icon">
|
||||
|
||||
Prosta modyfikacja do GIMP-a 2.10+, aby pomóc użytkownikom <span style="color: blue;">_Photoshop-a_.
|
||||
_Od Tłumacza: lub dla nowych użytkowników GIMP-a którzy, chcą się czuć jak na Photoshop-ie_</span>
|
||||
|
||||
Jakie zostaną wprowadzone nowe zmiany:
|
||||
|
||||
* Zmiana położenia narzędzi przypominająca Adobe Photoshop-a;
|
||||
* Setki nowych domyślnych czcionek;
|
||||
* Nowe domyślne filtry Python-a, takie jak "heal selection";
|
||||
* Nowy Ekran Ładowania;
|
||||
* Nowe domyślne ustawienia powiększające przestrzeń roboczą;
|
||||
* Skróty klawiaturowe, przypominające z Photoshop-a, wzorowane na dokumentacji Adobe;
|
||||
* Nowa ikona i nazwa dla dowolnego pliku .desktop ;
|
||||
* Po zainstalowaniu nowym domyślnie używanym językiem jest Język Systemowy
|
||||
|
||||

|
||||
|
||||
|
||||
**📷 Zrzut Ekranu**
|
||||
|
||||

|
||||
|
||||
**🈂 Dużo nowych czcionek dostępnych w każdej chwili**
|
||||
|
||||
Ponad 1800 nowych/domyślnych czcionek, które przyśpieszą tobie pracę.
|
||||
|
||||
<!-- TODO: Zostanie dodany nowy zrzut ekranu, korzystając z jednej z dołączonych czcionek. -->
|
||||
|
||||
[Zobacz wszystkie zaimplementowane czcionki](https://github.com/Diolinux/PhotoGIMP/blob/master/fonts.txt)
|
||||
|
||||
## ⚙ Jak zainstalować (używając Flatpak)
|
||||
Ta paczka dotyczy tylko flatpaka, ale można również jej użyć w innych wersjach GIMP-a (.deb,.rpm, Za pomocą Snap, AppImage, Windows, macOS). Sprawdź lokalizację konfiguracyjnych plików GIMP-a
|
||||
|
||||
**Aby kontynuować, przed instalacją uruchom i zamknij GIMP-a**
|
||||
|
||||
### Przygotowanie do instalacji środowiska Flatpak
|
||||
|
||||
* Na początku, upewnij się że masz najnowszą wersję GIMP-a [używając Flatpak-a](https://flatpak.org/setup/)
|
||||
* Zainstaluj GIMP-a Flatpak z centrum aplikacji/instalatora oprogramowania lub używając komendy w terminalu:
|
||||
```flatpak install flathub org.gimp.GIMP```
|
||||
|
||||
### Instalacja (PhotoGIMP)
|
||||
|
||||
W pliku ZIP z [strony nowych wydań (Releases)](https://github.com/Diolinux/PhotoGIMP/releases) znajdziesz trzy ukryte foldery (na pozostałych systemach, oprócz Windows-a, użyto kropki przed nazwą folderu). Musisz rozpakować plik ZIP z wszystkimi folderami do swojego profilu użytkownika `$HOME`, <span style="color: red;">Uwaga musisz zgodzić się nadpisać wszystkie pliki</span> , jeśli masz poprzednią wersję instalacji
|
||||
|
||||
Plik (ZIP) zawiera poniższe foldery:
|
||||
|
||||
* `.icons` (nowe ikony PhotoGimp)
|
||||
* `.local` (modyfikacja personalizacji pliku .desktop)
|
||||
* `.var` (modyfikacja flatpak dla GIMP-a 2.10+)
|
||||
|
||||
|
||||
Jeśli chcesz użyć PhotoGimp bez zmieniania ikon i nazwy, rozpakuj tylko folder .var do domyślnej lokalizacji GIMP-a.
|
||||
|
||||
## ⚙ Jak zainstalować (bez Flatpak)
|
||||
|
||||
Ponieważ są to tylko pliki, musisz skopiować je do określonego folderu z tego pakietu `/.var/app/org.gimp.GIMP/config/GIMP/2.10`, do folderu konfiguracyjnego GIMP-a w używanym systemie
|
||||
|
||||
**Aby kontynuować, przed instalacją uruchom i zamknij GIMP-a**
|
||||
|
||||
Nowe ikony musisz ustawić ręcznie
|
||||
|
||||
### Ubuntu (przez Snap)
|
||||
|
||||
Folder konfiguracyjny (GIMP-a): `$HOME/.config/GIMP/2.10/`
|
||||
|
||||
|
||||
### Pozostałe systemy Linux lub podobne do Unix, używające (.deb, .rpm, etc.)
|
||||
|
||||
Folder Konfiguracyjny: `$HOME/.config/GIMP/2.10/`
|
||||
|
||||
### macOS
|
||||
Folder konfiguracyjny: `"$HOME/Library/Application Support/GIMP/2.10/"`
|
||||
|
||||
* [Poradnik Wideo stworzony przez Davies Media Design na macOS](https://youtu.be/5nXhtaGQs9U)
|
||||
|
||||
Ta jedna linijka zainstaluje wszystko:
|
||||
```console
|
||||
curl -L "https://github.com/Diolinux/PhotoGIMP/releases/download/1.0/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip" -o ~/Downloads/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip && unzip ~/Downloads/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip -d ~/Downloads && sudo cp -R ~/Downloads/PhotoGIMP\ by\ Diolinux\ v2020\ for\ Flatpak/.var/app/org.gimp.GIMP/config/GIMP/2.10/ ~/Library/Application\ Support/GIMP/2.10 && rm ~/Downloads/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip
|
||||
```
|
||||
(Pobierze wersję 1.0 do folderu `Downloads` lub do folderu `Pobrane`, rozpakuje i skopiuje zmodyfikowane pliki, a na końcu usunie wcześniej pobrany plik `.zip`)
|
||||
|
||||
**Ważne** : GIMP na macOS jest troche spóżnioną wersją. Dlatego, ta modyfikacja działa w skrótach klawiszowych, ale nie, które opcję mogą nie działać, takie jak organizacje zestawu narzędzi. Trzeba poczekać, aż dla macOS będzie dostępna wersja 2.10.20, inaczej możesz spodziewać takich problemów.
|
||||
|
||||
### Windows
|
||||
|
||||
Folder Konfiguracyjny: `%APPDATA%\GIMP\2.10`
|
||||
|
||||
* [Poradnik Wideo stworzony przez Davies Media Design na Windows](https://youtu.be/57DNUsf4A-0)
|
||||
|
||||
Lub zainstaluj przez [Chocolatey](https://chocolatey.org/):
|
||||
```powershell
|
||||
choco install photogimp
|
||||
```
|
||||
Maintained by: [André Augusto](https://github.com/AndreAugustoAAQ)
|
||||
|
||||
## Podziękowania
|
||||
|
||||
* Projekt, nie mógłby być nigdy zrealizowany bez świetnego zespołu GIMP-a.
|
||||
* Za zrobienie nowego zdjęcia do Ekranu Ładowania dla [Isabella Mariana](https://www.pexels.com/pt-br/@isabella-mariana-1022505)
|
||||
* Specjalne podziękowania do wszystkich pomocników Diolinux's na [Twitch-u](https://twitch.tv/Diolinux) i na [YouTube](https://youtube.com/Diolinux).
|
||||
|
||||
## Patch Notes
|
||||
- [in Brazilian Portuguese]( https://diolinux.com.br/2020/06/photogimp-2020.html)
|
||||
- [Veja as Notas de Lançamento em Português](https://diolinux.com.br/2020/06/photogimp-2020.html)
|
||||
105
README.md
@@ -1,2 +1,103 @@
|
||||
# PhotoGIMP
|
||||
A Patch for GIMP 2.10+ for Photoshop Users
|
||||
# 🎨 PhotoGIMP
|
||||
|
||||
<img src="./.local/share/icons/hicolor/256x256/apps/photogimp.png" align="right" alt="PhotoGimp application icon" title="PhotoGimp application icon">
|
||||
|
||||
A patch for optimizing GIMP 2.10+ for Adobe Photoshop users, including features like:
|
||||
|
||||
* Tool organization to mimic the position of Adobe Photoshop;
|
||||
* Hundreds of new fonts by default;
|
||||
* New Python filters installed by default, such as "heal selection";
|
||||
* New Splash Screen
|
||||
* New default settings to maximize space on the canvas;
|
||||
* Shortcuts similar to the ones in Photoshop for Windows, following Adobe’s Documentation;
|
||||
* New icon and Name from custom .desktop file.
|
||||
* System Language is now used by default, you can still change in settings if you want.
|
||||
|
||||

|
||||
|
||||
**📷 Screenshot**
|
||||
|
||||

|
||||
|
||||
**🈂 Have a large set of fonts available anytime**
|
||||
|
||||
More than 1800 fonts are included by default in PhotoGimp so you can speed up your creative workflow.
|
||||
|
||||
<!-- TODO: Add Screenshot utilizing one of included fonts. -->
|
||||
|
||||
[Check out all included fonts](https://github.com/Diolinux/PhotoGIMP/blob/master/fonts.txt)
|
||||
|
||||
## ⚙ How to Install (using Flatpak)
|
||||
|
||||
This package is all about flatpak, but it also contains "just files" that you can use on any version of GIMP (.deb, .rpm, Snap, AppImage, Windows, macOS). Just check the location of the GIMP configuration files.
|
||||
|
||||
**Start and quit GIMP after you installed before you continue!**
|
||||
|
||||
### Prepare the Flatpak enviroment
|
||||
|
||||
* First of all, you need to have the latest GIMP installed on your system [using Flatpak](https://flatpak.org/setup/)
|
||||
* Install GIMP Flatpak through your AppCenter/Package Manager or terminal:
|
||||
```flatpak install flathub org.gimp.GIMP```
|
||||
|
||||
### Install PhotoGIMP
|
||||
|
||||
Inside the .zip file from the [releases page](https://github.com/Diolinux/PhotoGIMP/releases) you’ll find three folders (hidden on non-Windows systems as their names begin with a dot). All of these folders have to be extracted to your `$HOME` folder, overwriting everything if you already have the same files from an older installation.
|
||||
|
||||
The file contains these directories:
|
||||
|
||||
* `.icons` (which has a new PhotoGIMP icon)
|
||||
* `.local` (which contains the personalized .desktop file)
|
||||
* `.var` (which contains the flatpak patch customization for GIMP 2.10+)
|
||||
|
||||
If you just want the PhotoGIMP customization without changing the original GIMP icon and its name, just extract only the ```.var``` folder to your home directory.
|
||||
|
||||
## ⚙ How to Install (others)
|
||||
|
||||
Since it’s just files, the only thing you need to do is to copy all the files that reside on a particular folder from this package `/.var/app/org.gimp.GIMP/config/GIMP/2.10` to your GIMP’s configuration folder on each particular system, overriding the existent ones.
|
||||
|
||||
**Start and quit GIMP after you installed before you continue!**
|
||||
|
||||
The new icon needs to be set manually.
|
||||
|
||||
### Ubuntu Snap
|
||||
|
||||
Configuration folder: `$HOME/snap/gimp/47/.config/GIMP/2.10/`
|
||||
|
||||
### Other Linux or Unix(-like) systems (.deb, .rpm, etc.)
|
||||
|
||||
Configuration folder: `$HOME/.config/GIMP/2.10/`
|
||||
|
||||
### macOS
|
||||
|
||||
Configuration folder: `"$HOME/Library/Application Support/GIMP/2.10/"`
|
||||
|
||||
* [Video Tutorial by Davies Media Design on macOS](https://youtu.be/5nXhtaGQs9U)
|
||||
|
||||
This one-liner will do the job:
|
||||
```console
|
||||
curl -L https://github.com/Diolinux/PhotoGIMP/releases/download/1.0/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip -o ~/Downloads/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip && unzip ~/Downloads/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip -d ~/Downloads && cp -R ~/Downloads/PhotoGIMP\ by\ Diolinux\ v2020\ for\ Flatpak/.var/app/org.gimp.GIMP/config/GIMP/2.10/ ~/Library/Application\ Support/GIMP/2.10 && rm ~/Downloads/PhotoGIMP.by.Diolinux.v2020.for.Flatpak.zip
|
||||
```
|
||||
(downloads release 1.0 into `Downloads` folder, unzips and copies files, then removes downloaded .zip file)
|
||||
|
||||
*Notice*: GIMP on macOS is a bit late on its release. This way, this patch still works, specially on the shortcuts matter, but somethings, such the toolbox organization, will not work properly. Until the macOS version reaches the version 2.10.20, expect this behavior.
|
||||
|
||||
### Windows
|
||||
|
||||
Configuration folder: `%APPDATA%\GIMP\2.10`
|
||||
|
||||
* [Video Tutorial by Davies Media Design on Windows](https://youtu.be/57DNUsf4A-0)
|
||||
|
||||
Or install via [Chocolatey](https://chocolatey.org/):
|
||||
```powershell
|
||||
choco install photogimp
|
||||
```
|
||||
Maintained by: [André Augusto](https://github.com/AndreAugustoAAQ)
|
||||
|
||||
## Credits
|
||||
|
||||
* This project would not be possible without the amazing GIMP team.
|
||||
* The Photo in the new Splash is from [Isabella Mariana](https://www.pexels.com/pt-br/@isabella-mariana-1022505)
|
||||
* A BIG thanks to all Diolinux’s supporters on [Twitch](https://twitch.tv/Diolinux) and [YouTube](https://youtube.com/Diolinux).
|
||||
|
||||
## Patch Notes
|
||||
- [Veja as Notas de Lançamento em Português](https://diolinux.com.br/2020/06/photogimp-2020.html)
|
||||
|
||||
BIN
screenshots/2020-06-22_12-06.png
Normal file
|
After Width: | Height: | Size: 478 KiB |