1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-12 16:53:07 +00:00

Compare commits

...

65 commits

Author SHA1 Message Date
Emmanouil Papadeas 5efec16106
Merge 39e0680200 into 2d28136449 2024-11-20 14:25:00 +00:00
Emmanouil Papadeas 39e0680200 New translations translations.pot (Indonesian) 2024-11-20 16:24:59 +02:00
Emmanouil Papadeas 1119481659 New translations translations.pot (Turkish) 2024-11-20 16:24:58 +02:00
Emmanouil Papadeas 04134de9d7 New translations translations.pot (Japanese) 2024-11-20 16:24:57 +02:00
Emmanouil Papadeas ca6ae3bcee New translations translations.pot (Maori) 2024-11-20 14:59:30 +02:00
Emmanouil Papadeas 64e8841010 New translations translations.pot (Kazakh) 2024-11-20 14:59:29 +02:00
Emmanouil Papadeas ac507d8c2a New translations translations.pot (Ancient Greek) 2024-11-20 14:59:28 +02:00
Emmanouil Papadeas f3aa4c40dd New translations translations.pot (Norwegian Bokmal) 2024-11-20 14:59:26 +02:00
Emmanouil Papadeas 4d5b0d959f New translations translations.pot (Swahili) 2024-11-20 14:59:25 +02:00
Emmanouil Papadeas 39cd26fca1 New translations translations.pot (Sinhala) 2024-11-20 14:59:24 +02:00
Emmanouil Papadeas 25ca4f843b New translations translations.pot (Latin) 2024-11-20 14:59:22 +02:00
Emmanouil Papadeas 05eb0692e4 New translations translations.pot (Malayalam) 2024-11-20 14:59:21 +02:00
Emmanouil Papadeas ae0c122628 New translations translations.pot (Filipino) 2024-11-20 14:59:20 +02:00
Emmanouil Papadeas 6ed5d136cc New translations translations.pot (Esperanto) 2024-11-20 14:59:18 +02:00
Emmanouil Papadeas d25992130f New translations translations.pot (Pirate English) 2024-11-20 14:59:17 +02:00
Emmanouil Papadeas 3276316796 New translations translations.pot (Klingon) 2024-11-20 14:59:16 +02:00
Emmanouil Papadeas a740234401 New translations translations.pot (Welsh) 2024-11-20 14:59:15 +02:00
Emmanouil Papadeas 4cb97552fc New translations translations.pot (Malay) 2024-11-20 14:59:13 +02:00
Emmanouil Papadeas 54630152e1 New translations translations.pot (Hindi) 2024-11-20 14:59:12 +02:00
Emmanouil Papadeas b8b407d9cb New translations translations.pot (Latvian) 2024-11-20 14:59:11 +02:00
Emmanouil Papadeas aab2e9f98f New translations translations.pot (Estonian) 2024-11-20 14:59:10 +02:00
Emmanouil Papadeas eeee410bb6 New translations translations.pot (Croatian) 2024-11-20 14:59:09 +02:00
Emmanouil Papadeas 1b58048cdf New translations translations.pot (Thai) 2024-11-20 14:59:07 +02:00
Emmanouil Papadeas 9498458a8e New translations translations.pot (Marathi) 2024-11-20 14:59:06 +02:00
Emmanouil Papadeas 37998665df New translations translations.pot (Tamil) 2024-11-20 14:59:05 +02:00
Emmanouil Papadeas 2f0f0352ed New translations translations.pot (Indonesian) 2024-11-20 14:59:04 +02:00
Emmanouil Papadeas 450c134bf8 New translations translations.pot (Portuguese, Brazilian) 2024-11-20 14:59:02 +02:00
Emmanouil Papadeas a01edd8cde New translations translations.pot (Icelandic) 2024-11-20 14:59:01 +02:00
Emmanouil Papadeas 0b80c2a8a3 New translations translations.pot (Vietnamese) 2024-11-20 14:59:00 +02:00
Emmanouil Papadeas 2fcaa88f1f New translations translations.pot (Chinese Traditional) 2024-11-20 14:58:58 +02:00
Emmanouil Papadeas 345ae4b564 New translations translations.pot (Chinese Simplified) 2024-11-20 14:58:57 +02:00
Emmanouil Papadeas d1c0bdfadf New translations translations.pot (Turkish) 2024-11-20 14:58:56 +02:00
Emmanouil Papadeas 411732eb94 New translations translations.pot (Swedish) 2024-11-20 14:58:55 +02:00
Emmanouil Papadeas 02c4ead7a7 New translations translations.pot (Serbian (Cyrillic)) 2024-11-20 14:58:54 +02:00
Emmanouil Papadeas a8ba74618e New translations translations.pot (Albanian) 2024-11-20 14:58:52 +02:00
Emmanouil Papadeas c980a92de6 New translations translations.pot (Slovenian) 2024-11-20 14:58:51 +02:00
Emmanouil Papadeas 085cc9167d New translations translations.pot (Slovak) 2024-11-20 14:58:50 +02:00
Emmanouil Papadeas 4654afe60c New translations translations.pot (Portuguese) 2024-11-20 14:58:49 +02:00
Emmanouil Papadeas b37d100afa New translations translations.pot (Polish) 2024-11-20 14:58:48 +02:00
Emmanouil Papadeas a1902e0085 New translations translations.pot (Dutch) 2024-11-20 14:58:47 +02:00
Emmanouil Papadeas 1676cc9da6 New translations translations.pot (Macedonian) 2024-11-20 14:58:45 +02:00
Emmanouil Papadeas abbed6743f New translations translations.pot (Lithuanian) 2024-11-20 14:58:44 +02:00
Emmanouil Papadeas 55bb658407 New translations translations.pot (Korean) 2024-11-20 14:58:43 +02:00
Emmanouil Papadeas 7309f38d46 New translations translations.pot (Japanese) 2024-11-20 14:58:42 +02:00
Emmanouil Papadeas cdb3cc6f2d New translations translations.pot (Italian) 2024-11-20 14:58:41 +02:00
Emmanouil Papadeas ec86bbe4fc New translations translations.pot (Hungarian) 2024-11-20 14:58:40 +02:00
Emmanouil Papadeas a017e3df75 New translations translations.pot (Hebrew) 2024-11-20 14:58:38 +02:00
Emmanouil Papadeas 9c4be682f7 New translations translations.pot (Irish) 2024-11-20 14:58:37 +02:00
Emmanouil Papadeas 465501555a New translations translations.pot (Finnish) 2024-11-20 14:58:36 +02:00
Emmanouil Papadeas 171a8ffa1f New translations translations.pot (Greek) 2024-11-20 14:58:35 +02:00
Emmanouil Papadeas f037683da5 New translations translations.pot (German) 2024-11-20 14:58:33 +02:00
Emmanouil Papadeas 5313300a8c New translations translations.pot (Danish) 2024-11-20 14:58:31 +02:00
Emmanouil Papadeas f50eb3cd39 New translations translations.pot (Czech) 2024-11-20 14:58:30 +02:00
Emmanouil Papadeas af941f9080 New translations translations.pot (Catalan) 2024-11-20 14:58:29 +02:00
Emmanouil Papadeas 5293e55864 New translations translations.pot (Bulgarian) 2024-11-20 14:58:28 +02:00
Emmanouil Papadeas cb65ac97e0 New translations translations.pot (Belarusian) 2024-11-20 14:58:26 +02:00
Emmanouil Papadeas fa8c4014a3 New translations translations.pot (Arabic) 2024-11-20 14:58:25 +02:00
Emmanouil Papadeas 60b7fc80d0 New translations translations.pot (Afrikaans) 2024-11-20 14:58:23 +02:00
Emmanouil Papadeas 32fe10dedc New translations translations.pot (Spanish) 2024-11-20 14:58:22 +02:00
Emmanouil Papadeas 75cd9e4e4c New translations translations.pot (French) 2024-11-20 14:58:21 +02:00
Emmanouil Papadeas ff793dae23 New translations translations.pot (Romanian) 2024-11-20 14:58:19 +02:00
Emmanouil Papadeas e0f0a48359 New translations translations.pot (Ukrainian) 2024-11-20 14:58:18 +02:00
Emmanouil Papadeas eb1ce7f1ce New translations translations.pot (Russian) 2024-11-20 14:58:17 +02:00
Emmanouil Papadeas 2d28136449
Implement indexed mode (#1136)
* Create a custom PixeloramaImage class, initial support for indexed mode

* Convert opened projects and images to indexed mode

* Use shaders for RGB to Indexed conversion and vice versa

* Add `is_indexed` variable in PixeloramaImage

* Basic undo/redo support for indexed mode when drawing

* Make image effects respect indexed mode

* Move code from image effects to ShaderImageEffect instead

* Bucket tool works with indexed mode

* Move and selection tools works with indexed mode

* Brushes respect indexed mode

* Add color_mode variable and some helper methods in Project

Replace hard-coded cases of Image.FORMAT_RGBA8 with `Project.get_image_format()` just in case we want to add more formats in the future

* Add a helper new_empty_image() method to Project

* Set new images to indexed if the project is indexed

* Change color modes from the Image menu

* Fix open image to replace cel

* Load/save indices in pxo files

* Merging layers works with indexed mode

* Layer effects respect indexed mode

* Add an `other_image` parameter to `PixeloramaImage.add_data_to_dictionary()`

* Scale image works with indexed mode

* Resizing works with indexed mode

* Fix non-shader rotation not working with indexed mode

* Minor refactor of PixeloramaImage's set_pixelv_custom()

* Make the text tool work with indexed mode

* Remove print from PixeloramaImage

* Rename "PixeloramaImage" to "ImageExtended"

* Add docstrings in ImageExtended

* Set color mode from the create new image dialog

* Update Translations.pot

* Show the color mode in the project properties dialog
2024-11-20 14:41:37 +02:00
Emmanouil Papadeas 74d95c2424
[skip ci] Update Translations.pot 2024-11-19 16:00:28 +02:00
98 changed files with 1518 additions and 328 deletions

View file

@ -156,6 +156,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""
@ -1494,7 +1506,7 @@ msgstr ""
msgid "Text\n\n"
"%s for left mouse button\n"
"%s for right mouse button\n\n"
"%s for right mouse button"
msgstr ""
msgid "Rectangle"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Afrikaans\n"
"Language: af_ZA\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "Goed"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Arabic\n"
"Language: ar_SA\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "حسنا"
@ -167,6 +167,18 @@ msgstr "النقاط"
msgid "Percentage"
msgstr "نسبة"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Belarusian\n"
"Language: be_BY\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Пікселі"
msgid "Percentage"
msgstr "Працэнт"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Bulgarian\n"
"Language: bg_BG\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Catalan\n"
"Language: ca_ES\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "D'acord"
@ -167,6 +167,18 @@ msgstr "Píxels"
msgid "Percentage"
msgstr "Percentatge"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Czech\n"
"Language: cs_CZ\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Pixely"
msgid "Percentage"
msgstr "Procenta"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Oříznout na výběr"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Welsh\n"
"Language: cy_GB\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Danish\n"
"Language: da_DK\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Pixels"
msgid "Percentage"
msgstr "Procentdel"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: German\n"
"Language: de_DE\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -169,6 +169,18 @@ msgstr "Pixel"
msgid "Percentage"
msgstr "Prozent"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Auf Auswahl zuschneiden"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Greek\n"
"Language: el_GR\n"
"PO-Revision-Date: 2024-11-19 15:27\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "Εντάξει"
@ -169,6 +169,18 @@ msgstr "Εικονοστοιχεία"
msgid "Percentage"
msgstr "Ποσοστό"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Περικοπή στην επιλογή"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Pirate English\n"
"Language: en_PT\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Esperanto\n"
"Language: eo_UY\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "Bone"
@ -167,6 +167,18 @@ msgstr "Rastrumeroj"
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Spanish\n"
"Language: es_ES\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Píxeles"
msgid "Percentage"
msgstr "Porcentaje"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Recortar según la selección"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Estonian\n"
"Language: et_EE\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Finnish\n"
"Language: fi_FI\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Pikselit"
msgid "Percentage"
msgstr "Prosentti"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Filipino\n"
"Language: fil_PH\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: French\n"
"Language: fr_FR\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -168,6 +168,18 @@ msgstr "Pixels"
msgid "Percentage"
msgstr "Pourcentage"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Recadrer selon la Sélection"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Irish\n"
"Language: ga_IE\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Ancient Greek\n"
"Language: grc\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "Ἐντάξει"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Hebrew\n"
"Language: he_IL\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "אישור"
@ -167,6 +167,18 @@ msgstr "פיקסלים"
msgid "Percentage"
msgstr "אחוזים"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Hindi\n"
"Language: hi_IN\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "ठीक है"
@ -167,6 +167,18 @@ msgstr "पिक्सेल"
msgid "Percentage"
msgstr "प्रतिशत"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Croatian\n"
"Language: hr_HR\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Hungarian\n"
"Language: hu_HU\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "Ok"
@ -167,6 +167,18 @@ msgstr "Pixelek"
msgid "Percentage"
msgstr "Százalék"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Indonesian\n"
"Language: id_ID\n"
"PO-Revision-Date: 2024-11-20 03:03\n"
"PO-Revision-Date: 2024-11-20 14:24\n"
msgid "OK"
msgstr "Oke"
@ -169,6 +169,18 @@ msgstr "Piksel"
msgid "Percentage"
msgstr "Persentase"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr "Mode warna:"
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr "Mode Warna"
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr "Terindeks"
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Potong ke Seleksi"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Icelandic\n"
"Language: is_IS\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Italian\n"
"Language: it_IT\n"
"PO-Revision-Date: 2024-11-19 15:27\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -169,6 +169,18 @@ msgstr "Pixels"
msgid "Percentage"
msgstr "Percentuale"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Ritaglia selezione"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Japanese\n"
"Language: ja_JP\n"
"PO-Revision-Date: 2024-11-19 15:27\n"
"PO-Revision-Date: 2024-11-20 14:24\n"
msgid "OK"
msgstr "OK"
@ -169,6 +169,18 @@ msgstr "ピクセル"
msgid "Percentage"
msgstr "割合"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr "カラーモード:"
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr "カラーモード"
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr "インデックス付き"
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "選択範囲に合わせてトリミング"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Kazakh\n"
"Language: kk_KZ\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Korean\n"
"Language: ko_KR\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "예"
@ -167,6 +167,18 @@ msgstr "픽셀"
msgid "Percentage"
msgstr "비율"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Latin\n"
"Language: la_LA\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Lithuanian\n"
"Language: lt_LT\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Latvian\n"
"Language: lv_LV\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "Labi"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Maori\n"
"Language: mi_NZ\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Macedonian\n"
"Language: mk_MK\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Malayalam\n"
"Language: ml_IN\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "ഓക്കേ"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Marathi\n"
"Language: mr_IN\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Malay\n"
"Language: ms_MY\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Norwegian Bokmal\n"
"Language: nb_NO\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Piksler"
msgid "Percentage"
msgstr "Prosentandel"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Dutch\n"
"Language: nl_NL\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "Oké"
@ -167,6 +167,18 @@ msgstr "Pixels"
msgid "Percentage"
msgstr "Percentage"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Polish\n"
"Language: pl_PL\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -169,6 +169,18 @@ msgstr "Piksele"
msgid "Percentage"
msgstr "Procentowo"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Przytnij do zaznaczenia"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Portuguese, Brazilian\n"
"Language: pt_BR\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "OK"
@ -169,6 +169,18 @@ msgstr "Pixels"
msgid "Percentage"
msgstr "Porcentagem"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Cortar para a seleção"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Portuguese\n"
"Language: pt_PT\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Pixéis"
msgid "Percentage"
msgstr "Percentagem"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Romanian\n"
"Language: ro_RO\n"
"PO-Revision-Date: 2024-11-19 15:27\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr "Pixeli"
msgid "Percentage"
msgstr "Procentaj"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Trunchiere la selecție"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Russian\n"
"Language: ru_RU\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -168,6 +168,18 @@ msgstr "Пиксели"
msgid "Percentage"
msgstr "Процент"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Обрезать по выбранному"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Sinhala\n"
"Language: si_LK\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr "හරි"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Slovak\n"
"Language: sk_SK\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Slovenian\n"
"Language: sl_SI\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Albanian\n"
"Language: sq_AL\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "Ne rregull"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Serbian (Cyrillic)\n"
"Language: sr_SP\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "ОК"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr "Посто"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Swedish\n"
"Language: sv_SE\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "Okej"
@ -167,6 +167,18 @@ msgstr "Pixlar"
msgid "Percentage"
msgstr "Procent"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Swahili\n"
"Language: sw_KE\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Tamil\n"
"Language: ta_IN\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Thai\n"
"Language: th_TH\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Klingon\n"
"Language: tlh_AA\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:59\n"
msgid "OK"
msgstr ""
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Turkish\n"
"Language: tr_TR\n"
"PO-Revision-Date: 2024-11-19 15:27\n"
"PO-Revision-Date: 2024-11-20 14:24\n"
msgid "OK"
msgstr "Tamam"
@ -169,6 +169,18 @@ msgstr "Pikseller"
msgid "Percentage"
msgstr "Yüzde"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr "Renk kipi:"
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr "Renk Kipi"
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr "İndeksli"
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Seçime Kırp"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Ukrainian\n"
"Language: uk_UA\n"
"PO-Revision-Date: 2024-11-19 14:05\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "Гаразд"
@ -169,6 +169,18 @@ msgstr "Пікселі"
msgid "Percentage"
msgstr "Відсоток"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "Обрізати до виділеного"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Vietnamese\n"
"Language: vi_VN\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "OK"
@ -167,6 +167,18 @@ msgstr ""
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Chinese Simplified\n"
"Language: zh_CN\n"
"PO-Revision-Date: 2024-11-19 15:27\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "确定"
@ -169,6 +169,18 @@ msgstr "像素"
msgid "Percentage"
msgstr "百分比"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr "裁剪到选区"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Chinese Traditional\n"
"Language: zh_TW\n"
"PO-Revision-Date: 2024-11-19 14:06\n"
"PO-Revision-Date: 2024-11-20 12:58\n"
msgid "OK"
msgstr "確定"
@ -167,6 +167,18 @@ msgstr "像素"
msgid "Percentage"
msgstr ""
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:"
msgstr ""
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode"
msgstr ""
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed"
msgstr ""
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection"
msgstr ""

View file

@ -217,7 +217,7 @@ func get_ellipse_points_filled(pos: Vector2i, size: Vector2i, thickness := 1) ->
func scale_3x(sprite: Image, tol := 0.196078) -> Image:
var scaled := Image.create(
sprite.get_width() * 3, sprite.get_height() * 3, false, Image.FORMAT_RGBA8
sprite.get_width() * 3, sprite.get_height() * 3, sprite.has_mipmaps(), sprite.get_format()
)
var width_minus_one := sprite.get_width() - 1
var height_minus_one := sprite.get_height() - 1
@ -509,6 +509,8 @@ func similar_colors(c1: Color, c2: Color, tol := 0.392157) -> bool:
func center(indices: Array) -> void:
var project := Global.current_project
Global.canvas.selection.transform_content_confirm()
var redo_data := {}
var undo_data := {}
project.undos += 1
project.undo_redo.create_action("Center Frames")
for frame in indices:
@ -528,15 +530,20 @@ func center(indices: Array) -> void:
for cel in project.frames[frame].cels:
if not cel is PixelCel:
continue
var sprite := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
sprite.blend_rect(cel.image, used_rect, offset)
Global.undo_redo_compress_images({cel.image: sprite.data}, {cel.image: cel.image.data})
var cel_image := (cel as PixelCel).get_image()
var tmp_centered := project.new_empty_image()
tmp_centered.blend_rect(cel.image, used_rect, offset)
var centered := ImageExtended.new()
centered.copy_from_custom(tmp_centered, cel_image.is_indexed)
centered.add_data_to_dictionary(redo_data, cel_image)
cel_image.add_data_to_dictionary(undo_data)
Global.undo_redo_compress_images(redo_data, undo_data)
project.undo_redo.add_undo_method(Global.undo_or_redo.bind(true))
project.undo_redo.add_do_method(Global.undo_or_redo.bind(false))
project.undo_redo.commit_action()
func scale_image(width: int, height: int, interpolation: int) -> void:
func scale_project(width: int, height: int, interpolation: int) -> void:
var redo_data := {}
var undo_data := {}
for f in Global.current_project.frames:
@ -544,30 +551,47 @@ func scale_image(width: int, height: int, interpolation: int) -> void:
var cel := f.cels[i]
if not cel is PixelCel:
continue
var sprite := Image.new()
sprite.copy_from(cel.get_image())
if interpolation == Interpolation.SCALE3X:
var times := Vector2i(
ceili(width / (3.0 * sprite.get_width())),
ceili(height / (3.0 * sprite.get_height()))
)
for _j in range(maxi(times.x, times.y)):
sprite.copy_from(scale_3x(sprite))
sprite.resize(width, height, Image.INTERPOLATE_NEAREST)
elif interpolation == Interpolation.CLEANEDGE:
var gen := ShaderImageEffect.new()
gen.generate_image(sprite, clean_edge_shader, {}, Vector2i(width, height))
elif interpolation == Interpolation.OMNISCALE and omniscale_shader:
var gen := ShaderImageEffect.new()
gen.generate_image(sprite, omniscale_shader, {}, Vector2i(width, height))
else:
sprite.resize(width, height, interpolation)
redo_data[cel.image] = sprite.data
undo_data[cel.image] = cel.image.data
var cel_image := (cel as PixelCel).get_image()
var sprite := _resize_image(cel_image, width, height, interpolation) as ImageExtended
sprite.add_data_to_dictionary(redo_data, cel_image)
cel_image.add_data_to_dictionary(undo_data)
general_do_and_undo_scale(width, height, redo_data, undo_data)
func _resize_image(
image: Image, width: int, height: int, interpolation: Image.Interpolation
) -> Image:
var new_image: Image
if image is ImageExtended:
new_image = ImageExtended.new()
new_image.is_indexed = image.is_indexed
new_image.copy_from(image)
new_image.select_palette("", false)
else:
new_image = Image.new()
new_image.copy_from(image)
if interpolation == Interpolation.SCALE3X:
var times := Vector2i(
ceili(width / (3.0 * new_image.get_width())),
ceili(height / (3.0 * new_image.get_height()))
)
for _j in range(maxi(times.x, times.y)):
new_image.copy_from(scale_3x(new_image))
new_image.resize(width, height, Image.INTERPOLATE_NEAREST)
elif interpolation == Interpolation.CLEANEDGE:
var gen := ShaderImageEffect.new()
gen.generate_image(new_image, clean_edge_shader, {}, Vector2i(width, height), false)
elif interpolation == Interpolation.OMNISCALE and omniscale_shader:
var gen := ShaderImageEffect.new()
gen.generate_image(new_image, omniscale_shader, {}, Vector2i(width, height), false)
else:
new_image.resize(width, height, interpolation)
if new_image is ImageExtended:
new_image.on_size_changed()
return new_image
## Sets the size of the project to be the same as the size of the active selection.
func crop_to_selection() -> void:
if not Global.current_project.has_selection:
@ -577,13 +601,13 @@ func crop_to_selection() -> void:
Global.canvas.selection.transform_content_confirm()
var rect: Rect2i = Global.canvas.selection.big_bounding_rectangle
# Loop through all the cels to crop them
for f in Global.current_project.frames:
for cel in f.cels:
if not cel is PixelCel:
continue
var sprite := cel.get_image().get_region(rect)
redo_data[cel.image] = sprite.data
undo_data[cel.image] = cel.image.data
for cel in Global.current_project.get_all_pixel_cels():
var cel_image := cel.get_image()
var tmp_cropped := cel_image.get_region(rect)
var cropped := ImageExtended.new()
cropped.copy_from_custom(tmp_cropped, cel_image.is_indexed)
cropped.add_data_to_dictionary(redo_data, cel_image)
cel_image.add_data_to_dictionary(undo_data)
general_do_and_undo_scale(rect.size.x, rect.size.y, redo_data, undo_data)
@ -615,13 +639,13 @@ func crop_to_content() -> void:
var redo_data := {}
var undo_data := {}
# Loop through all the cels to trim them
for f in Global.current_project.frames:
for cel in f.cels:
if not cel is PixelCel:
continue
var sprite := cel.get_image().get_region(used_rect)
redo_data[cel.image] = sprite.data
undo_data[cel.image] = cel.image.data
for cel in Global.current_project.get_all_pixel_cels():
var cel_image := cel.get_image()
var tmp_cropped := cel_image.get_region(used_rect)
var cropped := ImageExtended.new()
cropped.copy_from_custom(tmp_cropped, cel_image.is_indexed)
cropped.add_data_to_dictionary(redo_data, cel_image)
cel_image.add_data_to_dictionary(undo_data)
general_do_and_undo_scale(width, height, redo_data, undo_data)
@ -629,18 +653,17 @@ func crop_to_content() -> void:
func resize_canvas(width: int, height: int, offset_x: int, offset_y: int) -> void:
var redo_data := {}
var undo_data := {}
for f in Global.current_project.frames:
for cel in f.cels:
if not cel is PixelCel:
continue
var sprite := Image.create(width, height, false, Image.FORMAT_RGBA8)
sprite.blend_rect(
cel.get_image(),
Rect2i(Vector2i.ZERO, Global.current_project.size),
Vector2i(offset_x, offset_y)
)
redo_data[cel.image] = sprite.data
undo_data[cel.image] = cel.image.data
for cel in Global.current_project.get_all_pixel_cels():
var cel_image := cel.get_image()
var resized := ImageExtended.create_custom(
width, height, cel_image.has_mipmaps(), cel_image.get_format(), cel_image.is_indexed
)
resized.blend_rect(
cel_image, Rect2i(Vector2i.ZERO, cel_image.get_size()), Vector2i(offset_x, offset_y)
)
resized.convert_rgb_to_indexed()
resized.add_data_to_dictionary(redo_data, cel_image)
cel_image.add_data_to_dictionary(undo_data)
general_do_and_undo_scale(width, height, redo_data, undo_data)

View file

@ -161,7 +161,7 @@ func cache_blended_frames(project := Global.current_project) -> void:
blended_frames.clear()
var frames := _calculate_frames(project)
for frame in frames:
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var image := project.new_empty_image()
_blend_layers(image, frame)
blended_frames[frame] = image
@ -208,7 +208,7 @@ func process_spritesheet(project := Global.current_project) -> void:
spritesheet_columns = temp
var width := project.size.x * spritesheet_columns
var height := project.size.y * spritesheet_rows
var whole_image := Image.create(width, height, false, Image.FORMAT_RGBA8)
var whole_image := Image.create(width, height, false, project.get_image_format())
var origin := Vector2i.ZERO
var hh := 0
var vv := 0
@ -287,10 +287,10 @@ func process_animation(project := Global.current_project) -> void:
ProcessedImage.new(image, project.frames.find(frame), duration)
)
else:
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var image := project.new_empty_image()
image.copy_from(blended_frames[frame])
if erase_unselected_area and project.has_selection:
var crop := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var crop := project.new_empty_image()
var selection_image = project.selection_map.return_cropped_copy(project.size)
crop.blit_rect_mask(
image, selection_image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO

View file

@ -46,6 +46,7 @@ enum WindowMenu { WINDOW_OPACITY, PANELS, LAYOUTS, MOVABLE_PANELS, ZEN_MODE, FUL
## Enumeration of items present in the Image Menu.
enum ImageMenu {
PROJECT_PROPERTIES,
COLOR_MODE,
RESIZE_CANVAS,
SCALE_IMAGE,
CROP_TO_SELECTION,
@ -1113,8 +1114,17 @@ func undo_redo_compress_images(
func undo_redo_draw_op(
image: Image, new_size: Vector2i, compressed_image_data: PackedByteArray, buffer_size: int
) -> void:
var decompressed := compressed_image_data.decompress(buffer_size)
image.set_data(new_size.x, new_size.y, image.has_mipmaps(), image.get_format(), decompressed)
if image is ImageExtended and image.is_indexed:
# If using indexed mode,
# just convert the indices to RGB instead of setting the image data directly.
if image.get_size() != new_size:
image.crop(new_size.x, new_size.y)
image.convert_indexed_to_rgb()
else:
var decompressed := compressed_image_data.decompress(buffer_size)
image.set_data(
new_size.x, new_size.y, image.has_mipmaps(), image.get_format(), decompressed
)
## This method is used to write project setting overrides to the override.cfg file, located

View file

@ -150,7 +150,7 @@ func handle_loading_aimg(path: String, frames: Array) -> void:
if not frames_agree:
frame.duration = aimg_frame.duration * project.fps
var content := aimg_frame.content
content.convert(Image.FORMAT_RGBA8)
content.convert(project.get_image_format())
frame.cels.append(PixelCel.new(content, 1))
project.frames.append(frame)
@ -389,18 +389,23 @@ func save_pxo_file(
var frame_index := 1
for frame in project.frames:
if not autosave and include_blended:
var blended := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var blended := project.new_empty_image()
DrawingAlgos.blend_layers(blended, frame, Vector2i.ZERO, project)
zip_packer.start_file("image_data/final_images/%s" % frame_index)
zip_packer.write_file(blended.get_data())
zip_packer.close_file()
var cel_index := 1
for cel in frame.cels:
var cel_image := cel.get_image()
var cel_image := cel.get_image() as ImageExtended
if is_instance_valid(cel_image) and cel is PixelCel:
zip_packer.start_file("image_data/frames/%s/layer_%s" % [frame_index, cel_index])
zip_packer.write_file(cel_image.get_data())
zip_packer.close_file()
zip_packer.start_file(
"image_data/frames/%s/indices_layer_%s" % [frame_index, cel_index]
)
zip_packer.write_file(cel_image.indices_image.get_data())
zip_packer.close_file()
cel_index += 1
frame_index += 1
var brush_index := 0
@ -457,12 +462,13 @@ func save_pxo_file(
func open_image_as_new_tab(path: String, image: Image) -> void:
var project := Project.new([], path.get_file(), image.get_size())
project.layers.append(PixelLayer.new(project))
var layer := PixelLayer.new(project)
project.layers.append(layer)
Global.projects.append(project)
var frame := Frame.new()
image.convert(Image.FORMAT_RGBA8)
frame.cels.append(PixelCel.new(image, 1))
image.convert(project.get_image_format())
frame.cels.append(layer.new_cel_from_image(image))
project.frames.append(frame)
set_new_imported_tab(project, path)
@ -475,15 +481,18 @@ func open_image_as_spritesheet_tab_smart(
frame_size = image.get_size()
sliced_rects.append(Rect2i(Vector2i.ZERO, frame_size))
var project := Project.new([], path.get_file(), frame_size)
project.layers.append(PixelLayer.new(project))
var layer := PixelLayer.new(project)
project.layers.append(layer)
Global.projects.append(project)
for rect in sliced_rects:
var offset: Vector2 = (0.5 * (frame_size - rect.size)).floor()
var frame := Frame.new()
var cropped_image := Image.create(frame_size.x, frame_size.y, false, Image.FORMAT_RGBA8)
image.convert(Image.FORMAT_RGBA8)
var cropped_image := Image.create(
frame_size.x, frame_size.y, false, project.get_image_format()
)
image.convert(project.get_image_format())
cropped_image.blit_rect(image, rect, offset)
frame.cels.append(PixelCel.new(cropped_image, 1))
frame.cels.append(layer.new_cel_from_image(cropped_image))
project.frames.append(frame)
set_new_imported_tab(project, path)
@ -494,7 +503,8 @@ func open_image_as_spritesheet_tab(path: String, image: Image, horiz: int, vert:
var frame_width := image.get_size().x / horiz
var frame_height := image.get_size().y / vert
var project := Project.new([], path.get_file(), Vector2(frame_width, frame_height))
project.layers.append(PixelLayer.new(project))
var layer := PixelLayer.new(project)
project.layers.append(layer)
Global.projects.append(project)
for yy in range(vert):
for xx in range(horiz):
@ -503,8 +513,8 @@ func open_image_as_spritesheet_tab(path: String, image: Image, horiz: int, vert:
Rect2i(frame_width * xx, frame_height * yy, frame_width, frame_height)
)
project.size = cropped_image.get_size()
cropped_image.convert(Image.FORMAT_RGBA8)
frame.cels.append(PixelCel.new(cropped_image, 1))
cropped_image.convert(project.get_image_format())
frame.cels.append(layer.new_cel_from_image(cropped_image))
project.frames.append(frame)
set_new_imported_tab(project, path)
@ -562,12 +572,12 @@ func open_image_as_spritesheet_layer_smart(
if f >= start_frame and f < (start_frame + sliced_rects.size()):
# Slice spritesheet
var offset: Vector2 = (0.5 * (frame_size - sliced_rects[f - start_frame].size)).floor()
image.convert(Image.FORMAT_RGBA8)
image.convert(project.get_image_format())
var cropped_image := Image.create(
project_width, project_height, false, Image.FORMAT_RGBA8
project_width, project_height, false, project.get_image_format()
)
cropped_image.blit_rect(image, sliced_rects[f - start_frame], offset)
cels.append(PixelCel.new(cropped_image))
cels.append(layer.new_cel_from_image(cropped_image))
else:
cels.append(layer.new_empty_cel())
@ -644,16 +654,16 @@ func open_image_as_spritesheet_layer(
# Slice spritesheet
var xx := (f - start_frame) % horizontal
var yy := (f - start_frame) / horizontal
image.convert(Image.FORMAT_RGBA8)
image.convert(project.get_image_format())
var cropped_image := Image.create(
project_width, project_height, false, Image.FORMAT_RGBA8
project_width, project_height, false, project.get_image_format()
)
cropped_image.blit_rect(
image,
Rect2i(frame_width * xx, frame_height * yy, frame_width, frame_height),
Vector2i.ZERO
)
cels.append(PixelCel.new(cropped_image))
cels.append(layer.new_cel_from_image(cropped_image))
else:
cels.append(layer.new_empty_cel())
@ -687,12 +697,18 @@ func open_image_at_cel(image: Image, layer_index := 0, frame_index := 0) -> void
var cel := project.frames[frame_index].cels[layer_index]
if not cel is PixelCel:
return
image.convert(Image.FORMAT_RGBA8)
var cel_image := Image.create(project_width, project_height, false, Image.FORMAT_RGBA8)
cel_image.blit_rect(image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO)
Global.undo_redo_compress_images(
{cel.image: cel_image.data}, {cel.image: cel.image.data}, project
image.convert(project.get_image_format())
var cel_image := (cel as PixelCel).get_image()
var new_cel_image := ImageExtended.create_custom(
project_width, project_height, false, project.get_image_format(), cel_image.is_indexed
)
new_cel_image.blit_rect(image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO)
new_cel_image.convert_rgb_to_indexed()
var redo_data := {}
new_cel_image.add_data_to_dictionary(redo_data, cel_image)
var undo_data := {}
cel_image.add_data_to_dictionary(undo_data)
Global.undo_redo_compress_images(redo_data, undo_data, project)
project.undo_redo.add_do_property(project, "selected_cels", [])
project.undo_redo.add_do_method(project.change_cel.bind(frame_index, layer_index))
@ -716,11 +732,14 @@ func open_image_as_new_frame(
var frame := Frame.new()
for i in project.layers.size():
if i == layer_index:
image.convert(Image.FORMAT_RGBA8)
var cel_image := Image.create(project_width, project_height, false, Image.FORMAT_RGBA8)
var layer := project.layers[i]
if i == layer_index and layer is PixelLayer:
image.convert(project.get_image_format())
var cel_image := Image.create(
project_width, project_height, false, project.get_image_format()
)
cel_image.blit_rect(image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO)
frame.cels.append(PixelCel.new(cel_image, 1))
frame.cels.append(layer.new_cel_from_image(cel_image))
else:
frame.cels.append(project.layers[i].new_empty_cel())
if not undo:
@ -753,10 +772,12 @@ func open_image_as_new_layer(image: Image, file_name: String, frame_index := 0)
Global.current_project.undo_redo.create_action("Add Layer")
for i in project.frames.size():
if i == frame_index:
image.convert(Image.FORMAT_RGBA8)
var cel_image := Image.create(project_width, project_height, false, Image.FORMAT_RGBA8)
image.convert(project.get_image_format())
var cel_image := Image.create(
project_width, project_height, false, project.get_image_format()
)
cel_image.blit_rect(image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO)
cels.append(PixelCel.new(cel_image, 1))
cels.append(layer.new_cel_from_image(cel_image))
else:
cels.append(layer.new_empty_cel())

View file

@ -10,9 +10,7 @@ func _init(_opacity := 1.0) -> void:
func get_image() -> Image:
var image := Image.create(
Global.current_project.size.x, Global.current_project.size.y, false, Image.FORMAT_RGBA8
)
var image := Global.current_project.new_empty_image()
return image

View file

@ -4,17 +4,17 @@ extends BaseCel
## The term "cel" comes from "celluloid" (https://en.wikipedia.org/wiki/Cel).
## This variable is where the image data of the cel are.
var image: Image:
var image: ImageExtended:
set = image_changed
func _init(_image := Image.new(), _opacity := 1.0) -> void:
func _init(_image: ImageExtended, _opacity := 1.0) -> void:
image_texture = ImageTexture.new()
image = _image # Set image and call setter
opacity = _opacity
func image_changed(value: Image) -> void:
func image_changed(value: ImageExtended) -> void:
image = value
if not image.is_empty() and is_instance_valid(image_texture):
image_texture.set_image(image)
@ -48,7 +48,7 @@ func copy_content():
return copy_image
func get_image() -> Image:
func get_image() -> ImageExtended:
return image

View file

@ -27,12 +27,12 @@ class ColorOp:
class SimpleDrawer:
func set_pixel(image: Image, position: Vector2i, color: Color, op: ColorOp) -> void:
func set_pixel(image: ImageExtended, position: Vector2i, color: Color, op: ColorOp) -> void:
var color_old := image.get_pixelv(position)
var color_str := color.to_html()
var color_new := op.process(Color(color_str), color_old)
if not color_new.is_equal_approx(color_old):
image.set_pixelv(position, color_new)
image.set_pixelv_custom(position, color_new)
class PixelPerfectDrawer:
@ -43,11 +43,11 @@ class PixelPerfectDrawer:
func reset() -> void:
last_pixels = [null, null]
func set_pixel(image: Image, position: Vector2i, color: Color, op: ColorOp) -> void:
func set_pixel(image: ImageExtended, position: Vector2i, color: Color, op: ColorOp) -> void:
var color_old := image.get_pixelv(position)
var color_str := color.to_html()
last_pixels.push_back([position, color_old])
image.set_pixelv(position, op.process(Color(color_str), color_old))
image.set_pixelv_custom(position, op.process(Color(color_str), color_old))
var corner = last_pixels.pop_front()
var neighbour = last_pixels[0]
@ -56,7 +56,7 @@ class PixelPerfectDrawer:
return
if position - corner[0] in CORNERS and position - neighbour[0] in NEIGHBOURS:
image.set_pixel(neighbour[0].x, neighbour[0].y, neighbour[1])
image.set_pixel_custom(neighbour[0].x, neighbour[0].y, neighbour[1])
last_pixels[0] = corner

View file

@ -170,12 +170,12 @@ func _get_undo_data(project: Project) -> Dictionary:
var data := {}
var images := _get_selected_draw_images(project)
for image in images:
data[image] = image.data
image.add_data_to_dictionary(data)
return data
func _get_selected_draw_images(project: Project) -> Array[Image]:
var images: Array[Image] = []
func _get_selected_draw_images(project: Project) -> Array[ImageExtended]:
var images: Array[ImageExtended] = []
if affect == SELECTED_CELS:
for cel_index in project.selected_cels:
var cel: BaseCel = project.frames[cel_index[0]].cels[cel_index[1]]

View file

@ -0,0 +1,176 @@
class_name ImageExtended
extends Image
## A custom [Image] class that implements support for indexed mode.
## Before implementing indexed mode, we just used the [Image] class.
## In indexed mode, each pixel is assigned to a number that references a palette color.
## This essentially means that the colors of the image are restricted to a specific palette,
## and they will automatically get updated when you make changes to that palette, or when
## you switch to a different one.
const TRANSPARENT := Color(0)
const SET_INDICES := preload("res://src/Shaders/SetIndices.gdshader")
const INDEXED_TO_RGB := preload("res://src/Shaders/IndexedToRGB.gdshader")
## If [code]true[/code], the image uses indexed mode.
var is_indexed := false
## The [Palette] the image is currently using for indexed mode.
var current_palette := Palettes.current_palette
## An [Image] that contains the index of each pixel of the main image for indexed mode.
## The indices are stored in the red channel of this image, by diving each index by 255.
## This means that there can be a maximum index size of 255. 0 means that the pixel is transparent.
var indices_image := Image.create_empty(1, 1, false, Image.FORMAT_R8)
## A [PackedColorArray] containing all of the colors of the [member current_palette].
var palette := PackedColorArray()
func _init() -> void:
indices_image.fill(TRANSPARENT)
Palettes.palette_selected.connect(select_palette)
## Equivalent of [method Image.create_empty], but returns [ImageExtended] instead.
## If [param _is_indexed] is [code]true[/code], the image that is being returned uses indexed mode.
static func create_custom(
width: int, height: int, mipmaps: bool, format: Image.Format, _is_indexed := false
) -> ImageExtended:
var new_image := ImageExtended.new()
new_image.crop(width, height)
if mipmaps:
new_image.generate_mipmaps()
new_image.convert(format)
new_image.fill(TRANSPARENT)
new_image.is_indexed = _is_indexed
if new_image.is_indexed:
new_image.resize_indices()
new_image.select_palette("", false)
return new_image
## Equivalent of [method Image.copy_from], but also handles the logic necessary for indexed mode.
## If [param _is_indexed] is [code]true[/code], the image is set to be using indexed mode.
func copy_from_custom(image: Image, indexed := is_indexed) -> void:
is_indexed = indexed
copy_from(image)
if is_indexed:
resize_indices()
select_palette("", false)
convert_rgb_to_indexed()
## Selects a new palette to use in indexed mode.
func select_palette(_name: String, convert_to_rgb := true) -> void:
current_palette = Palettes.current_palette
if not is_instance_valid(current_palette) or not is_indexed:
return
update_palette()
if not current_palette.data_changed.is_connected(update_palette):
current_palette.data_changed.connect(update_palette)
if not current_palette.data_changed.is_connected(convert_indexed_to_rgb):
current_palette.data_changed.connect(convert_indexed_to_rgb)
if convert_to_rgb:
convert_indexed_to_rgb()
## Updates [member palette] to contain the colors of [member current_palette].
func update_palette() -> void:
if palette.size() != current_palette.colors.size():
palette.resize(current_palette.colors.size())
for i in current_palette.colors:
palette[i] = current_palette.colors[i].color
## Displays the actual RGBA values of each pixel in the image from indexed mode.
func convert_indexed_to_rgb() -> void:
if not is_indexed:
return
var palette_image := Palettes.current_palette.convert_to_image()
var palette_texture := ImageTexture.create_from_image(palette_image)
var shader_image_effect := ShaderImageEffect.new()
var indices_texture := ImageTexture.create_from_image(indices_image)
var params := {"palette_texture": palette_texture, "indices_texture": indices_texture}
shader_image_effect.generate_image(self, INDEXED_TO_RGB, params, get_size(), false)
Global.canvas.queue_redraw()
## Automatically maps each color of the image's pixel to the closest color of the palette,
## by finding the palette color's index and storing it in [member indices_image].
func convert_rgb_to_indexed() -> void:
if not is_indexed:
return
var palette_image := Palettes.current_palette.convert_to_image()
var palette_texture := ImageTexture.create_from_image(palette_image)
var params := {
"palette_texture": palette_texture, "rgb_texture": ImageTexture.create_from_image(self)
}
var shader_image_effect := ShaderImageEffect.new()
shader_image_effect.generate_image(
indices_image, SET_INDICES, params, indices_image.get_size(), false
)
convert_indexed_to_rgb()
## Resizes indices and calls [method convert_rgb_to_indexed] when the image's size changes
## and indexed mode is enabled.
func on_size_changed() -> void:
if is_indexed:
resize_indices()
convert_rgb_to_indexed()
## Resizes [indices_image] to the image's size.
func resize_indices() -> void:
indices_image.crop(get_width(), get_height())
## Equivalent of [method Image.set_pixel_custom],
## but also handles the logic necessary for indexed mode.
func set_pixel_custom(x: int, y: int, color: Color) -> void:
set_pixelv_custom(Vector2i(x, y), color)
## Equivalent of [method Image.set_pixelv_custom],
## but also handles the logic necessary for indexed mode.
func set_pixelv_custom(point: Vector2i, color: Color) -> void:
var new_color := color
if is_indexed:
var color_to_fill := TRANSPARENT
var color_index := 0
if not color.is_equal_approx(TRANSPARENT):
if palette.has(color):
color_index = palette.find(color)
else: # Find the most similar color
var smaller_distance := color_distance(color, palette[0])
for i in palette.size():
var swatch := palette[i]
if is_zero_approx(swatch.a): # Skip transparent colors
continue
var dist := color_distance(color, swatch)
if dist < smaller_distance:
smaller_distance = dist
color_index = i
indices_image.set_pixelv(point, Color((color_index + 1) / 255.0, 0, 0, 0))
color_to_fill = palette[color_index]
new_color = color_to_fill
else:
indices_image.set_pixelv(point, TRANSPARENT)
new_color = TRANSPARENT
set_pixelv(point, new_color)
## Finds the distance between colors [param c1] and [param c2].
func color_distance(c1: Color, c2: Color) -> float:
var v1 := Vector4(c1.r, c1.g, c1.b, c1.a)
var v2 := Vector4(c2.r, c2.g, c2.b, c2.a)
return v2.distance_to(v1)
## Adds image data to a [param dict] [Dictionary]. Used for undo/redo.
func add_data_to_dictionary(dict: Dictionary, other_image: ImageExtended = null) -> void:
# The order matters! Setting self's data first would make undo/redo appear to work incorrectly.
if is_instance_valid(other_image):
dict[other_image.indices_image] = indices_image.data
dict[other_image] = data
else:
dict[indices_image] = indices_image.data
dict[self] = data

View file

@ -218,11 +218,16 @@ func link_cel(cel: BaseCel, link_set = null) -> void:
## This method is not destructive as it does NOT change the data of the image,
## it just returns a copy.
func display_effects(cel: BaseCel, image_override: Image = null) -> Image:
var image := Image.new()
var image := ImageExtended.new()
if is_instance_valid(image_override):
image.copy_from(image_override)
if image_override is ImageExtended:
image.is_indexed = image_override.is_indexed
image.copy_from_custom(image_override)
else:
image.copy_from(cel.get_image())
var cel_image := cel.get_image()
if cel_image is ImageExtended:
image.is_indexed = cel_image.is_indexed
image.copy_from_custom(cel_image)
if not effects_enabled:
return image
var image_size := image.get_size()

View file

@ -13,7 +13,9 @@ func _init(_project: Project, _name := "") -> void:
## Blends all of the images of children layer of the group layer into a single image.
func blend_children(frame: Frame, origin := Vector2i.ZERO, apply_effects := true) -> Image:
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var image := ImageExtended.create_custom(
project.size.x, project.size.y, false, project.get_image_format(), project.is_indexed()
)
var children := get_children(false)
if children.size() <= 0:
return image
@ -66,7 +68,7 @@ func blend_children(frame: Frame, origin := Vector2i.ZERO, apply_effects := true
func _include_child_in_blending(
image: Image,
image: ImageExtended,
layer: BaseLayer,
frame: Frame,
textures: Array[Image],
@ -100,7 +102,7 @@ func _include_child_in_blending(
## Gets called recursively if the child group has children groups of its own,
## and they are also set to pass through mode.
func _blend_child_group(
image: Image,
image: ImageExtended,
layer: BaseLayer,
frame: Frame,
textures: Array[Image],

View file

@ -28,9 +28,19 @@ func get_layer_type() -> int:
func new_empty_cel() -> BaseCel:
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var format := project.get_image_format()
var is_indexed := project.is_indexed()
var image := ImageExtended.create_custom(
project.size.x, project.size.y, false, format, is_indexed
)
return PixelCel.new(image)
func new_cel_from_image(image: Image) -> PixelCel:
var pixelorama_image := ImageExtended.new()
pixelorama_image.copy_from_custom(image, project.is_indexed())
return PixelCel.new(pixelorama_image)
func can_layer_get_drawn() -> bool:
return is_visible_in_hierarchy() && !is_locked_in_hierarchy()

View file

@ -9,6 +9,8 @@ signal about_to_deserialize(dict: Dictionary)
signal resized
signal timeline_updated
const INDEXED_MODE := Image.FORMAT_MAX + 1
var name := "":
set(value):
name = value
@ -21,6 +23,17 @@ var undo_redo := UndoRedo.new()
var tiles: Tiles
var undos := 0 ## The number of times we added undo properties
var can_undo := true
var color_mode: int = Image.FORMAT_RGBA8:
set(value):
if color_mode != value:
color_mode = value
for cel in get_all_pixel_cels():
var image := cel.get_image()
image.is_indexed = is_indexed()
if image.is_indexed:
image.resize_indices()
image.select_palette("", false)
image.convert_rgb_to_indexed()
var fill_color := Color(0)
var has_changed := false:
set(value):
@ -176,11 +189,26 @@ func new_empty_frame() -> Frame:
return frame
## Returns a new [Image] of size [member size] and format [method get_image_format].
func new_empty_image() -> Image:
return Image.create(size.x, size.y, false, get_image_format())
## Returns the currently selected [BaseCel].
func get_current_cel() -> BaseCel:
return frames[current_frame].cels[current_layer]
func get_image_format() -> Image.Format:
if color_mode == INDEXED_MODE:
return Image.FORMAT_RGBA8
return color_mode
func is_indexed() -> bool:
return color_mode == INDEXED_MODE
func selection_map_changed() -> void:
var image_texture: ImageTexture
has_selection = !selection_map.is_invisible()
@ -255,6 +283,7 @@ func serialize() -> Dictionary:
"pxo_version": ProjectSettings.get_setting("application/config/Pxo_Version"),
"size_x": size.x,
"size_y": size.y,
"color_mode": color_mode,
"tile_mode_x_basis_x": tiles.x_basis.x,
"tile_mode_x_basis_y": tiles.x_basis.y,
"tile_mode_y_basis_x": tiles.y_basis.x,
@ -288,6 +317,7 @@ func deserialize(dict: Dictionary, zip_reader: ZIPReader = null, file: FileAcces
size.y = dict.size_y
tiles.tile_size = size
selection_map.crop(size.x, size.y)
color_mode = dict.get("color_mode", color_mode)
if dict.has("tile_mode_x_basis_x") and dict.has("tile_mode_x_basis_y"):
tiles.x_basis.x = dict.tile_mode_x_basis_x
tiles.x_basis.y = dict.tile_mode_x_basis_y
@ -311,20 +341,33 @@ func deserialize(dict: Dictionary, zip_reader: ZIPReader = null, file: FileAcces
for cel in frame.cels:
match int(dict.layers[cel_i].get("type", Global.LayerTypes.PIXEL)):
Global.LayerTypes.PIXEL:
var image := Image.new()
var image: Image
var indices_data := PackedByteArray()
if is_instance_valid(zip_reader): # For pxo files saved in 1.0+
var image_data := zip_reader.read_file(
"image_data/frames/%s/layer_%s" % [frame_i + 1, cel_i + 1]
)
var path := "image_data/frames/%s/layer_%s" % [frame_i + 1, cel_i + 1]
var image_data := zip_reader.read_file(path)
image = Image.create_from_data(
size.x, size.y, false, Image.FORMAT_RGBA8, image_data
size.x, size.y, false, get_image_format(), image_data
)
var indices_path := (
"image_data/frames/%s/indices_layer_%s" % [frame_i + 1, cel_i + 1]
)
if zip_reader.file_exists(indices_path):
indices_data = zip_reader.read_file(indices_path)
elif is_instance_valid(file): # For pxo files saved in 0.x
var buffer := file.get_buffer(size.x * size.y * 4)
image = Image.create_from_data(
size.x, size.y, false, Image.FORMAT_RGBA8, buffer
size.x, size.y, false, get_image_format(), buffer
)
cels.append(PixelCel.new(image))
var pixelorama_image := ImageExtended.new()
pixelorama_image.is_indexed = is_indexed()
if not indices_data.is_empty() and is_indexed():
pixelorama_image.indices_image = Image.create_from_data(
size.x, size.y, false, Image.FORMAT_R8, indices_data
)
pixelorama_image.copy_from(image)
pixelorama_image.select_palette("", true)
cels.append(PixelCel.new(pixelorama_image))
Global.LayerTypes.GROUP:
cels.append(GroupCel.new())
Global.LayerTypes.THREE_D:
@ -559,6 +602,16 @@ func find_first_drawable_cel(frame := frames[current_frame]) -> BaseCel:
return result
## Returns an [Array] of type [PixelCel] containing all of the pixel cels of the project.
func get_all_pixel_cels() -> Array[PixelCel]:
var cels: Array[PixelCel]
for frame in frames:
for cel in frame.cels:
if cel is PixelCel:
cels.append(cel)
return cels
## Re-order layers to take each cel's z-index into account. If all z-indexes are 0,
## then the order of drawing is the same as the order of the layers itself.
func order_layers(frame_index := current_frame) -> void:

View file

@ -5,7 +5,9 @@ extends RefCounted
signal done
func generate_image(img: Image, shader: Shader, params: Dictionary, size: Vector2i) -> void:
func generate_image(
img: Image, shader: Shader, params: Dictionary, size: Vector2i, respect_indexed := true
) -> void:
# duplicate shader before modifying code to avoid affecting original resource
var resized_width := false
var resized_height := false
@ -60,4 +62,6 @@ func generate_image(img: Image, shader: Shader, params: Dictionary, size: Vector
img.crop(img.get_width() - 1, img.get_height())
if resized_height:
img.crop(img.get_width(), img.get_height() - 1)
if img is ImageExtended and respect_indexed:
img.convert_rgb_to_indexed()
done.emit()

View file

@ -3,6 +3,7 @@
shader_type canvas_item;
render_mode unshaded;
#include "res://src/Shaders/FindPaletteColorIndex.gdshaderinc"
uniform sampler2D palette_texture : filter_nearest;
uniform sampler2D selection : filter_nearest;
@ -10,18 +11,9 @@ vec4 swap_color(vec4 color) {
if (color.a <= 0.01) {
return color;
}
int color_index = 0;
int n_of_colors = textureSize(palette_texture, 0).x;
float smaller_distance = distance(color, texture(palette_texture, vec2(0.0)));
for (int i = 0; i <= n_of_colors; i++) {
vec2 uv = vec2(float(i) / float(n_of_colors), 0.0);
vec4 palette_color = texture(palette_texture, uv);
float dist = distance(color, palette_color);
if (dist < smaller_distance) {
smaller_distance = dist;
color_index = i;
}
}
int color_index = find_index(color, n_of_colors, palette_texture);
return texture(palette_texture, vec2(float(color_index) / float(n_of_colors), 0.0));
}

View file

@ -0,0 +1,14 @@
int find_index(vec4 color, int n_of_colors, sampler2D palette_texture) {
int color_index = 0;
float smaller_distance = distance(color, texture(palette_texture, vec2(0.0)));
for (int i = 0; i <= n_of_colors; i++) {
vec2 uv = vec2(float(i) / float(n_of_colors), 0.0);
vec4 palette_color = texture(palette_texture, uv);
float dist = distance(color, palette_color);
if (dist < smaller_distance) {
smaller_distance = dist;
color_index = i;
}
}
return color_index;
}

View file

@ -0,0 +1,28 @@
shader_type canvas_item;
render_mode unshaded;
const float EPSILON = 0.0001;
uniform sampler2D palette_texture : filter_nearest;
uniform sampler2D indices_texture : filter_nearest;
void fragment() {
float index = texture(indices_texture, UV).r;
if (index <= EPSILON) { // If index is zero, make it transparent
COLOR = vec4(0.0);
}
else {
float n_of_colors = float(textureSize(palette_texture, 0).x);
index -= 1.0 / 255.0;
float index_normalized = ((index * 255.0)) / n_of_colors;
if (index_normalized + EPSILON < 1.0) {
COLOR = texture(palette_texture, vec2(index_normalized + EPSILON, 0.0));
}
else {
// If index is bigger than the size of the palette, make it transparent.
// This happens when switching to a palette, where the previous palette was bigger
// than the newer one, and the current index is out of bounds of the new one.
COLOR = vec4(0.0);
}
}
}

View file

@ -0,0 +1,18 @@
shader_type canvas_item;
render_mode unshaded;
#include "res://src/Shaders/FindPaletteColorIndex.gdshaderinc"
uniform sampler2D rgb_texture : filter_nearest;
uniform sampler2D palette_texture : filter_nearest;
void fragment() {
vec4 color = texture(rgb_texture, UV);
if (color.a <= 0.01) {
COLOR.r = 0.0;
}
else {
int color_index = find_index(color, textureSize(palette_texture, 0).x, palette_texture);
COLOR.r = float(color_index + 1) / 255.0;
}
}

View file

@ -35,7 +35,7 @@ var _line_polylines := []
# Memorize some stuff when doing brush strokes
var _stroke_project: Project
var _stroke_images: Array[Image] = []
var _stroke_images: Array[ImageExtended] = []
var _is_mask_size_zero := true
var _circle_tool_shortcut: Array[Vector2i]
@ -730,8 +730,8 @@ func _get_undo_data() -> Dictionary:
for cel in cels:
if not cel is PixelCel:
continue
var image := cel.get_image()
data[image] = image.data
var image := (cel as PixelCel).get_image()
image.add_data_to_dictionary(data)
return data

View file

@ -299,12 +299,12 @@ func _get_draw_rect() -> Rect2i:
return Rect2i(Vector2i.ZERO, Global.current_project.size)
func _get_draw_image() -> Image:
func _get_draw_image() -> ImageExtended:
return Global.current_project.get_current_cel().get_image()
func _get_selected_draw_images() -> Array[Image]:
var images: Array[Image] = []
func _get_selected_draw_images() -> Array[ImageExtended]:
var images: Array[ImageExtended] = []
var project := Global.current_project
for cel_index in project.selected_cels:
var cel: BaseCel = project.frames[cel_index[0]].cels[cel_index[1]]

View file

@ -220,7 +220,7 @@ func fill_in_color(pos: Vector2i) -> void:
if project.has_selection:
selection = project.selection_map.return_cropped_copy(project.size)
else:
selection = Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
selection = project.new_empty_image()
selection.fill(Color(1, 1, 1, 1))
selection_tex = ImageTexture.create_from_image(selection)
@ -263,7 +263,7 @@ func fill_in_selection() -> void:
var images := _get_selected_draw_images()
if _fill_with == FillWith.COLOR or _pattern == null:
if project.has_selection:
var filler := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var filler := project.new_empty_image()
filler.fill(tool_slot.color)
var rect: Rect2i = Global.canvas.selection.big_bounding_rectangle
var selection_map_copy := project.selection_map.return_cropped_copy(project.size)
@ -284,7 +284,7 @@ func fill_in_selection() -> void:
if project.has_selection:
selection = project.selection_map.return_cropped_copy(project.size)
else:
selection = Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
selection = project.new_empty_image()
selection.fill(Color(1, 1, 1, 1))
selection_tex = ImageTexture.create_from_image(selection)
@ -461,7 +461,7 @@ func _compute_segments_for_image(
done = false
func _color_segments(image: Image) -> void:
func _color_segments(image: ImageExtended) -> void:
if _fill_with == FillWith.COLOR or _pattern == null:
# This is needed to ensure that the color used to fill is not wrong, due to float
# rounding issues.
@ -472,7 +472,7 @@ func _color_segments(image: Image) -> void:
var p := _allegro_image_segments[c]
for px in range(p.left_position, p.right_position + 1):
# We don't have to check again whether the point being processed is within the bounds
image.set_pixel(px, p.y, color)
image.set_pixel_custom(px, p.y, color)
else:
# shortcircuit tests for patternfills
var pattern_size := _pattern.image.get_size()
@ -484,11 +484,11 @@ func _color_segments(image: Image) -> void:
_set_pixel_pattern(image, px, p.y, pattern_size)
func _set_pixel_pattern(image: Image, x: int, y: int, pattern_size: Vector2i) -> void:
func _set_pixel_pattern(image: ImageExtended, x: int, y: int, pattern_size: Vector2i) -> void:
var px := (x + _offset_x) % pattern_size.x
var py := (y + _offset_y) % pattern_size.y
var pc := _pattern.image.get_pixel(px, py)
image.set_pixel(x, y, pc)
image.set_pixel_custom(x, y, pc)
func commit_undo() -> void:
@ -514,12 +514,12 @@ func _get_undo_data() -> Dictionary:
if Global.animation_timeline.animation_timer.is_stopped():
var images := _get_selected_draw_images()
for image in images:
data[image] = image.data
image.add_data_to_dictionary(data)
else:
for frame in Global.current_project.frames:
var cel := frame.cels[Global.current_project.current_layer]
if not cel is PixelCel:
continue
var image := cel.get_image()
data[image] = image.data
var image := (cel as PixelCel).get_image()
image.add_data_to_dictionary(data)
return data

View file

@ -203,7 +203,7 @@ func _draw_shape() -> void:
commit_undo()
func _draw_pixel(point: Vector2i, images: Array[Image]) -> void:
func _draw_pixel(point: Vector2i, images: Array[ImageExtended]) -> void:
if Global.current_project.can_pixel_get_drawn(point):
for image in images:
_drawer.set_pixel(image, point, tool_slot.color)

View file

@ -122,6 +122,7 @@ func _draw_brush_image(image: Image, src_rect: Rect2i, dst: Vector2i) -> void:
var images := _get_selected_draw_images()
for draw_image in images:
draw_image.blit_rect_mask(_clear_image, image, src_rect, dst)
draw_image.convert_rgb_to_indexed()
else:
for xx in image.get_size().x:
for yy in image.get_size().y:

View file

@ -211,6 +211,7 @@ func _draw_brush_image(brush_image: Image, src_rect: Rect2i, dst: Vector2i) -> v
draw_image.blit_rect_mask(brush_image, mask, src_rect, dst)
else:
draw_image.blit_rect(brush_image, src_rect, dst)
draw_image.convert_rgb_to_indexed()
else:
for draw_image in images:
if Tools.alpha_locked:
@ -218,3 +219,4 @@ func _draw_brush_image(brush_image: Image, src_rect: Rect2i, dst: Vector2i) -> v
draw_image.blend_rect_mask(brush_image, mask, src_rect, dst)
else:
draw_image.blend_rect(brush_image, src_rect, dst)
draw_image.convert_rgb_to_indexed()

View file

@ -8,7 +8,7 @@ var _content_transformation_check := false
var _snap_to_grid := false ## Mouse Click + Ctrl
var _undo_data := {}
@onready var selection_node: Node2D = Global.canvas.selection
@onready var selection_node := Global.canvas.selection
func _input(event: InputEvent) -> void:
@ -78,19 +78,15 @@ func draw_end(pos: Vector2i) -> void:
and _content_transformation_check == selection_node.is_moving_content
):
pos = _snap_position(pos)
var project := Global.current_project
if project.has_selection:
if Global.current_project.has_selection:
selection_node.move_borders_end()
else:
var pixel_diff := pos - _start_pos
Global.canvas.move_preview_location = Vector2i.ZERO
var images := _get_selected_draw_images()
for image in images:
var image_copy := Image.new()
image_copy.copy_from(image)
image.fill(Color(0, 0, 0, 0))
image.blit_rect(image_copy, Rect2i(Vector2i.ZERO, project.size), pixel_diff)
_move_image(image, pixel_diff)
_move_image(image.indices_image, pixel_diff)
_commit_undo("Draw")
_start_pos = Vector2.INF
@ -99,6 +95,13 @@ func draw_end(pos: Vector2i) -> void:
Global.canvas.measurements.update_measurement(Global.MeasurementMode.NONE)
func _move_image(image: Image, pixel_diff: Vector2i) -> void:
var image_copy := Image.new()
image_copy.copy_from(image)
image.fill(Color(0, 0, 0, 0))
image.blit_rect(image_copy, Rect2i(Vector2i.ZERO, image.get_size()), pixel_diff)
func _snap_position(pos: Vector2) -> Vector2:
if Input.is_action_pressed("transform_snap_axis"):
var angle := pos.angle_to_point(_start_pos)
@ -155,6 +158,6 @@ func _get_undo_data() -> Dictionary:
for cel in cels:
if not cel is PixelCel:
continue
var image: Image = cel.image
data[image] = image.data
var image := (cel as PixelCel).get_image()
image.add_data_to_dictionary(data)
return data

View file

@ -149,12 +149,14 @@ func text_to_pixels() -> void:
RenderingServer.free_rid(canvas)
RenderingServer.free_rid(ci_rid)
RenderingServer.free_rid(texture)
viewport_texture.convert(Image.FORMAT_RGBA8)
viewport_texture.convert(image.get_format())
text_edit.queue_free()
text_edit = null
if not viewport_texture.is_empty():
image.copy_from(viewport_texture)
if image is ImageExtended:
image.convert_rgb_to_indexed()
commit_undo("Draw", undo_data)
@ -179,7 +181,7 @@ func _get_undo_data() -> Dictionary:
var data := {}
var images := _get_selected_draw_images()
for image in images:
data[image] = image.data
image.add_data_to_dictionary(data)
return data

View file

@ -516,6 +516,7 @@ func transform_content_confirm() -> void:
Rect2i(Vector2i.ZERO, project.selection_map.get_size()),
big_bounding_rectangle.position
)
cel_image.convert_rgb_to_indexed()
project.selection_map.move_bitmap_values(project)
commit_undo("Move Selection", undo_data)
@ -605,13 +606,13 @@ func get_undo_data(undo_image: bool) -> Dictionary:
if undo_image:
var images := _get_selected_draw_images()
for image in images:
data[image] = image.data
image.add_data_to_dictionary(data)
return data
func _get_selected_draw_cels() -> Array[BaseCel]:
var cels: Array[BaseCel] = []
func _get_selected_draw_cels() -> Array[PixelCel]:
var cels: Array[PixelCel] = []
var project := Global.current_project
for cel_index in project.selected_cels:
var cel: BaseCel = project.frames[cel_index[0]].cels[cel_index[1]]
@ -622,8 +623,8 @@ func _get_selected_draw_cels() -> Array[BaseCel]:
return cels
func _get_selected_draw_images() -> Array[Image]:
var images: Array[Image] = []
func _get_selected_draw_images() -> Array[ImageExtended]:
var images: Array[ImageExtended] = []
var project := Global.current_project
for cel_index in project.selected_cels:
var cel: BaseCel = project.frames[cel_index[0]].cels[cel_index[1]]
@ -794,14 +795,14 @@ func delete(selected_cels := true) -> void:
return
var undo_data_tmp := get_undo_data(true)
var images: Array[Image]
var images: Array[ImageExtended]
if selected_cels:
images = _get_selected_draw_images()
else:
images = [project.get_current_cel().get_image()]
if project.has_selection:
var blank := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var blank := project.new_empty_image()
var selection_map_copy := project.selection_map.return_cropped_copy(project.size)
for image in images:
image.blit_rect_mask(
@ -870,13 +871,16 @@ func _project_switched() -> void:
func _get_preview_image() -> void:
var project := Global.current_project
var blended_image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var blended_image := project.new_empty_image()
DrawingAlgos.blend_layers(
blended_image, project.frames[project.current_frame], Vector2i.ZERO, project, true
)
if original_preview_image.is_empty():
original_preview_image = Image.create(
big_bounding_rectangle.size.x, big_bounding_rectangle.size.y, false, Image.FORMAT_RGBA8
big_bounding_rectangle.size.x,
big_bounding_rectangle.size.y,
false,
project.get_image_format()
)
var selection_map_copy := project.selection_map.return_cropped_copy(project.size)
original_preview_image.blit_rect_mask(
@ -892,11 +896,11 @@ func _get_preview_image() -> void:
var clear_image := Image.create(
original_preview_image.get_width(),
original_preview_image.get_height(),
false,
Image.FORMAT_RGBA8
original_preview_image.has_mipmaps(),
original_preview_image.get_format()
)
for cel in _get_selected_draw_cels():
var cel_image: Image = cel.get_image()
var cel_image := cel.get_image()
cel.transformed_content = _get_selected_image(cel_image)
cel_image.blit_rect_mask(
clear_image,
@ -911,7 +915,10 @@ func _get_preview_image() -> void:
func _get_selected_image(cel_image: Image) -> Image:
var project := Global.current_project
var image := Image.create(
big_bounding_rectangle.size.x, big_bounding_rectangle.size.y, false, Image.FORMAT_RGBA8
big_bounding_rectangle.size.x,
big_bounding_rectangle.size.y,
false,
project.get_image_format()
)
var selection_map_copy := project.selection_map.return_cropped_copy(project.size)
image.blit_rect_mask(cel_image, selection_map_copy, big_bounding_rectangle, Vector2i.ZERO)

View file

@ -52,7 +52,9 @@ var templates: Array[Template] = [
@onready var height_value := %HeightValue as SpinBox
@onready var portrait_button := %PortraitButton as Button
@onready var landscape_button := %LandscapeButton as Button
@onready var name_input := $VBoxContainer/FillColorContainer/NameInput as LineEdit
@onready var fill_color_node := %FillColor as ColorPickerButton
@onready var color_mode := $VBoxContainer/FillColorContainer/ColorMode as OptionButton
@onready var recent_templates_list := %RecentTemplates as ItemList
@ -123,13 +125,14 @@ func _on_CreateNewImage_confirmed() -> void:
if recent_sizes.size() > 10:
recent_sizes.resize(10)
Global.config_cache.set_value("templates", "recent_sizes", recent_sizes)
var fill_color: Color = fill_color_node.color
var proj_name: String = $VBoxContainer/ProjectName/NameInput.text
var fill_color := fill_color_node.color
var proj_name := name_input.text
if !proj_name.is_valid_filename():
proj_name = tr("untitled")
var new_project := Project.new([], proj_name, image_size)
if color_mode.selected == 1:
new_project.color_mode = Project.INDEXED_MODE
new_project.layers.append(PixelLayer.new(new_project))
new_project.fill_color = fill_color
new_project.frames.append(new_project.new_empty_frame())

View file

@ -9,7 +9,8 @@
[node name="CreateNewImage" type="ConfirmationDialog"]
title = "New..."
size = Vector2i(384, 330)
position = Vector2i(0, 36)
size = Vector2i(434, 330)
script = ExtResource("1")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
@ -22,19 +23,6 @@ offset_right = -8.0
offset_bottom = -49.0
size_flags_horizontal = 0
[node name="ProjectName" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="NameLabel" type="Label" parent="VBoxContainer/ProjectName"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
text = "Project Name:"
[node name="NameInput" type="LineEdit" parent="VBoxContainer/ProjectName"]
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Enter name... (Default \"untitled\")"
[node name="ImageSize" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "Image Size"
@ -42,49 +30,48 @@ text = "Image Size"
[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
layout_mode = 2
[node name="VBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
[node name="SizeContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="Templates" type="VBoxContainer" parent="VBoxContainer/VBoxContainer"]
[node name="SizeOptions" type="VBoxContainer" parent="VBoxContainer/SizeContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="TemplatesContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainer/Templates"]
[node name="TemplatesContainer" type="HBoxContainer" parent="VBoxContainer/SizeContainer/SizeOptions"]
layout_mode = 2
[node name="TemplatesLabel" type="Label" parent="VBoxContainer/VBoxContainer/Templates/TemplatesContainer"]
[node name="TemplatesLabel" type="Label" parent="VBoxContainer/SizeContainer/SizeOptions/TemplatesContainer"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
text = "Templates:"
[node name="TemplatesOptions" type="OptionButton" parent="VBoxContainer/VBoxContainer/Templates/TemplatesContainer"]
[node name="TemplatesOptions" type="OptionButton" parent="VBoxContainer/SizeContainer/SizeOptions/TemplatesContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
toggle_mode = false
item_count = 1
selected = 0
item_count = 1
popup/item_0/text = "Default"
popup/item_0/id = 0
[node name="SizeContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainer/Templates"]
[node name="WidthHeightContainer" type="HBoxContainer" parent="VBoxContainer/SizeContainer/SizeOptions"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer"]
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="WidthContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer"]
[node name="WidthContainer" type="HBoxContainer" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer"]
layout_mode = 2
[node name="WidthLabel" type="Label" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer/WidthContainer"]
[node name="WidthLabel" type="Label" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer/WidthContainer"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
text = "Width:"
[node name="WidthValue" type="SpinBox" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer/WidthContainer"]
[node name="WidthValue" type="SpinBox" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer/WidthContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
@ -94,15 +81,15 @@ max_value = 16384.0
value = 64.0
suffix = "px"
[node name="HeightContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer"]
[node name="HeightContainer" type="HBoxContainer" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer"]
layout_mode = 2
[node name="HeightLabel" type="Label" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer/HeightContainer"]
[node name="HeightLabel" type="Label" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer/HeightContainer"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
text = "Height:"
[node name="HeightValue" type="SpinBox" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer/HeightContainer"]
[node name="HeightValue" type="SpinBox" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer/HeightContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
@ -112,11 +99,11 @@ max_value = 16384.0
value = 64.0
suffix = "px"
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer" groups=["UIButtons"]]
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer" groups=["UIButtons"]]
layout_mode = 2
texture = ExtResource("6")
[node name="AspectRatioButton" type="TextureButton" parent="VBoxContainer/VBoxContainer/Templates/SizeContainer/TextureRect" groups=["UIButtons"]]
[node name="AspectRatioButton" type="TextureButton" parent="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/TextureRect" groups=["UIButtons"]]
unique_name_in_owner = true
layout_mode = 0
anchor_left = 0.5
@ -133,31 +120,10 @@ toggle_mode = true
texture_normal = ExtResource("4")
texture_pressed = ExtResource("5")
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/VBoxContainer"]
[node name="SizeButtonsContainer" type="HBoxContainer" parent="VBoxContainer/SizeContainer/SizeOptions"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer"]
clip_contents = true
custom_minimum_size = Vector2(150, 0)
layout_mode = 2
focus_mode = 2
mouse_filter = 0
[node name="Label" type="Label" parent="VBoxContainer/VBoxContainer/VBoxContainer"]
layout_mode = 2
text = "Recent:"
[node name="RecentTemplates" type="ItemList" parent="VBoxContainer/VBoxContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
allow_reselect = true
[node name="SizeButtonsContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="PortraitButton" type="Button" parent="VBoxContainer/SizeButtonsContainer" groups=["UIButtons"]]
[node name="PortraitButton" type="Button" parent="VBoxContainer/SizeContainer/SizeOptions/SizeButtonsContainer" groups=["UIButtons"]]
unique_name_in_owner = true
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
@ -166,7 +132,7 @@ focus_mode = 0
mouse_default_cursor_shape = 2
toggle_mode = true
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/SizeButtonsContainer/PortraitButton"]
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/SizeContainer/SizeOptions/SizeButtonsContainer/PortraitButton"]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
@ -178,7 +144,7 @@ offset_right = 8.0
offset_bottom = 8.0
texture = ExtResource("2")
[node name="LandscapeButton" type="Button" parent="VBoxContainer/SizeButtonsContainer" groups=["UIButtons"]]
[node name="LandscapeButton" type="Button" parent="VBoxContainer/SizeContainer/SizeOptions/SizeButtonsContainer" groups=["UIButtons"]]
unique_name_in_owner = true
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
@ -187,7 +153,7 @@ focus_mode = 0
mouse_default_cursor_shape = 2
toggle_mode = true
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/SizeButtonsContainer/LandscapeButton"]
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/SizeContainer/SizeOptions/SizeButtonsContainer/LandscapeButton"]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
@ -199,12 +165,49 @@ offset_right = 8.0
offset_bottom = 8.0
texture = ExtResource("3")
[node name="FillColorContainer" type="HBoxContainer" parent="VBoxContainer"]
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/SizeContainer"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/SizeContainer"]
clip_contents = true
custom_minimum_size = Vector2(150, 0)
layout_mode = 2
focus_mode = 2
mouse_filter = 0
[node name="Label" type="Label" parent="VBoxContainer/SizeContainer/VBoxContainer"]
layout_mode = 2
text = "Recent:"
[node name="RecentTemplates" type="ItemList" parent="VBoxContainer/SizeContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
allow_reselect = true
[node name="HSeparator2" type="HSeparator" parent="VBoxContainer"]
layout_mode = 2
[node name="FillColorContainer" type="GridContainer" parent="VBoxContainer"]
layout_mode = 2
columns = 2
[node name="NameLabel" type="Label" parent="VBoxContainer/FillColorContainer"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
size_flags_horizontal = 3
text = "Project Name:"
[node name="NameInput" type="LineEdit" parent="VBoxContainer/FillColorContainer"]
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Enter name... (Default \"untitled\")"
[node name="FillColorLabel" type="Label" parent="VBoxContainer/FillColorContainer"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
size_flags_horizontal = 3
text = "Fill with color:"
[node name="FillColor" type="ColorPickerButton" parent="VBoxContainer/FillColorContainer"]
@ -215,13 +218,28 @@ size_flags_horizontal = 3
mouse_default_cursor_shape = 2
color = Color(0, 0, 0, 0)
[node name="ColorModeLabel" type="Label" parent="VBoxContainer/FillColorContainer"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
size_flags_horizontal = 3
text = "Color mode:"
[node name="ColorMode" type="OptionButton" parent="VBoxContainer/FillColorContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
selected = 0
item_count = 2
popup/item_0/text = "RGBA"
popup/item_1/text = "Indexed"
popup/item_1/id = 1
[connection signal="about_to_popup" from="." to="." method="_on_CreateNewImage_about_to_show"]
[connection signal="confirmed" from="." to="." method="_on_CreateNewImage_confirmed"]
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
[connection signal="item_selected" from="VBoxContainer/VBoxContainer/Templates/TemplatesContainer/TemplatesOptions" to="." method="_on_TemplatesOptions_item_selected"]
[connection signal="value_changed" from="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer/WidthContainer/WidthValue" to="." method="_on_SizeValue_value_changed"]
[connection signal="value_changed" from="VBoxContainer/VBoxContainer/Templates/SizeContainer/VBoxContainer/HeightContainer/HeightValue" to="." method="_on_SizeValue_value_changed"]
[connection signal="toggled" from="VBoxContainer/VBoxContainer/Templates/SizeContainer/TextureRect/AspectRatioButton" to="." method="_on_AspectRatioButton_toggled"]
[connection signal="item_selected" from="VBoxContainer/VBoxContainer/VBoxContainer/RecentTemplates" to="." method="_on_RecentTemplates_item_selected"]
[connection signal="toggled" from="VBoxContainer/SizeButtonsContainer/PortraitButton" to="." method="_on_PortraitButton_toggled"]
[connection signal="toggled" from="VBoxContainer/SizeButtonsContainer/LandscapeButton" to="." method="_on_LandscapeButton_toggled"]
[connection signal="item_selected" from="VBoxContainer/SizeContainer/SizeOptions/TemplatesContainer/TemplatesOptions" to="." method="_on_TemplatesOptions_item_selected"]
[connection signal="value_changed" from="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer/WidthContainer/WidthValue" to="." method="_on_SizeValue_value_changed"]
[connection signal="value_changed" from="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/VBoxContainer/HeightContainer/HeightValue" to="." method="_on_SizeValue_value_changed"]
[connection signal="toggled" from="VBoxContainer/SizeContainer/SizeOptions/WidthHeightContainer/TextureRect/AspectRatioButton" to="." method="_on_AspectRatioButton_toggled"]
[connection signal="toggled" from="VBoxContainer/SizeContainer/SizeOptions/SizeButtonsContainer/PortraitButton" to="." method="_on_PortraitButton_toggled"]
[connection signal="toggled" from="VBoxContainer/SizeContainer/SizeOptions/SizeButtonsContainer/LandscapeButton" to="." method="_on_LandscapeButton_toggled"]
[connection signal="item_selected" from="VBoxContainer/SizeContainer/VBoxContainer/RecentTemplates" to="." method="_on_RecentTemplates_item_selected"]

View file

@ -89,7 +89,7 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
selection_tex = ImageTexture.create_from_image(selection)
if !_type_is_shader():
var blank := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var blank := project.new_empty_image()
cel.blit_rect_mask(
blank, selection, Rect2i(Vector2i.ZERO, cel.get_size()), Vector2i.ZERO
)
@ -136,6 +136,8 @@ func commit_action(cel: Image, project := Global.current_project) -> void:
cel.blend_rect(image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO)
else:
cel.blit_rect(image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO)
if cel is ImageExtended:
cel.convert_rgb_to_indexed()
func _type_is_shader() -> bool:

View file

@ -34,7 +34,7 @@ func _on_ScaleImage_confirmed() -> void:
var width: int = width_value.value
var height: int = height_value.value
var interpolation: int = interpolation_type.selected
DrawingAlgos.scale_image(width, height, interpolation)
DrawingAlgos.scale_project(width, height, interpolation)
func _on_visibility_changed() -> void:

View file

@ -22,7 +22,7 @@ func refresh_list() -> void:
animation_tags_list.clear()
get_ok_button().disabled = true
for tag: AnimationTag in from_project.animation_tags:
var img = Image.create(from_project.size.x, from_project.size.y, true, Image.FORMAT_RGBA8)
var img := from_project.new_empty_image()
DrawingAlgos.blend_layers(
img, from_project.frames[tag.from - 1], Vector2i.ZERO, from_project
)
@ -186,9 +186,7 @@ func add_animation(indices: Array, destination: int, from_tag: AnimationTag = nu
# add more types here if they have a copy_content() method
if src_cel is PixelCel:
var src_img = src_cel.copy_content()
var copy := Image.create(
project.size.x, project.size.y, false, Image.FORMAT_RGBA8
)
var copy := project.new_empty_image()
copy.blit_rect(
src_img, Rect2(Vector2.ZERO, src_img.get_size()), Vector2.ZERO
)

View file

@ -1,6 +1,7 @@
extends AcceptDialog
@onready var size_value_label := $GridContainer/SizeValueLabel as Label
@onready var color_mode_value_label := $GridContainer/ColorModeValueLabel as Label
@onready var frames_value_label := $GridContainer/FramesValueLabel as Label
@onready var layers_value_label := $GridContainer/LayersValueLabel as Label
@onready var name_line_edit := $GridContainer/NameLineEdit as LineEdit
@ -10,6 +11,12 @@ extends AcceptDialog
func _on_visibility_changed() -> void:
Global.dialog_open(visible)
size_value_label.text = str(Global.current_project.size)
if Global.current_project.get_image_format() == Image.FORMAT_RGBA8:
color_mode_value_label.text = "RGBA8"
else:
color_mode_value_label.text = str(Global.current_project.get_image_format())
if Global.current_project.is_indexed():
color_mode_value_label.text += " (%s)" % tr("Indexed")
frames_value_label.text = str(Global.current_project.frames.size())
layers_value_label.text = str(Global.current_project.layers.size())
name_line_edit.text = Global.current_project.name

View file

@ -24,6 +24,16 @@ layout_mode = 2
size_flags_horizontal = 3
text = "64x64"
[node name="ColorModeLabel" type="Label" parent="GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Color mode:"
[node name="ColorModeValueLabel" type="Label" parent="GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "RGBA8"
[node name="FramesLabel" type="Label" parent="GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
@ -32,7 +42,7 @@ text = "Frames:"
[node name="FramesValueLabel" type="Label" parent="GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "64x64"
text = "1"
[node name="LayersLabel" type="Label" parent="GridContainer"]
layout_mode = 2
@ -42,7 +52,7 @@ text = "Layers:"
[node name="LayersValueLabel" type="Label" parent="GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "64x64"
text = "1"
[node name="NameLabel" type="Label" parent="GridContainer"]
layout_mode = 2

View file

@ -70,7 +70,7 @@ class Recorder:
image = recorder_panel.get_window().get_texture().get_image()
else:
var frame := project.frames[project.current_frame]
image = Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
image = project.new_empty_image()
DrawingAlgos.blend_layers(image, frame, Vector2i.ZERO, project)
if recorder_panel.resize_percent != 100:

View file

@ -1045,9 +1045,10 @@ func _on_MergeDownLayer_pressed() -> void:
top_cels.append(top_cel) # Store for undo purposes
var top_image := top_layer.display_effects(top_cel)
var bottom_cel := frame.cels[bottom_layer.index]
var bottom_cel := frame.cels[bottom_layer.index] as PixelCel
var bottom_image := bottom_cel.get_image()
var textures: Array[Image] = []
textures.append(bottom_cel.get_image())
textures.append(bottom_image)
textures.append(top_image)
var metadata_image := Image.create(2, 4, false, Image.FORMAT_R8)
DrawingAlgos.set_layer_metadata_image(bottom_layer, bottom_cel, metadata_image, 0)
@ -1058,12 +1059,17 @@ func _on_MergeDownLayer_pressed() -> void:
var params := {
"layers": texture_array, "metadata": ImageTexture.create_from_image(metadata_image)
}
var bottom_image := Image.create(
top_image.get_width(), top_image.get_height(), false, top_image.get_format()
var new_bottom_image := ImageExtended.create_custom(
top_image.get_width(),
top_image.get_height(),
top_image.has_mipmaps(),
top_image.get_format(),
project.is_indexed()
)
# Merge the image itself.
var gen := ShaderImageEffect.new()
gen.generate_image(bottom_image, DrawingAlgos.blend_layers_shader, params, project.size)
gen.generate_image(new_bottom_image, DrawingAlgos.blend_layers_shader, params, project.size)
new_bottom_image.convert_rgb_to_indexed()
if (
bottom_cel.link_set != null
and bottom_cel.link_set.size() > 1
@ -1074,14 +1080,14 @@ func _on_MergeDownLayer_pressed() -> void:
project.undo_redo.add_undo_method(
bottom_layer.link_cel.bind(bottom_cel, bottom_cel.link_set)
)
project.undo_redo.add_do_property(bottom_cel, "image", bottom_image)
project.undo_redo.add_do_property(bottom_cel, "image", new_bottom_image)
project.undo_redo.add_undo_property(bottom_cel, "image", bottom_cel.image)
else:
Global.undo_redo_compress_images(
{bottom_cel.image: bottom_image.data},
{bottom_cel.image: bottom_cel.image.data},
project
)
var redo_data := {}
var undo_data := {}
new_bottom_image.add_data_to_dictionary(redo_data, bottom_image)
bottom_image.add_data_to_dictionary(undo_data)
Global.undo_redo_compress_images(redo_data, undo_data, project)
project.undo_redo.add_do_method(project.remove_layers.bind([top_layer.index]))
project.undo_redo.add_undo_method(

View file

@ -154,13 +154,19 @@ func _apply_effect(layer: BaseLayer, effect: LayerEffect) -> void:
var undo_data := {}
for frame in Global.current_project.frames:
var cel := frame.cels[layer.index]
var new_image := Image.new()
new_image.copy_from(cel.get_image())
var new_image := ImageExtended.new()
var cel_image := cel.get_image()
if cel_image is ImageExtended:
new_image.is_indexed = cel_image.is_indexed
new_image.copy_from_custom(cel_image)
var image_size := new_image.get_size()
var shader_image_effect := ShaderImageEffect.new()
shader_image_effect.generate_image(new_image, effect.shader, effect.params, image_size)
redo_data[cel.image] = new_image.data
undo_data[cel.image] = cel.image.data
if cel_image is ImageExtended:
redo_data[cel_image.indices_image] = new_image.indices_image.data
undo_data[cel_image.indices_image] = cel_image.indices_image.data
redo_data[cel_image] = new_image.data
undo_data[cel_image] = cel_image.data
Global.current_project.undos += 1
Global.current_project.undo_redo.create_action("Apply layer effect")
Global.undo_redo_compress_images(redo_data, undo_data)

View file

@ -1,5 +1,7 @@
extends Panel
enum ColorModes { RGBA, INDEXED }
const DOCS_URL := "https://www.oramainteractive.com/Pixelorama-Docs/"
const ISSUES_URL := "https://github.com/Orama-Interactive/Pixelorama/issues"
const SUPPORT_URL := "https://www.patreon.com/OramaInteractive"
@ -56,6 +58,7 @@ var about_dialog := Dialog.new("res://src/UI/Dialogs/AboutDialog.tscn")
@onready var greyscale_vision: ColorRect = main_ui.find_child("GreyscaleVision")
@onready var tile_mode_submenu := PopupMenu.new()
@onready var selection_modify_submenu := PopupMenu.new()
@onready var color_mode_submenu := PopupMenu.new()
@onready var snap_to_submenu := PopupMenu.new()
@onready var panels_submenu := PopupMenu.new()
@onready var layouts_submenu := PopupMenu.new()
@ -124,6 +127,7 @@ func _project_switched() -> void:
_update_file_menu_buttons(project)
for j in Tiles.MODE.values():
tile_mode_submenu.set_item_checked(j, j == project.tiles.mode)
_check_color_mode_submenu_item(project)
_update_current_frame_mark()
@ -396,19 +400,34 @@ func _setup_image_menu() -> void:
# Order as in Global.ImageMenu enum
var image_menu_items := {
"Project Properties": "project_properties",
"Color Mode": "",
"Resize Canvas": "resize_canvas",
"Scale Image": "scale_image",
"Crop to Selection": "crop_to_selection",
"Crop to Content": "crop_to_content",
}
var i := 0
for item in image_menu_items:
_set_menu_shortcut(image_menu_items[item], image_menu, i, item)
i += 1
for i in image_menu_items.size():
var item: String = image_menu_items.keys()[i]
if item == "Color Mode":
_setup_color_mode_submenu(item)
else:
_set_menu_shortcut(image_menu_items[item], image_menu, i, item)
image_menu.set_item_disabled(Global.ImageMenu.CROP_TO_SELECTION, true)
image_menu.id_pressed.connect(image_menu_id_pressed)
func _setup_color_mode_submenu(item: String) -> void:
color_mode_submenu.set_name("color_mode_submenu")
color_mode_submenu.add_radio_check_item("RGBA", ColorModes.RGBA)
color_mode_submenu.set_item_checked(ColorModes.RGBA, true)
color_mode_submenu.add_radio_check_item("Indexed", ColorModes.INDEXED)
color_mode_submenu.hide_on_checkable_item_selection = false
color_mode_submenu.id_pressed.connect(_color_mode_submenu_id_pressed)
image_menu.add_child(color_mode_submenu)
image_menu.add_submenu_item(item, color_mode_submenu.get_name())
func _setup_effects_menu() -> void:
# Order as in Global.EffectMenu enum
var menu_items := {
@ -687,6 +706,38 @@ func _selection_modify_submenu_id_pressed(id: int) -> void:
modify_selection.node.type = id
func _color_mode_submenu_id_pressed(id: ColorModes) -> void:
var project := Global.current_project
var old_color_mode := project.color_mode
var redo_data := {}
var undo_data := {}
for cel in project.get_all_pixel_cels():
cel.get_image().add_data_to_dictionary(undo_data)
# Change the color mode directly before undo/redo in order to affect the images,
# so we can store them as redo data.
if id == ColorModes.RGBA:
project.color_mode = Image.FORMAT_RGBA8
else:
project.color_mode = Project.INDEXED_MODE
for cel in project.get_all_pixel_cels():
cel.get_image().add_data_to_dictionary(redo_data)
project.undo_redo.create_action("Change color mode")
project.undos += 1
project.undo_redo.add_do_property(project, "color_mode", project.color_mode)
project.undo_redo.add_undo_property(project, "color_mode", old_color_mode)
Global.undo_redo_compress_images(redo_data, undo_data, project)
project.undo_redo.add_do_method(_check_color_mode_submenu_item.bind(project))
project.undo_redo.add_undo_method(_check_color_mode_submenu_item.bind(project))
project.undo_redo.add_do_method(Global.undo_or_redo.bind(false))
project.undo_redo.add_undo_method(Global.undo_or_redo.bind(true))
project.undo_redo.commit_action()
func _check_color_mode_submenu_item(project: Project) -> void:
color_mode_submenu.set_item_checked(ColorModes.RGBA, project.color_mode == Image.FORMAT_RGBA8)
color_mode_submenu.set_item_checked(ColorModes.INDEXED, project.is_indexed())
func _snap_to_submenu_id_pressed(id: int) -> void:
if id == 0:
Global.snap_to_rectangular_grid_boundary = !Global.snap_to_rectangular_grid_boundary