├── doc ├── AUTHORS ├── menu.config ├── copyright ├── README └── changelog ├── install.sh ├── uninstall.sh ├── README.md ├── ServiceMenus ├── reimage-tools.desktop ├── reimage-metadata.desktop ├── reimage-convert-rotate.desktop └── reimage-compress-resize.desktop ├── LICENSE └── bin └── reimage-kdialog /doc/AUTHORS: -------------------------------------------------------------------------------- 1 | Giuseppe Benigno 2 | Robert-André Mauchin 3 | -------------------------------------------------------------------------------- /doc/menu.config: -------------------------------------------------------------------------------- 1 | # config file for Service Menu Manager 2 | # http://www.kde-apps.org/content/show.php/Service+Menu+Manager?content=94996 3 | 4 | [General] 5 | name=ReImage Service Menu 6 | description=Manipulate images and their metadata. Required ImageMagick, kdialog and jhead packages. 7 | author=Giuseppe Benigno 8 | author_email=giuseppe.benigno@gmail.com 9 | homepage=https://www.egregorion.net 10 | version=2.6.0 11 | licence=GPL-3.0-or-later 12 | -------------------------------------------------------------------------------- /doc/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: kde-service-menu-reimage 3 | 4 | Files: * 5 | Copyright: 2018 Giuseppe Benigno 6 | 2019 Giuseppe Benigno 7 | 2024 Robert-André Mauchin 8 | License: GPL-3.0+ 9 | 10 | Files: debian/* 11 | Copyright: 2018 Giuseppe Benigno 12 | 2024 Robert-André Mauchin 13 | License: GPL-3.0+ 14 | 15 | License: GPL-3.0+ 16 | This program is free software: you can redistribute it and/or modify 17 | it under the terms of the GNU General Public License as published by 18 | the Free Software Foundation, either version 3 of the License, or 19 | (at your option) any later version. 20 | . 21 | This package is distributed in the hope that it will be useful, 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | GNU General Public License for more details. 25 | . 26 | You should have received a copy of the GNU General Public License 27 | along with this program. If not, see . 28 | . 29 | On Debian systems, the complete text of the GNU General 30 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". 31 | 32 | From idea of Charles Bouveyron 33 | http://bouveyron.free.fr/kim/index.html 34 | -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | The Debian Package kde-service-menu-reimage 2 | ---------------------------- 3 | 4 | Description: Manipulate images e their metadata. 5 | kde-service-menu-reimage is a package that extends the functionalities of 6 | Dolphin/Konqueror adding many additionally sensible menu, reachables with right 7 | click on the files. It's similar to gnome nautilus actions. 8 | These actions are related to picture files. 9 | . 10 | Compress and resize 11 | Advanced optimization for web 12 | Compress in % (change quality) 13 | Resize in % or square 14 | . 15 | Convert and rotate 16 | Convert to all formats supported by ImageMagick 17 | Convert to PDF or PDF/A-1 18 | Generate favicons for browser/android/apple/ms 19 | Convert to Base64 20 | Generate favicons 21 | Rotate 22 | Overturn vertically/horizontally 23 | . 24 | Metadata: 25 | Rename jpg and tiff files with data content in Exif metadata. 26 | (For example: 001.jpg -> 2018-04-27_133741.jpg) 27 | Rename jpg and tiff files with file's data. 28 | Set file's datetime from Exif date. 29 | Set file date from file's name 30 | Set Exif datetime from file's date. 31 | Set Exif datetime from file's name. 32 | Add comment 33 | View metadata 34 | Extract metadata to file 35 | Delete comment field 36 | Strip Exif section 37 | Delete IPTC section 38 | Delete XMP section 39 | Strip all unnecessary data 40 | Add timestamp from Exif 41 | . 42 | Tools 43 | Create animated GIF 44 | Append to right 45 | GrayScale 46 | Sepia filter 47 | Change transparent to color 48 | Add colored border 49 | Add transparent border 50 | Drop shadow 51 | . 52 | Copyright (C) 2018-2018 Giuseppe Benigno 53 | Copyright (C) 2024 Robert-André Mauchin 54 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # 3 | # Part of kde-service-menu-reimage Version 2.6 4 | # Copyright (C) 2018-2019 Giuseppe Benigno 5 | # Copyright (C) 2024 Robert-André Mauchin 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | # SPDX-License-Identifier: GPL-3.0-or-later 21 | # 22 | 23 | if [[ $EUID -eq 0 ]]; then 24 | bin_dir="$(qtpaths6 --query QT_HOST_PREFIX)/bin" 25 | desktop_dir="$(qtpaths6 --locate-dirs GenericDataLocation kio/servicemenus | sed "s/.*://")" 26 | doc_dir="$(qtpaths6 --query QT_INSTALL_PREFIX)/share/doc/kde-service-menu-reimage/" 27 | echo "Installing kde-service-menu-reimage system wide" 28 | else 29 | bin_dir="$HOME/.local/bin" 30 | desktop_dir="$(qtpaths6 --locate-dirs GenericDataLocation kio/servicemenus | sed "s/:.*//")" 31 | doc_dir=$HOME"/share/doc/kde-service-menu-reimage/" 32 | echo "Installing kde-service-menu-reimage locally" 33 | fi 34 | 35 | install -pm 0755 bin/* "${bin_dir}" 36 | install -pm 0755 ServiceMenus/*.desktop "${desktop_dir}" 37 | install -d "${doc_dir}" 38 | install -pm 0644 doc/* "${doc_dir}" 39 | 40 | echo "Done!. kde-service-menu-reimage has been installed. Enjoy!" 41 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # 3 | # Part of kde-service-menu-reimage Version 2.6.0 4 | # Copyright (C) 2018-2019 Giuseppe Benigno 5 | # Copyright (C) 2024 Robert-André Mauchin 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | # SPDX-License-Identifier: GPL-3.0-or-later 21 | # 22 | 23 | if [[ $EUID -eq 0 ]]; then 24 | bin_dir="$(qtpaths6 --query QT_HOST_PREFIX)/bin" 25 | desktop_dir="$(qtpaths6 --locate-dirs GenericDataLocation kio/servicemenus | sed "s/.*://")" 26 | doc_dir="$(qtpaths6 --query QT_INSTALL_PREFIX)/share/doc/kde-service-menu-reimage/" 27 | echo "Removing kde-service-menu-reimage system wide" 28 | else 29 | bin_dir="$HOME/.local/bin" 30 | desktop_dir="$(qtpaths6 --locate-dirs GenericDataLocation kio/servicemenus | sed "s/:.*//")" 31 | doc_dir=$HOME"/share/doc/kde-service-menu-reimage/" 32 | echo "Removing kde-service-menu-reimage locally" 33 | fi 34 | 35 | echo "removing ${bin_dir}/reimage-kdialog" 36 | rm "${bin_dir}/reimage-kdialog" 37 | 38 | echo "removing ${desktop_dir}/reimage-compress-resize.desktop" 39 | rm "${desktop_dir}/reimage-compress-resize.desktop" 40 | echo "removing ${desktop_dir}/reimage-convert-rotate.desktop" 41 | rm "${desktop_dir}/reimage-convert-rotate.desktop" 42 | echo "removing ${desktop_dir}/reimage-metadata.desktop" 43 | rm "${desktop_dir}/reimage-metadata.desktop" 44 | echo "removing ${desktop_dir}/reimage-tools.desktop" 45 | rm "${desktop_dir}/reimage-tools.desktop" 46 | 47 | echo "removing ${doc_dir}" 48 | rm -rf "${doc_dir}" 49 | 50 | echo 51 | echo "kde-service-menu-reimage has been removed. Good bye." 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Plasma 6 Service Menu ReImage 2 | 3 | kde*service*menu*reimage is a package that extends the functionalities 4 | of Dolphin/Konqueror adding many additionally sensible menu, reachables with 5 | right click on the files. It's similar to GNOME Nautilus actions. 6 | 7 | These actions are related to picture files: 8 | 9 | 10 | * Compress and resize 11 | * Advanced optimization for web 12 | * Compress in % (change quality) 13 | * Resize in % or square 14 | 15 | * Convert and rotate 16 | * Convert to all formats supported by ImageMagick 17 | * Convert to PDF or PDF/A*1 18 | * Generate favicons for browser/android/apple/ms 19 | * Convert to Base64 20 | * Rotate 21 | * Overturn vertically/horizontally 22 | 23 | * Metadata 24 | * Rename jpg and tiff files with data content in Exif metadata. 25 | (For example: 001.jpg *> 2018*04*27_133741.jpg) 26 | * Rename jpg and tiff files with file's data. 27 | * Set file's datetime from Exif date. 28 | * Set file date from file's name 29 | * Set Exif datetime from file's date. 30 | * Set Exif datetime from file's name. 31 | * Add comment 32 | * View metadata 33 | * Extract metadata to file 34 | * Delete comment field 35 | * Strip Exif section 36 | * Delete IPTC section 37 | * Delete XMP section 38 | * Strip all unnecessary data 39 | * Add timestamp from Exif 40 | 41 | * Tools 42 | * Create animated GIF/APNG/WEBP 43 | * Append to right 44 | * GrayScale 45 | * Sepia filter 46 | * Change transparent to color 47 | * Add colored border 48 | * Add transparent border 49 | * Drop shadow 50 | 51 | ## Installation 52 | 53 | To install this app on your computer, run: 54 | 55 | ```bash 56 | sudo ./install.sh 57 | ``` 58 | 59 | To uninstall this app from your computer, run: 60 | 61 | ```bash 62 | sudo ./uninstall.sh 63 | ``` 64 | 65 | You can also install it on your profile only by omitting sudo. 66 | 67 | ## License 68 | 69 | Copyright (C) 2018-2019 Giuseppe Benigno 70 | 71 | Copyright (C) 2024 Robert-André Mauchin 72 | 73 | This program is free software: you can redistribute it and/or modify it under 74 | the terms of the GNU General Public License as published by the Free Software 75 | Foundation, either version 3 of the License, or (at your option) any later 76 | version. 77 | 78 | This program is distributed in the hope that it will be useful, but WITHOUT 79 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 80 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 81 | 82 | You should have received a copy of the GNU General Public License along with 83 | program. If not, see . 84 | -------------------------------------------------------------------------------- /ServiceMenus/reimage-tools.desktop: -------------------------------------------------------------------------------- 1 | # 2 | # Part of kde-service-menu-reimage Version 2.6.0 3 | # Copyright (C) 2018-2019 Giuseppe Benigno 4 | # Copyright (C) 2024 Robert-André Mauchin 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # SPDX-License-Identifier: GPL-3.0-or-later 20 | # 21 | 22 | [Desktop Entry] 23 | Actions=agif;apng;webp;append_right;_SEPARATOR_;gray;sepia;transparent2color;_SEPARATOR_;border;border_transparent;shadow; 24 | MimeType=image/* 25 | Name=ReImage tools service menu 26 | TryExec=reimage-kdialog 27 | Type=Service 28 | X-KDE-Submenu=ReImage - Tools 29 | X-KDE-Submenu[it]=ReImage - Utilità 30 | 31 | ################################################################################ 32 | 33 | [Desktop Action agif] 34 | Exec=reimage-kdialog agif %F 35 | Icon=video-x-mp4 36 | Name=Create animated GIF 37 | Name[it]=Crea GIF 38 | 39 | [Desktop Action apng] 40 | Exec=reimage-kdialog apng %F 41 | Icon=video-x-mp4 42 | Name=Create animated PNG 43 | Name[it]=Crea PNG animata 44 | 45 | # [Desktop Action avif] 46 | # Exec=reimage-kdialog avif %F 47 | # Icon=video-x-mp4 48 | # Name=Create animated AVIF 49 | # Name[it]=Crea AVIF 50 | # 51 | # [Desktop Action jxl] 52 | # Exec=reimage-kdialog jxl %F 53 | # Icon=video-x-mp4 54 | # Name=Create animated JXL 55 | # Name[it]=Crea JXL 56 | # 57 | # [Desktop Action heif] 58 | # Exec=reimage-kdialog heif %F 59 | # Icon=video-x-mp4 60 | # Name=Create animated HEIF 61 | # Name[it]=Crea HEIF 62 | 63 | [Desktop Action webp] 64 | Exec=reimage-kdialog webp %F 65 | Icon=video-x-mp4 66 | Name=Create animated WEBP 67 | Name[it]=Crea WEBP animata 68 | 69 | [Desktop Action append_right] 70 | Exec=reimage-kdialog montage %F 71 | Icon=image-flip-horizontal-symbolic 72 | Name=Append to right 73 | Name[it]=Appendi immagine a destra 74 | 75 | ################################################################################ 76 | 77 | [Desktop Action gray] 78 | Exec=reimage-kdialog colorspace gray %F 79 | Icon=viewimage 80 | Name=GrayScale 81 | Name[it]=Scala di grigi 82 | 83 | [Desktop Action sepia] 84 | Exec=reimage-kdialog sepia 80% %F 85 | Icon=color-management 86 | Name=Sepia 87 | Name[it]=Seppia 88 | 89 | [Desktop Action transparent2color] 90 | Exec=reimage-kdialog transparent2color %F 91 | Icon=backgroundtool 92 | Name=Change transparent to color 93 | Name[it]=Cambia trasparenza a colore 94 | 95 | ################################################################################ 96 | 97 | [Desktop Action border] 98 | Exec=reimage-kdialog border custom %F 99 | Icon=bordertool 100 | Name=Add colored border 101 | Name[it]=Aggiungi bordo colorato 102 | 103 | [Desktop Action border_transparent] 104 | Exec=reimage-kdialog border transparent %F 105 | Icon=box 106 | Name=Add transparent border 107 | Name[it]=Aggiungi bordo trasparente 108 | 109 | [Desktop Action shadow] 110 | Exec=reimage-kdialog shadow %F 111 | Icon=bwtonal 112 | Name=Drop shadow 113 | Name[it]=Aggiungi ombra 114 | -------------------------------------------------------------------------------- /doc/changelog: -------------------------------------------------------------------------------- 1 | kde-service-menu-reimage (2.6.0) unstable; urgency=medium 2 | 3 | * Convert for Plasma 6 4 | 5 | -- Robert-André Mauchin Sun, 07 Apr 2024 16:40:33 +0100 6 | 7 | kde-service-menu-reimage (2.5) unstable; urgency=medium 8 | 9 | * Added conversion to webp format 10 | * Added convert to progressive 11 | * Added progressive to Web Optimization 12 | 13 | -- Giuseppe Benigno Thu, 28 Mar 2019 18:52:57 +0100 14 | 15 | kde-service-menu-reimage (2.4) unstable; urgency=medium 16 | 17 | * Added menu voice "Generate favicons" for browser/android/apple/ms 18 | 19 | -- Giuseppe Benigno Thu, 03 Jan 2019 18:52:57 +0100 20 | 21 | kde-service-menu-reimage (2.3) unstable; urgency=medium 22 | 23 | * Added menu top item "Tools" 24 | * Added menu voice "Append to right" with autoresize 25 | * Fixed error when select autorotate from exif 26 | * Added warning when it does not find metadata when require it 27 | * Merge scripts in one 28 | 29 | -- Giuseppe Benigno Sun, 13 May 2018 12:00:01 +0200 30 | 31 | kde-service-menu-reimage (2.2) unstable; urgency=medium 32 | 33 | * Add some italian translation 34 | * Set overwrite dialog with button default to No 35 | * Replaced normal error dialog with error dialog with details 36 | * Added default color #FFFFFF when ask for it 37 | * Fixed overturn replacing image 38 | * Ask for overwrite only if output has same extension of input 39 | * Default border size is 5% 40 | * Changed output names from action_filename to basename_action.extension 41 | * Section metadata: Add comment 42 | * Section metadata: View metadata 43 | * Section metadata: Extract metadata to file 44 | * Section metadata: Add Timestamp from Exif 45 | * Section convert: Replace transparent with color 46 | * Section convert: Add colored border 47 | * Section convert: Add transparent border 48 | * Section convert: Drop shadow 49 | 50 | -- Giuseppe Benigno Sun, 06 May 2018 20:00:01 +0200 51 | 52 | kde-service-menu-reimage (2.1) unstable; urgency=medium 53 | 54 | * fixed a little bug for which the parameters were not passed 55 | to some internal features: compress, convert, resize, rotate 56 | 57 | -- Giuseppe Benigno Thu, 03 May 2018 11:11:11 +0200 58 | 59 | kde-service-menu-reimage (2.0) unstable; urgency=medium 60 | 61 | * Advanced optimization for web 62 | * Compress in % (change quality) 63 | * Resize in % or square 64 | * Convert to all formats supported by ImageMagick 65 | * Convert to PDF or PDF/A-1 66 | * Convert to animated GIF 67 | * Convert to Base64 68 | * Convert to Greyscale 69 | * Sepia filter 70 | * Rotate 71 | * Overturn vertically/horizontally 72 | 73 | -- Giuseppe Benigno Mon, 30 Apr 2018 17:15:34 +0200 74 | 75 | kde-service-menu-reimage (1.2) unstable; urgency=medium 76 | 77 | * Rename from file's date 78 | * Set file date from file's name 79 | * Delete comment field 80 | * Strip Exif section 81 | * Delete IPTC section 82 | * Delete XMP section 83 | * Strip all metadata 84 | * More verbosity (display errors) 85 | 86 | -- Giuseppe Benigno Mon, 30 Apr 2018 01:18:44 +0200 87 | 88 | kde-service-menu-reimage (1.1) unstable; urgency=medium 89 | 90 | * Added set file datetime from Exif metadata 91 | * Added set Exif datetime from file's date 92 | * Added set Exif datetime from file's name 93 | 94 | -- Giuseppe Benigno Sat, 28 Apr 2018 01:34:44 +0200 95 | 96 | kde-service-menu-reimage (1.0) unstable; urgency=medium 97 | 98 | * Initial Release. 99 | * Rename file with date from Exif metadata 100 | 101 | -- Giuseppe Benigno Fri, 27 Apr 2018 15:22:34 +0200 102 | -------------------------------------------------------------------------------- /ServiceMenus/reimage-metadata.desktop: -------------------------------------------------------------------------------- 1 | # 2 | # Part of kde-service-menu-reimage Version 2.6.0 3 | # Copyright (C) 2018-2019 Giuseppe Benigno 4 | # Copyright (C) 2024 Robert-André Mauchin 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # SPDX-License-Identifier: GPL-3.0-or-later 20 | # 21 | 22 | [Desktop Entry] 23 | Actions=rfe;rff;_SEPARATOR_;sffe;sffn;_SEPARATOR_;seff;sefn;_SEPARATOR_;add_comment;view_metadata;extract_metadata;_SEPARATOR_;del_comment;del_exif;del_iptc;del_xmp;del_all;_SEPARATOR_;tfe; 24 | MimeType=image/jpeg;image/tiff; 25 | Name=ReImage metadata service menu 26 | TryExec=reimage-kdialog 27 | Type=Service 28 | X-KDE-Submenu=ReImage - Metadata 29 | X-KDE-Submenu[it]=ReImage - Metadati 30 | 31 | ################################################################################ 32 | 33 | [Desktop Action rfe] 34 | Exec=reimage-kdialog rfe %F 35 | Icon=edit-rename 36 | Name=Rename from Exif date 37 | Name[it]=Rinomina dalla data Exif 38 | 39 | [Desktop Action rff] 40 | Exec=reimage-kdialog rff %F 41 | Icon=edit-rename 42 | Name=Rename from file's date 43 | Name[it]=Rinomina dalla data del file 44 | 45 | ################################################################################ 46 | 47 | [Desktop Action sffe] 48 | Exec=reimage-kdialog sffe %F 49 | Icon=knotes_date 50 | Name=Set file date from Exif date 51 | Name[it]=Imposta la data del file a quella Exif 52 | 53 | [Desktop Action sffn] 54 | Exec=reimage-kdialog sffn %F 55 | Icon=knotes_date 56 | Name=Set file date from file's name 57 | Name[it]=Imposta la data del file a quella del nome 58 | 59 | ################################################################################ 60 | 61 | [Desktop Action seff] 62 | Exec=reimage-kdialog seff %F 63 | Icon=knotes_date 64 | Name=Set Exif date from file's date 65 | Name[it]=Imposta la data Exif a quella del file 66 | 67 | [Desktop Action sefn] 68 | Exec=reimage-kdialog sefn %F 69 | Icon=knotes_date 70 | Name=Set Exif date from file's name 71 | Name[it]=Imposta la data Exif a quella del nome 72 | 73 | ################################################################################ 74 | 75 | [Desktop Action add_comment] 76 | Exec=reimage-kdialog ac %F 77 | Icon=knotes_date 78 | Name=Add comment 79 | Name[it]=Aggiungi un commento 80 | 81 | [Desktop Action view_metadata] 82 | Exec=reimage-kdialog ve %F 83 | Icon=knotes_date 84 | Name=View metadata 85 | Name[it]=Visualizza metadati 86 | 87 | [Desktop Action extract_metadata] 88 | Exec=reimage-kdialog ee %F 89 | Icon=knotes_date 90 | Name=Extract metadata to file 91 | Name[it]=Estrai metadati in un file 92 | 93 | ################################################################################ 94 | 95 | [Desktop Action del_comment] 96 | Exec=reimage-kdialog dc %F 97 | Icon=knotes_date 98 | Name=Delete comment field 99 | Name[it]=Cancella commento 100 | 101 | [Desktop Action del_exif] 102 | Exec=reimage-kdialog de %F 103 | Icon=knotes_date 104 | Name=Strip Exif section 105 | Name[it]=Cancella le informazioni Exif 106 | 107 | [Desktop Action del_iptc] 108 | Exec=reimage-kdialog di %F 109 | Icon=knotes_date 110 | Name=Delete IPTC section 111 | Name[it]=Cancella le informazioni IPTC 112 | 113 | [Desktop Action del_xmp] 114 | Exec=reimage-kdialog dx %F 115 | Icon=knotes_date 116 | Name=Delete XMP section 117 | Name[it]=Cancella le informazioni XMP 118 | 119 | [Desktop Action del_all] 120 | Exec=reimage-kdialog purejpg %F 121 | Icon=knotes_date 122 | Name=Strip all unnecessary data 123 | Name[it]=Cancella tutti i metadati 124 | 125 | ################################################################################ 126 | 127 | [Desktop Action tfe] 128 | Exec=reimage-kdialog timestamp %F 129 | Icon=knotes_date 130 | Name=Add timestamp from Exif 131 | Name[it]=Aggiungi timestamp da Exif 132 | -------------------------------------------------------------------------------- /ServiceMenus/reimage-convert-rotate.desktop: -------------------------------------------------------------------------------- 1 | # 2 | # Part of kde-service-menu-reimage Version 2.6.0 3 | # Copyright (C) 2018-2019 Giuseppe Benigno 4 | # Copyright (C) 2024 Robert-André Mauchin 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # SPDX-License-Identifier: GPL-3.0-or-later 20 | # 21 | 22 | [Desktop Entry] 23 | Actions=avif;heic;jpeg;jxl;png;gif;tiff;webp;_SEPARATOR_;pdf;pdfa;_SEPARATOR_;favicons;base64;convert_custom;formats;_SEPARATOR_;rotate_90;rotate_180;rotate_270;rotate_custom;auto;_SEPARATOR_;flip;flop; 24 | MimeType=image/* 25 | Name=ReImage convert and rotate service menu 26 | TryExec=reimage-kdialog 27 | Type=Service 28 | X-KDE-Submenu=ReImage - Convert and rotate 29 | X-KDE-Submenu[it]=ReImage - Conversione e rotazione 30 | 31 | ################################################################################ 32 | 33 | [Desktop Action avif] 34 | Exec=reimage-kdialog convert avif %F 35 | Icon=image-avif 36 | Name=Convert to AVIF 37 | Name[it]=Converti in AVIF 38 | 39 | [Desktop Action gif] 40 | Exec=reimage-kdialog convert gif %F 41 | Icon=image-gif 42 | Name=Convert to GIF 43 | Name[it]=Converti in GIF 44 | 45 | [Desktop Action heic] 46 | Exec=reimage-kdialog convert heic %F 47 | Icon=image-heic 48 | Name=Convert to HEIF 49 | Name[it]=Converti in HEIF 50 | 51 | [Desktop Action jpeg] 52 | Exec=reimage-kdialog convert jpg %F 53 | Icon=image-jpeg 54 | Name=Convert to JPEG 55 | Name[it]=Converti in JPEG 56 | 57 | [Desktop Action jxl] 58 | Exec=reimage-kdialog convert jxl %F 59 | Icon=image-jxl 60 | Name=Convert to JXL 61 | Name[it]=Converti in JXL 62 | 63 | [Desktop Action png] 64 | Exec=reimage-kdialog convert png %F 65 | Icon=image-png 66 | Name=Convert to PNG 67 | Name[it]=Converti in PNG 68 | 69 | [Desktop Action tiff] 70 | Exec=reimage-kdialog convert tif %F 71 | Icon=image-tiff 72 | Name=Convert to TIFF 73 | Name[it]=Converti in TIFF 74 | 75 | [Desktop Action webp] 76 | Exec=reimage-kdialog convert webp %F 77 | Icon=image-webp 78 | Name=Convert to WEBP 79 | Name[it]=Converti in WEBP 80 | 81 | ################################################################################ 82 | 83 | [Desktop Action pdf] 84 | Exec=reimage-kdialog convert pdf %F 85 | Icon=application-pdf 86 | Name=Convert to PDF 87 | Name[it]=Converti in PDF 88 | 89 | [Desktop Action pdfa] 90 | Exec=reimage-kdialog convert pdfa %F 91 | Icon=application-pdf 92 | Name=Convert to PDF/A-1 93 | Name[it]=Converti in PDF/A-1 94 | 95 | ################################################################################ 96 | 97 | [Desktop Action favicons] 98 | Exec=reimage-kdialog favicons all %F 99 | Icon=image-ico 100 | Name=Generate favicons 101 | Name[it]=Genera favicons 102 | 103 | [Desktop Action base64] 104 | Exec=for i in %F; do cat "$i" | base64 -w0 > "$i".base64; done 105 | Icon=text-plain 106 | Name=Convert to Base64 107 | Name[it]=Converti in Base64 108 | 109 | [Desktop Action convert_custom] 110 | Exec=reimage-kdialog convert custom %F 111 | Icon=image 112 | Name=Convert to format ... 113 | Name[it]=Formato personalizzato ... 114 | 115 | [Desktop Action formats] 116 | Exec=reimage-kdialog convert formats 117 | Icon=view-list-text 118 | Name=Formats list 119 | Name[it]=Elenco formati 120 | 121 | ################################################################################ 122 | 123 | [Desktop Action rotate_90] 124 | Exec=reimage-kdialog rotate 90 %F 125 | Icon=image-rotate-right-symbolic 126 | Name=Rotate 90° 127 | Name[it]=Ruota di 90° 128 | 129 | [Desktop Action rotate_180] 130 | Exec=reimage-kdialog rotate 180 %F 131 | Icon=image-rotate-right-symbolic 132 | Name=Rotate 180° 133 | Name[it]=Ruota di 180° 134 | 135 | [Desktop Action rotate_270] 136 | Exec=reimage-kdialog rotate 270 %F 137 | Icon=image-rotate-left-symbolic 138 | Name=Rotate (-90°) 139 | Name[it]=Ruota di -90° 140 | 141 | [Desktop Action rotate_custom] 142 | Exec=reimage-kdialog rotate custom %F 143 | Icon=view-refresh 144 | Name=Rotate custom 145 | Name[it]=Angolo personalizzato 146 | 147 | [Desktop Action auto] 148 | Exec=reimage-kdialog rotate auto %F 149 | Icon=view-refresh 150 | Name=Auto-rotate with Exif 151 | Name[it]=Auto-ruota tramite dati Exif 152 | 153 | ################################################################################ 154 | 155 | [Desktop Action flip] 156 | Exec=reimage-kdialog overturn flip %F 157 | Icon=image-flip-vertical-symbolic 158 | Name=Overturn vertically 159 | Name[it]=Ribalta verticalmente 160 | 161 | [Desktop Action flop] 162 | Exec=reimage-kdialog overturn flop %F 163 | Icon=image-flip-horizontal-symbolic 164 | Name=Overturn horizontally 165 | Name[it]=Ribalta orizzontalmente 166 | -------------------------------------------------------------------------------- /ServiceMenus/reimage-compress-resize.desktop: -------------------------------------------------------------------------------- 1 | # 2 | # Part of kde-service-menu-reimage Version 2.6.0 3 | # Copyright (C) 2018-2019 Giuseppe Benigno 4 | # Copyright (C) 2024 Robert-André Mauchin 5 | # 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # SPDX-License-Identifier: GPL-3.0-or-later 20 | # 21 | 22 | [Desktop Entry] 23 | Actions=progressive;optimize;_SEPARATOR_;compress_50;compress_70;compress_75;compress_80;compress_90;custom_compress;_SEPARATOR_;resize_25;resize_33;resize_50;resize_67;resize_75;_SEPARATOR_;320x240;800x600;_SEPARATOR_;1024x768;1200x900;1400x1050;_SEPARATOR_;1920x1080;1920x1200;2560x1080;_SEPARATOR_;2560x1440;2560x1600;3440x1440;_SEPARATOR_;3840x2160;5120x2160;_SEPARATOR_;custom_resize; 24 | MimeType=image/* 25 | Name=ReImage compress and resize service menu 26 | TryExec=reimage-kdialog 27 | Type=Service 28 | X-KDE-Submenu=ReImage - Compress and resize 29 | X-KDE-Submenu[it]=ReImage - Compressione e ridimensionamento 30 | 31 | ################################################################################ 32 | 33 | [Desktop Action progressive] 34 | Exec=reimage-kdialog progressive %F 35 | Icon=viewhtml 36 | Name=Make progressive 37 | Name[it]=Rendi progressiva 38 | 39 | [Desktop Action optimize] 40 | Exec=reimage-kdialog optimize %F 41 | Icon=viewhtml 42 | Name=Complete optimization for web 43 | Name[it]=Ottimizzazione completa per il web 44 | 45 | [Desktop Action compress_50] 46 | Exec=reimage-kdialog compress 50% %F 47 | Icon=application-x-compressed-tar 48 | Name=Compress at 50% 49 | Name[it]=Comprimi al 50% 50 | 51 | [Desktop Action compress_70] 52 | Exec=reimage-kdialog compress 70% %F 53 | Icon=application-x-compressed-tar 54 | Name=Compress at 70% 55 | Name[it]=Comprimi al 70% 56 | 57 | [Desktop Action compress_75] 58 | Exec=reimage-kdialog compress 75% %F 59 | Icon=application-x-compressed-tar 60 | Name=Compress at 75% 61 | Name[it]=Comprimi al 75% 62 | 63 | [Desktop Action compress_80] 64 | Exec=reimage-kdialog compress 80% %F 65 | Icon=application-x-compressed-tar 66 | Name=Compress at 80% 67 | Name[it]=Comprimi al 80% 68 | 69 | [Desktop Action compress_90] 70 | Exec=reimage-kdialog compress 90% %F 71 | Icon=application-x-compressed-tar 72 | Name=Compress at 90% 73 | Name[it]=Comprimi al 90% 74 | 75 | [Desktop Action custom_compress] 76 | Exec=reimage-kdialog compress custom %F 77 | Icon=application-x-compressed-tar 78 | Name=Custom quality 79 | Name[it]=Qualità personalizzata 80 | 81 | ################################################################################ 82 | 83 | [Desktop Action resize_25] 84 | Exec=reimage-kdialog resize 25% %F 85 | Icon=image-resize-symbolic 86 | Name=Resize at 25% 87 | Name[it]=Ridimensiona al 25% 88 | 89 | [Desktop Action resize_33] 90 | Exec=reimage-kdialog resize 33% %F 91 | Icon=image-resize-symbolic 92 | Name=Resize at 33% 93 | Name[it]=Ridimensiona al 33% 94 | 95 | [Desktop Action resize_50] 96 | Exec=reimage-kdialog resize 50% %F 97 | Icon=image-resize-symbolic 98 | Name=Resize at 50% 99 | Name[it]=Ridimensiona al 50% 100 | 101 | [Desktop Action resize_67] 102 | Exec=reimage-kdialog resize 67% %F 103 | Icon=image-resize-symbolic 104 | Name=Resize at 67% 105 | Name[it]=Ridimensiona al 67% 106 | 107 | [Desktop Action resize_75] 108 | Exec=reimage-kdialog resize 75% %F 109 | Icon=image-resize-symbolic 110 | Name=Resize at 75% 111 | Name[it]=Ridimensiona al 75% 112 | 113 | ################################################################################ 114 | 115 | [Desktop Action 320x240] 116 | Exec=reimage-kdialog resize 320x240 %F 117 | Icon=image-resize-symbolic 118 | Name=Resize at 320x240 px 119 | Name[it]=Ridimensiona a 320x240 px 120 | 121 | [Desktop Action 640x480] 122 | Exec=reimage-kdialog resize 640x480 %F 123 | Icon=image-resize-symbolic 124 | Name=Resize at 640x480 px 125 | Name[it]=Ridimensiona a 640x480 px 126 | 127 | [Desktop Action 800x600] 128 | Exec=reimage-kdialog resize 800x600 %F 129 | Icon=image-resize-symbolic 130 | Name=Resize at 800x600 px 131 | Name[it]=Ridimensiona a 800x600 px 132 | 133 | [Desktop Action 1024x768] 134 | Exec=reimage-kdialog resize 1024x768 %F 135 | Icon=image-resize-symbolic 136 | Name=Resize at 1024x768 px 137 | Name[it]=Ridimensiona a 1024x768 px 138 | 139 | [Desktop Action 1200x900] 140 | Exec=reimage-kdialog resize 1200x900 %F 141 | Icon=image-resize-symbolic 142 | Name=Resize at 1200x900 px 143 | Name[it]=Ridimensiona a 1200x900 px 144 | 145 | [Desktop Action 1400x1050] 146 | Exec=reimage-kdialog resize 1400x1050 %F 147 | Icon=image-resize-symbolic 148 | Name=Resize at 1400x1050 px 149 | Name[it]=Ridimensiona a 1400x1050 px 150 | 151 | [Desktop Action 1920x1080] 152 | Exec=reimage-kdialog resize 1920x1080 %F 153 | Icon=image-resize-symbolic 154 | Name=Resize at 1920x1080 px 155 | Name[it]=Ridimensiona a 1920x1080 px 156 | 157 | [Desktop Action 1920x1200] 158 | Exec=reimage-kdialog resize 1920x1200 %F 159 | Icon=image-resize-symbolic 160 | Name=Resize at 1920x1200 px 161 | Name[it]=Ridimensiona a 1920x1200 px 162 | 163 | [Desktop Action 2560x1080] 164 | Exec=reimage-kdialog resize 2560x1080 %F 165 | Icon=image-resize-symbolic 166 | Name=Resize at 2560x1080 px 167 | Name[it]=Ridimensiona a 2560x1080 px 168 | 169 | [Desktop Action 2560x1440] 170 | Exec=reimage-kdialog resize 2560x1440 %F 171 | Icon=image-resize-symbolic 172 | Name=Resize at 2560x1440 px 173 | Name[it]=Ridimensiona a 2560x1440 px 174 | 175 | [Desktop Action 2560x1600] 176 | Exec=reimage-kdialog resize 2560x1600 %F 177 | Icon=image-resize-symbolic 178 | Name=Resize at 2560x1600 px 179 | Name[it]=Ridimensiona a 2560x1600 px 180 | 181 | [Desktop Action 3440x1440] 182 | Exec=reimage-kdialog resize 3440x1440 %F 183 | Icon=image-resize-symbolic 184 | Name=Resize at 3440x1440 px 185 | Name[it]=Ridimensiona a 3440x1440 px 186 | 187 | [Desktop Action 3840x2160] 188 | Exec=reimage-kdialog resize 3840x2160 %F 189 | Icon=image-resize-symbolic 190 | Name=Resize at 3840x2160 px 191 | Name[it]=Ridimensiona a 3840x2160 px 192 | 193 | [Desktop Action 5120x2160] 194 | Exec=reimage-kdialog resize 5120x2160 %F 195 | Icon=image-resize-symbolic 196 | Name=Resize at 5120x2160 px 197 | Name[it]=Ridimensiona a 5120x2160 px 198 | 199 | ################################################################################ 200 | 201 | [Desktop Action custom_resize] 202 | Exec=reimage-kdialog resize custom %F 203 | Icon=image-resize-symbolic 204 | Name=Custom resize 205 | Name[it]=Ridimensionamento personalizzato 206 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /bin/reimage-kdialog: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # 3 | # Part of kde-service-menu-reimage Version 2.6.0 4 | # Copyright (C) 2018-2019 Giuseppe Benigno 5 | # Copyright (C) 2024 Robert-André Mauchin 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # 20 | # SPDX-License-Identifier: GPL-3.0-or-later 21 | # 22 | 23 | #### languages strings messages ################# 24 | # Syntax for strings name is: msg_[$format]_$window_[$section] 25 | # For languages as sr@Latn use srLatn 26 | 27 | new_line=" 28 | " 29 | 30 | load_language_en_US () { 31 | msg_common_software_not_found_title="Software not found" 32 | msg_common_magick_not_found_text="Software ImageMagick not found! Please, install it." 33 | msg_common_jhead_not_found_text="Software jhead not found! Please, install it." 34 | msg_common_webp_not_found_text="Software webp not found! Please, install it." 35 | msg_common_action_not_found_text="The requested action is not implemented." 36 | msg_common_overwrite_text="In case the images to be saved have the same name as those to be processed,${new_line}do you want to overwrite them?" 37 | msg_common_abort="Operation interrupted by the user." 38 | msg_common_file_not_found="File \"${name}\" not found!" 39 | msg_common_name_error="The file name \"${name}\" does not match a recognized format for a date.${new_line}${new_line}The name must be of the type: YYYY-MM-DD_HHMMSS.jpg" 40 | msg_common_start="Initialising ... " 41 | msg_common_progress_text="Processing file $processed of $quantity ($(basename "${input}"))" 42 | msg_common_finish_ok="Done." 43 | msg_common_finish_error="An error has occurred." 44 | msg_common_transparent_unsupported_text="The JPEG format does not support transparency.${new_line}Convert to PNG file." 45 | # msg_common_details="Details:" 46 | 47 | msg_agif_title="Convert files into animated GIF" 48 | msg_agif_delay_input_text="Enter the duration of the single frame, in hundredths of a second:${new_line}(100 = 1 second)" 49 | msg_agif_loop_input_text="Do you want loop playback?" 50 | msg_agif_cicles_number_input_text="Type the number of repetitions of the animation:" 51 | msg_agif_finish_title="Convert files into animated GIF" 52 | 53 | msg_apng_title="Convert files into animated PNG" 54 | msg_apng_delay_input_text="Enter the duration of the single frame, in hundredths of a second:${new_line}(100 = 1 second)" 55 | msg_apng_loop_input_text="Do you want loop playback?" 56 | msg_apng_cicles_number_input_text="Type the number of repetitions of the animation:" 57 | msg_apng_finish_title="Convert files into animated PNG" 58 | 59 | msg_webp_title="Convert files into animated WEBP" 60 | msg_webp_delay_input_text="Enter the duration of the single frame, in hundredths of a second:${new_line}(100 = 1 second)" 61 | msg_webp_loop_input_text="Do you want loop playback?" 62 | msg_webp_cicles_number_input_text="Type the number of repetitions of the animation:" 63 | msg_webp_finish_title="Convert files into animated WEBP" 64 | 65 | msg_border_title="Add border" 66 | msg_border_size_input_text="Type the size of border in percentage or in pixel.${new_line}${new_line}Valid values can be: 10% or 50" 67 | msg_border_finish_title="Add border to \"${name}\"" 68 | 69 | msg_colorspace_title="Changing colorspace to \"${value}\"" 70 | msg_colorspace_finish_title="Changing colorspace of \"${name}\"" 71 | 72 | msg_compress_title="Image compression with quality \"${value}\"" 73 | msg_compress_quality_input_text="Type the quality:" 74 | msg_compress_finish_title="Compression of \"${name}\"" 75 | 76 | msg_convert_title="Convert file to \"${value}\" format" 77 | msg_convert_format_input_text="Type the format you want.${new_line}A complete list can be obtained from the shell with: mogrify -list format${new_line}or by consulting the ImageMagick manual." 78 | msg_convert_finish_title="Convertion of \"${name}\"" 79 | 80 | msg_favicons_title="Favicons generation" 81 | msg_favicons_finish_title="Generating favicons by \"${name}\"" 82 | 83 | msg_montage_title="Append picture" 84 | msg_montage_finish_title="Append picture to \"${name}\"" 85 | 86 | msg_optimize_title="Optimization for web" 87 | msg_optimize_finish_title="Optimize \"${name}\"" 88 | 89 | msg_overturn_title="Overturn file to \"${value}\"" 90 | msg_overturn_finish_title="Overturn \"${name}\"" 91 | 92 | msg_resize_title="Resizing image \"${value}\"" 93 | msg_resize_scale_input_text="Type the scale factor in percentage or the maximum size you want for each direction.${new_line}You can choose a percentage or a pixel size.${new_line}${new_line}Valid values can be: 30% or 1024x768" 94 | msg_resize_finish_title="Resizing of \"${name}\"" 95 | 96 | msg_rotate_title="Rotate file with angle of \"${value}\"" 97 | msg_rotate_angle_input_text="Enter the desired rotation angle:" 98 | msg_rotate_finish_title="Rotation \"${name}\"" 99 | 100 | msg_sepia_title="Sepia filter" 101 | msg_sepia_finish_title="Sepia filter to \"${name}\"" 102 | 103 | msg_shadow_title="Drop shadow" 104 | msg_shadow_finish_title="Drop shadow to \"${name}\"" 105 | 106 | msg_timestamp_title="Add timestamp" 107 | msg_timestamp_finish_title="Add timestamp to \"${name}\"" 108 | 109 | msg_transparent2color_title="Changing transparence to color" 110 | msg_transparent2color_finish_title="Changing transparence to color of \"${name}\"" 111 | 112 | msg_rfe_title="Rename file from Exif metadata" 113 | msg_rfe_no_metadata="Is it possible that the image does not contain metadata." 114 | msg_rfe_finish_title="Rename file \"${name}\"" 115 | 116 | msg_rff_title="Rename file from file's date" 117 | msg_rff_finish_title="Rename file \"${name}\"" 118 | 119 | msg_sffe_title="Setting file date from Exif Metadata" 120 | msg_sffe_no_metadata="Is it possible that the image does not contain metadata." 121 | msg_sffe_finish_title="Setting date of \"${name}\"" 122 | 123 | msg_sffn_title="Setting file date from file name" 124 | msg_sffn_finish_title="Setting date of \"${name}\"" 125 | 126 | msg_seff_title="Setting Exif date from file date" 127 | msg_seff_finish_title="Setting date of \"${name}\"" 128 | 129 | msg_sefn_title="Setting Exif date from file name" 130 | msg_sefn_finish_title="Setting date of \"${name}\"" 131 | 132 | msg_ac_title="Add comment" 133 | msg_ac_comment_input_text="Write comment to add:" 134 | msg_ac_finish_title="Add comment into \"${name}\"" 135 | 136 | msg_ve_title="View metadata" 137 | msg_ve_finish_title="View metadata of \"${name}\"" 138 | 139 | msg_ee_title="Extract metadata" 140 | msg_ee_finish_title="Extract metadata from \"${name}\"" 141 | 142 | msg_dc_title="Delete comment" 143 | msg_dc_finish_title="Delete comment from \"${name}\"" 144 | 145 | msg_de_title="Strip Exif section" 146 | msg_de_finish_title="Strip Exif section from \"${name}\"" 147 | 148 | msg_di_title="Delete IPTC section" 149 | msg_di_finish_title="Delete IPTC section from \"${name}\"" 150 | 151 | msg_dx_title="Deletex XMP section" 152 | msg_dx_finish_title="Deletex XMP section from \"${name}\"" 153 | 154 | msg_purejpg_title="Strip all unnecessary data" 155 | msg_purejpg_finish_title="Strip all unnecessary data from \"${name}\"" 156 | } 157 | 158 | load_language_it () { 159 | msg_common_software_not_found_title="Software non trovato" 160 | msg_common_mogrify_not_found_text="Il software ImageMagick non è stato trovato! Per favore, installalo." 161 | msg_common_convert_not_found_text="Il software ImageMagick non è stato trovato! Per favore, installalo." 162 | msg_common_montage_not_found_text="Il software ImageMagick non è stato trovato! Per favore, installalo." 163 | msg_common_jhead_not_found_text="Il software jhead non è stato trovato! Per favore, installalo." 164 | msg_common_webp_not_found_text="Il software webp non è stato trovato! Per favore, installalo." 165 | msg_common_action_not_found_text="L'azione richiesta non è implementata." 166 | msg_common_overwrite_text="Nel caso che le immagini da salvare abbiano lo stesso nome di quelle da elaborare,${new_line}vuoi sovrascriverle?" 167 | msg_common_abort="Operazione interrotta dall'utente." 168 | msg_common_file_not_found="Il file \"${name}\" non è stato trovato!" 169 | msg_common_name_error="Il nome del file \"${name}\" non corrisponde ad un formato riconosciuto per una data.${new_line}${new_line}Il nome deve essere del tipo: YYYY-MM-DD_HHMMSS.jpg" 170 | msg_common_start="Inizializzazione ..." 171 | msg_common_progress_text="Elaborazione file $processed di $quantity ($(basename "${input}"))" 172 | msg_common_finish_ok="Completato." 173 | msg_common_finish_error="Si è verificato un errore durante l'operazione corrente." 174 | msg_common_transparent_unsupported_text="Il formato JPEG non supporta la trasparenza.${new_line}Converto in PNG." 175 | # msg_common_details="Dettagli:" 176 | 177 | msg_agif_title="Conversione files in una GIF animata" 178 | msg_agif_delay_input_text="Inserire la durata del singolo frame, in centesimi di secondo:${new_line}(100 = 1 secondo)" 179 | msg_agif_loop_input_text="Vuoi che il file venga riprodotto in loop?" 180 | msg_agif_cicles_number_input_text="Digitare il numero di ripetizioni dell'anumazione:" 181 | msg_agif_finish_title="Conversione files in una GIF animata" 182 | 183 | msg_border_title="Aggiungi bordo" 184 | msg_border_size_input_text="Digitare la dimensione del bordo desiderata, in percentuale o in pixel.${new_line}${new_line}Valori validi possono essere: 10% or 50" 185 | msg_border_finish_title="Aggiunta del bordo a \"${name}\"" 186 | 187 | msg_colorspace_title="Cambiamento dello spazio dei colori a \"${value}\"" 188 | msg_colorspace_finish_title="Cambiamento dello spazio dei colori di \"${name}\"" 189 | 190 | msg_compress_title="Compressione immagine con qualità \"${value}\"" 191 | msg_compress_quality_input_text="Digitare la qualità che si desidera." 192 | msg_compress_finish_title="Compressione di \"${name}\"" 193 | 194 | msg_convert_title="Conversione immagine nel formato \"${value}\"" 195 | msg_convert_format_input_text="Digitare il formato che si desidera.${new_line}Una lista completa può essere ottenuta da shell con: mogrify -list format${new_line}oppure consultando il manuale di ImageMagick." 196 | msg_convert_finish_title="Conversione di \"${name}\"" 197 | 198 | msg_favicons_title="Generazione favicons" 199 | msg_favicons_finish_title="Generazione favicons da \"${name}\"" 200 | 201 | msg_montage_title="Affiancamento immagine" 202 | msg_montage_finish_title="Affiancamento immagine a \"${name}\"" 203 | 204 | msg_optimize_title="Ottimizzazione per il web" 205 | msg_optimize_finish_title="Ottimizzazione \"${name}\"" 206 | 207 | msg_overturn_title="Ribalta \"${value}\"" 208 | msg_overturn_finish_title="Ribaltamento file \"${name}\"" 209 | 210 | msg_resize_title="Ridimensionamento immagine \"${value}\"" 211 | msg_resize_scale_input_text="Digitare il fattore di scala in percentuale o la dimensione massima che si desidera per ogni direzione.${new_line}È possibile scegliere una percentuale o una dimensione in pixel.${new_line}${new_line}Valori validi possono essere: 30% oppure 300x300" 212 | msg_resize_finish_title="Ridimensionamento di \"${name}\"" 213 | 214 | msg_rotate_title="Rotazione file di \"${value}\" gradi" 215 | msg_rotate_angle_input_text="Inserire l'angolo di rotazione desiderato:" 216 | msg_rotate_finish_title="Rotazione del file \"${name}\"" 217 | 218 | msg_sepia_title="Effetto seppia" 219 | msg_sepia_finish_title="Effetto seppia a \"${name}\"" 220 | 221 | msg_shadow_title="Aggiungi ombra" 222 | msg_shadow_finish_title="Aggiungi ombra a \"${name}\"" 223 | 224 | msg_timestamp_title="Aggiungi timestamp" 225 | msg_timestamp_finish_title="Aggiungi timestamp a \"${name}\"" 226 | 227 | msg_transparent2color_title="Cambio della trasparenza a colore" 228 | msg_transparent2color_finish_title="Cambio della trasparenza a colore di \"${name}\"" 229 | 230 | msg_rfe_title="Rinomina file con la data Exif" 231 | msg_rfe_no_metadata="È possibile che l'immagine non contenga metadati." 232 | msg_rfe_finish_title="Rinomina file \"${name}\"" 233 | 234 | msg_rff_title="Rinomina file con la data del file" 235 | msg_rff_finish_title="Rinomina file \"${name}\"" 236 | 237 | msg_sffe_title="Cambiamento data del file con la data Exif" 238 | msg_sffe_no_metadata="È possibile che l'immagine non contenga metadati." 239 | msg_sffe_finish_title="Cambiamento data di \"${name}\"" 240 | 241 | msg_sffn_title="Cambiamento data del file dal nome" 242 | msg_sffn_finish_title="Cambiamento data di \"${name}\"" 243 | 244 | msg_seff_title="Cambiamento data Exif dalla data del file" 245 | msg_seff_finish_title="Cambiamento data di \"${name}\"" 246 | 247 | msg_sefn_title="Cambiamento data Exif dal nome del file" 248 | msg_sefn_finish_title="Cambiamento data di \"${name}\"" 249 | 250 | msg_ac_title="Aggiungi un commento" 251 | msg_ac_comment_input_text="Scrivi il commento da aggiungere:" 252 | msg_ac_finish_title="Aggiungi un commento in \"${name}\"" 253 | 254 | msg_ve_title="Visualizza metadati" 255 | msg_ve_finish_title="Visualizza metadati di \"${name}\"" 256 | 257 | msg_ee_title="Estrai metadati" 258 | msg_ee_finish_title="Estrai metadati da \"${name}\"" 259 | 260 | msg_dc_title="Cancella commento" 261 | msg_dc_finish_title="Cancella commento da \"${name}\"" 262 | 263 | msg_de_title="Svuota i metadati Exif" 264 | msg_de_finish_title="Svuota i metadati Exif da \"${name}\"" 265 | 266 | msg_di_title="Svuota i metadati IPTC" 267 | msg_di_finish_title="Svuota i metadati IPTC da \"${name}\"" 268 | 269 | msg_dx_title="Svuota i metadati XMP" 270 | msg_dx_finish_title="Svuota i metadati XMP da \"${name}\"" 271 | 272 | msg_purejpg_title="Elimina medatati non necessari" 273 | msg_purejpg_finish_title="Elimina medatati non necessari da \"${name}\"" 274 | } 275 | 276 | load_language () { 277 | ## Load localized strings AFTER english strings 278 | ## - if localized strings not found use english for default 279 | ## - if localized strings are incomplete use english only fot missing strings :-) 280 | load_language_en_US && [ "${lang}" != "en_US" ] && load_language_${lang} 281 | } 282 | 283 | lang=${LANGUAGE%%:*} 284 | type load_language_${lang} &> /dev/null || lang='en_US' 285 | load_language 286 | 287 | ################################################################################ 288 | 289 | help () { 290 | echo "${0##*/} is a bash script for:" 291 | echo "- manipulating settings in Exif jpeg headers used by most Digital Cameras." 292 | echo "- manipulating pictures properties" 293 | echo 294 | echo "USE: ${0##*/} action [value] files" 295 | echo 296 | echo "Actions on pictures:" 297 | echo "agif create animated gif (no value request)" 298 | echo "apng create animated png (no value request)" 299 | echo "webp create animated webp (no value request)" 300 | echo "colorspace change colorspace (currently only gray)" 301 | echo "compress change quality (value in percent 1 to 100)" 302 | echo "convert change format (value: all formats supported by ImageMagick" 303 | echo "optimize Advance auto-optimization for web (no value request)" 304 | echo "overturn overturn image (value: flip, flop)" 305 | echo "resize resize image (value in percent or XxY)" 306 | echo "rotate rotate image (value is angle of rotation)" 307 | echo "sepia sepia filter to image (value is percent of used filter)" 308 | echo 309 | echo "Actions with metadata:" 310 | echo "rfe rename file with Exif datetime" 311 | echo "rff rename file with file's datetime" 312 | echo "sffe set file's datetime from Exif date" 313 | echo "sffn set file's datetime from file's name" 314 | echo "seff set Exif datetime from file's date" 315 | echo "sefn set Exif datetime from file's name" 316 | echo "ac Add/replace comment" 317 | echo "ve View metadata" 318 | echo "ee Extract metadata to file" 319 | echo "dc Delete comment field" 320 | echo "de Strip Exif section" 321 | echo "di Delete IPTC section" 322 | echo "dx Delete XMP section" 323 | echo "purejpeg Strip all unnecessary data" 324 | echo 325 | echo 326 | echo "Examples:" 327 | echo "${0##*/} optimize /home/user/file1.jpg /home/user/file2.jpg" 328 | echo "${0##*/} compress 70% /home/user/file1.jpg /home/user/file2.jpg" 329 | echo "${0##*/} resize 50% /home/user/file1.jpg /home/user/file2.jpg" 330 | echo "${0##*/} resize 640x480 /home/user/file1.jpg /home/user/file2.jpg" 331 | echo 332 | echo "${0##*/} convert png /home/user/file1.jpg /home/user/file2.jpg" 333 | echo "${0##*/} agif /home/user/file1.jpg /home/user/file2.jpg" 334 | echo "${0##*/} apng /home/user/file1.jpg /home/user/file2.jpg" 335 | echo "${0##*/} webp /home/user/file1.jpg /home/user/file2.jpg" 336 | echo "${0##*/} colorspace gray /home/user/file1.jpg /home/user/file2.jpg" 337 | echo "${0##*/} sepia 80% /home/user/file1.jpg /home/user/file2.jpg" 338 | echo "${0##*/} transparent2color /home/user/file1.png /home/user/file2.png" 339 | echo "${0##*/} border custom /home/user/file1.png /home/user/file2.jpg" 340 | echo "${0##*/} border transparent /home/user/file1.png /home/user/file2.png" 341 | echo "${0##*/} shadow /home/user/file1.png /home/user/file2.png" 342 | echo "${0##*/} rotate 90 /home/user/file1.jpg /home/user/file2.jpg" 343 | echo "${0##*/} overturn flip /home/user/file1.jpg /home/user/file2.jpg" 344 | echo 345 | echo "${0##*/} timestamp /home/user/file1.jpg /home/user/file2.jpg" 346 | echo 347 | echo "${0##*/} rfe /home/user/file1.jpg /home/user/file2.jpg" 348 | echo 349 | exit 0 350 | } 351 | 352 | formats () { 353 | formats=" 354 | AAI AAI Dune image 355 | AI Adobe Illustrator CS2 356 | ART PFS: 1st Publisher Clip Art 357 | ARW Sony Alpha Raw Image Format 358 | AVIF AVIF image file 359 | AVS AVS X image 360 | BGR Raw blue, green, and red samples 361 | BGRA Raw blue, green, red, and alpha samples 362 | BGRO Raw blue, green, red, and opacity samples 363 | BIE Joint Bi-level Image experts Group interchange format (2.1) 364 | BMP Microsoft Windows bitmap image 365 | BMP2 Microsoft Windows bitmap image (V2) 366 | BMP3 Microsoft Windows bitmap image (V3) 367 | BRF BRF ASCII Braille format 368 | CAL Continuous Acquisition and Life-cycle Support Type 1 369 | CALS Continuous Acquisition and Life-cycle Support Type 1 370 | CANVAS Constant image uniform color 371 | CIN Cineon Image File 372 | CIP Cisco IP phone image format 373 | CLIP Image Clip Mask 374 | CMYK Raw cyan, magenta, yellow, and black samples 375 | CMYKA Raw cyan, magenta, yellow, black, and alpha samples 376 | CR2 Canon Digital Camera Raw Image Format 377 | CRW Canon Digital Camera Raw Image Format 378 | CUR Microsoft icon 379 | CUT DR Halo 380 | DCM Digital Imaging and Communications in Medicine image 381 | DCR Kodak Digital Camera Raw Image File 382 | DCX ZSoft IBM PC multi-page Paintbrush 383 | DDS Microsoft DirectDraw Surface 384 | DFONT Multi-face font package (Freetype 2.8.0) 385 | DNG Digital Negative 386 | DOT Graphviz 387 | DPX SMPTE 268M-2003 (DPX 2.0) 388 | DXT1 Microsoft DirectDraw Surface 389 | DXT5 Microsoft DirectDraw Surface 390 | EPDF Encapsulated Portable Document Format 391 | EPI Encapsulated PostScript Interchange format 392 | EPS Encapsulated PostScript 393 | EPS2 Level II Encapsulated PostScript 394 | EPS3 Level III Encapsulated PostScript 395 | EPSF Encapsulated PostScript 396 | EPSI Encapsulated PostScript Interchange format 397 | EPT Encapsulated PostScript with TIFF preview 398 | EPT2 Encapsulated PostScript Level II with TIFF preview 399 | EPT3 Encapsulated PostScript Level III with TIFF preview 400 | ERF Epson Raw Format 401 | EXR High Dynamic-range (HDR) 402 | FAX Group 3 FAX 403 | FILE Uniform Resource Locator (file://) 404 | FITS Flexible Image Transport System 405 | FRACTAL Plasma fractal image 406 | FTP Uniform Resource Locator (ftp://) 407 | FTS Flexible Image Transport System 408 | G3 Group 3 FAX 409 | G4 Group 4 FAX 410 | GIF CompuServe graphics interchange format 411 | GIF87 CompuServe graphics interchange format (version 87a) 412 | GRADIENT Gradual linear passing from one shade to another 413 | GRAY Raw gray samples 414 | GROUP4 Raw CCITT Group4 415 | GV Graphviz 416 | H Image expressed as a 'C/C++' char array 417 | HALD Identity Hald color lookup table image 418 | HDR Radiance RGBE image format 419 | HEIF HEIF image file 420 | HISTOGRAM Histogram of the image 421 | HRZ Slow Scan TeleVision 422 | HTM Hypertext Markup Language and a client-side image map 423 | HTML Hypertext Markup Language and a client-side image map 424 | HTTP Uniform Resource Locator (http://) 425 | HTTPS Uniform Resource Locator (https://) 426 | ICB Truevision Targa image 427 | ICO Microsoft icon 428 | ICON Microsoft icon 429 | IIQ Phase One Raw Image Format 430 | INFO The image format and characteristics 431 | INLINE Base64-encoded inline images 432 | IPL IPL Image Sequence 433 | ISOBRL ISO/TR 11548-1 format 434 | ISOBRL6 ISO/TR 11548-1 format 6dot 435 | JBG Joint Bi-level Image experts Group interchange format (2.1) 436 | JBIG Joint Bi-level Image experts Group interchange format (2.1) 437 | JNG JPEG Network Graphics 438 | JNX Garmin tile format 439 | JPE Joint Photographic Experts Group JFIF format (80) 440 | JPEG Joint Photographic Experts Group JFIF format (80) 441 | JPG Joint Photographic Experts Group JFIF format (80) 442 | JPS Joint Photographic Experts Group JFIF format (80) 443 | JSON The image format and characteristics 444 | JXL Joint Photographic Experts Group XL format (80) 445 | K25 Kodak Digital Camera Raw Image Format 446 | KDC Kodak Digital Camera Raw Image Format 447 | LABEL Image label 448 | M2V MPEG Video Stream 449 | M4V Raw MPEG-4 Video 450 | MAC MAC Paint 451 | MAGICK Predefined Magick Image (LOGO, ROSE, etc.); output same as 'H' 452 | MAP Colormap intensities and indices 453 | MASK Image Clip Mask 454 | MAT MATLAB level 5 image format 455 | MATTE MATTE format 456 | MEF Mamiya Raw Image File 457 | MIFF Magick Image File Format 458 | MNG Multiple-image Network Graphics (libpng 1.6.31,1.6.34) 459 | MONO Raw bi-level bitmap 460 | MPC Magick Persistent Cache image format 461 | MRW Sony (Minolta) Raw Image File 462 | MSL Magick Scripting Language 463 | MSVG ImageMagick's own SVG internal renderer 464 | MTV MTV Raytracing image format 465 | MVG Magick Vector Graphics 466 | NEF Nikon Digital SLR Camera Raw Image File 467 | NRW Nikon Digital SLR Camera Raw Image File 468 | NULL Constant image of uniform color 469 | ORF Olympus Digital Camera Raw Image File 470 | OTB On-the-air bitmap 471 | OTF Open Type font (Freetype 2.8.0) 472 | PAL 16bit/pixel interleaved YUV 473 | PALM Palm pixmap 474 | PAM Common 2-dimensional bitmap format 475 | PANGO Pango Markup Language (Pangocairo 1.40.6) 476 | PATTERN Predefined pattern 477 | PBM Portable bitmap format (black and white) 478 | PCD Photo CD 479 | PCDS Photo CD 480 | PCL Printer Control Language 481 | PCT Apple Macintosh QuickDraw/PICT 482 | PCX ZSoft IBM PC Paintbrush 483 | PDB Palm Database ImageViewer Format 484 | PDF Portable Document Format 485 | PDFA Portable Document Archive Format 486 | PEF Pentax Electronic File 487 | PES Embrid Embroidery Format 488 | PFA Postscript Type 1 font (ASCII) (Freetype 2.8.0) 489 | PFB Postscript Type 1 font (binary) (Freetype 2.8.0) 490 | PFM Portable float format 491 | PGM Portable graymap format (gray scale) 492 | PICON Personal Icon 493 | PICT Apple Macintosh QuickDraw/PICT 494 | PIX Alias/Wavefront RLE image format 495 | PJPEG Joint Photographic Experts Group JFIF format (80) 496 | PLASMA Plasma fractal image 497 | PNG Portable Network Graphics (libpng 1.6.31,1.6.34) 498 | PNG00 PNG inheriting bit-depth, color-type from original if possible 499 | PNG24 opaque or binary transparent 24-bit RGB (zlib 1.2.11) 500 | PNG32 opaque or transparent 32-bit RGBA 501 | PNG48 opaque or binary transparent 48-bit RGB 502 | PNG64 opaque or transparent 64-bit RGBA 503 | PNG8 8-bit indexed with optional binary transparency 504 | PNM Portable anymap 505 | PPM Portable pixmap format (color) 506 | PREVIEW Show a preview an image enhancement, effect, or f/x 507 | PS PostScript 508 | PS2 Level II PostScript 509 | PS3 Level III PostScript 510 | PSB Adobe Large Document Format 511 | PSD Adobe Photoshop bitmap 512 | PTIF Pyramid encoded TIFF 513 | PWP Seattle Film Works 514 | RADIAL-GRADIENT Gradual radial passing from one shade to another 515 | RAF Fuji CCD-RAW Graphic File 516 | RAS SUN Rasterfile 517 | RAW Raw 518 | RGB Raw red, green, and blue samples 519 | RGBA Raw red, green, blue, and alpha samples 520 | RGBO Raw red, green, blue, and opacity samples 521 | RGF LEGO Mindstorms EV3 Robot Graphic Format (black and white) 522 | RLA Alias/Wavefront image 523 | RLE Utah Run length encoded image 524 | RMF Raw Media Format 525 | RW2 Panasonic Lumix Raw Image 526 | SCR ZX-Spectrum SCREEN$ 527 | SCT Scitex HandShake 528 | SFW Seattle Film Works 529 | SGI Irix RGB image 530 | SHTML Hypertext Markup Language and a client-side image map 531 | SIX DEC SIXEL Graphics Format 532 | SIXEL DEC SIXEL Graphics Format 533 | SPARSE-COLOR Sparse Color 534 | SR2 Sony Raw Format 2 535 | SRF Sony Raw Format 536 | STEGANO Steganographic image 537 | SUN SUN Rasterfile 538 | SVG Scalable Vector Graphics (XML 2.9.4) 539 | SVGZ Compressed Scalable Vector Graphics (XML 2.9.4) 540 | TEXT Text 541 | TGA Truevision Targa image 542 | THUMBNAIL EXIF Profile Thumbnail 543 | TIF Tagged Image File Format (LIBTIFF, Version 4.0.8) 544 | TIFF Tagged Image File Format (LIBTIFF, Version 4.0.8) 545 | TIFF64 Tagged Image File Format (64-bit) (LIBTIFF, Version 4.0.8) 546 | TILE Tile image with a texture 547 | TIM PSX TIM 548 | TTC TrueType font collection (Freetype 2.8.0) 549 | TTF TrueType font (Freetype 2.8.0) 550 | TXT Text 551 | UBRL Unicode Text format 552 | UBRL6 Unicode Text format 6dot 553 | UIL X-Motif UIL table 554 | UYVY 16bit/pixel interleaved YUV 555 | VDA Truevision Targa image 556 | VICAR VICAR rasterfile format 557 | VID Visual Image Directory 558 | VIFF Khoros Visualization image 559 | VIPS VIPS image 560 | VST Truevision Targa image 561 | WBMP Wireless Bitmap (level 0) image 562 | WEBP WEBP image 563 | WMF Windows Meta File 564 | WMV Windows Media Video 565 | WMZ Compressed Windows Meta File 566 | WPG Word Perfect Graphics 567 | X X Image 568 | X3F Sigma Camera RAW Picture File 569 | XBM X Windows system bitmap (black and white) 570 | XC Constant image uniform color 571 | XCF GIMP image 572 | XPM X Windows system pixmap (color) 573 | XPS Microsoft XML Paper Specification 574 | XV Khoros Visualization image 575 | XWD X Windows system window dump (color) 576 | YCbCr Raw Y, Cb, and Cr samples 577 | YCbCrA Raw Y, Cb, Cr, and alpha samples 578 | YUV CCIR 601 4:1:1 or 4:2:2 579 | " 580 | kdialog --icon configure --title "${!msg_title}" --msgbox "${formats}" 581 | } 582 | 583 | ######################################## Run compress and resize 584 | 585 | run_compress () { 586 | if [ "${overwrite}" = true ]; then 587 | msg=$("${magick_bin}" "${input}" -quality "${quality}" "${input}" 2>&1) 588 | else 589 | msg=$("${magick_bin}" "${input}" -quality "${quality}" "${dir}/${base}_compressed.${ext}" 2>&1) 590 | fi 591 | 592 | return $? 593 | } 594 | 595 | run_optimize () { 596 | ## https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/ 597 | if [ "${overwrite}" = true ]; then 598 | msg=$("${magick_bin}" "${input}" -filter Triangle -define filter:support=2 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -colorspace sRGB -strip -interlace Plane "${input}" 2>&1) 599 | else 600 | msg=$("${magick_bin}" "${input}" -filter Triangle -define filter:support=2 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -colorspace sRGB -strip -interlace Plane "${input}" "${dir}/${base}_optimized.${ext}" 2>&1) 601 | fi 602 | return $? 603 | } 604 | 605 | run_progressive () { 606 | if [ "${overwrite}" = true ]; then 607 | msg=$("${magick_bin}" "${input}" -strip -interlace Plane "${input}" 2>&1) 608 | else 609 | msg=$("${magick_bin}" "${input}" -strip -interlace Plane "${dir}/${base}_progressive.${ext}" 2>&1) 610 | fi 611 | return $? 612 | } 613 | 614 | run_resize () { 615 | if [ "${overwrite}" = true ]; then 616 | msg=$("${magick_bin}" "${input}" -resize "${scale}" "${input}" 2>&1) 617 | else 618 | msg=$("${magick_bin}" "${input}" -resize "${scale}" "${dir}/${base}_resized.${ext}" 2>&1) 619 | fi 620 | 621 | return $? 622 | } 623 | 624 | ######################################## Run convert and rotate 625 | 626 | run_agif () { 627 | msg=$("${magick_bin}" "${input}" -delay ${delay} "${@}" -loop ${loop} "${dir}/animated.gif" 2>&1) 628 | return $? 629 | } 630 | 631 | run_webp () { 632 | msg=$("${magick_bin}" "${input}" -delay ${delay} "${@}" -loop ${loop} "${dir}/animated.apng" 2>&1) 633 | return $? 634 | } 635 | 636 | run_webp () { 637 | msg=$("${magick_bin}" "${input}" -delay ${delay} "${@}" -loop ${loop} "${dir}/animated.webp" 2>&1) 638 | return $? 639 | } 640 | 641 | run_border () { 642 | alpha_support=true 643 | [ -n "$(file "${input}" | grep JFIF)" ] && alpha_support=false 644 | 645 | if [ "${color}" = "transparent" ] && [ "${alpha_support}" = false ]; then 646 | "${kdialog_bin}" --icon configure --title "${!msg_finish_title}" --sorry "${msg_common_transparent_unsupported_text}" 647 | ext=png 648 | fi 649 | 650 | if [ "${overwrite}" = true ]; then 651 | output="${dir}/${base}.${ext}" 652 | else 653 | output="${dir}/${base}_border.${ext}" 654 | fi 655 | 656 | msg=$("${magick_bin}" "${input}" -bordercolor "${color}" -border "${size}" "${output}" 2>&1) 657 | return $? 658 | } 659 | 660 | run_colorspace () { 661 | if [ "${overwrite}" = true ]; then 662 | msg=$("${magick_bin}" "${input}" -colorspace "${value}" "${input}" 2>&1) 663 | else 664 | msg=$("${magick_bin}" "${input}" -colorspace "${value}" "${dir}/${base}_colorspace.${ext}" 2>&1) 665 | fi 666 | 667 | return $? 668 | } 669 | 670 | run_convert () { 671 | if [ "${overwrite}" != true ] && [ "${ext}" = "${format}" ]; then 672 | msg=$("${magick_bin}" "${input}" -format "${format}" "${input}" 2>&1) 673 | else 674 | msg=$("${magick_bin}" "${input}" -format "${format}" "${dir}/${base}_converted.${format}" 2>&1) 675 | fi 676 | 677 | return $? 678 | } 679 | 680 | run_favicons () { 681 | dest_dir="${base}-favicons" 682 | 683 | wxh=$("${magick_bin}" "${input}" -format "%w x %h" info:) 684 | w=${wxh%% *} 685 | h=${wxh##* } 686 | max=$(( w > h ? w : h )) 687 | 688 | SOURCE_IMG="${base}_square.png" 689 | "${magick_bin}" "${input}" -background transparent \ 690 | -compose Copy -gravity center -extent ${max}x${max} "${SOURCE_IMG}" 691 | 692 | PLATFORMS=(ANDROID APPLE FAVICON MS) 693 | ANDROID_ICON_NAME='android-icon' 694 | ANDROID_ICON_SIZES=(36 48 72 96 144 192) 695 | APPLE_ICON_NAME='apple-icon' 696 | APPLE_ICON_SIZES=(57 60 72 76 114 120 144 152 180) 697 | FAVICON_ICON_NAME='favicon' 698 | FAVICON_ICON_SIZES=(16 32 96) 699 | MS_ICON_NAME='ms-icon' 700 | MS_ICON_SIZES=(70 144 150 310) 701 | 702 | BROWSERCONFIG='browserconfig.xml' 703 | MANIFEST='manifest.json' 704 | 705 | for PLATFORM in ${PLATFORMS[@]}; do 706 | NAME="${PLATFORM}_ICON_NAME" 707 | NAME=${!NAME} 708 | 709 | SIZES="${PLATFORM}_ICON_SIZES[@]" 710 | SIZES=${!SIZES} 711 | 712 | for i in ${SIZES[@]}; do 713 | mkdir -p "${dest_dir}" 714 | echo ${NAME}-${i}x${i}.png 715 | "${magick_bin}" "${input}" -resize "${i}x${i}!" "${SOURCE_IMG}" "${dest_dir}/${NAME}-${i}x${i}.png" 716 | done 717 | done 718 | 719 | "${magick_bin}" "${input}" -resize 16x16 "${SOURCE_IMG}" "${dest_dir}/favicon.ico" 720 | "${magick_bin}" "${input}" -resize 192x192 "${SOURCE_IMG}" "${dest_dir}/apple-icon.png" 721 | "${magick_bin}" "${input}" -resize 192x192 "${SOURCE_IMG}" "${dest_dir}/apple-icon-precomposed.png" 722 | 723 | yes | rm "${SOURCE_IMG}" 724 | 725 | mkdir -p "${dest_dir}" 726 | :> "${dest_dir}/${MANIFEST}" 727 | cat << EOF > "${dest_dir}/${MANIFEST}" 728 | { 729 | "name": "App", 730 | "icons": [ 731 | { 732 | "src": "\/android-icon-36x36.png", 733 | "sizes": "36x36", 734 | "type": "image\/png", 735 | "density": "0.75" 736 | }, 737 | { 738 | "src": "\/android-icon-48x48.png", 739 | "sizes": "48x48", 740 | "type": "image\/png", 741 | "density": "1.0" 742 | }, 743 | { 744 | "src": "\/android-icon-72x72.png", 745 | "sizes": "72x72", 746 | "type": "image\/png", 747 | "density": "1.5" 748 | }, 749 | { 750 | "src": "\/android-icon-96x96.png", 751 | "sizes": "96x96", 752 | "type": "image\/png", 753 | "density": "2.0" 754 | }, 755 | { 756 | "src": "\/android-icon-144x144.png", 757 | "sizes": "144x144", 758 | "type": "image\/png", 759 | "density": "3.0" 760 | }, 761 | { 762 | "src": "\/android-icon-192x192.png", 763 | "sizes": "192x192", 764 | "type": "image\/png", 765 | "density": "4.0" 766 | } 767 | ] 768 | } 769 | EOF 770 | 771 | mkdir -p "${dest_dir}" 772 | :> "${dest_dir}/${BROWSERCONFIG}" 773 | cat << EOF > "${dest_dir}/${BROWSERCONFIG}" 774 | 775 | #ffffff 776 | EOF 777 | 778 | return 0 779 | } 780 | 781 | run_montage () { 782 | msg=$("${magick_bin}" "${img_to_add}" -format "%h" info: 2>&1) 783 | code=$? 784 | [ $code -gt 0 ] && return $code 785 | 786 | height=$("${magick_bin}" "${input}" montage "${input}" -format "%h" info: 2>&1) 787 | msg=$("${montage_bin}" "${input}" -resize x${height} "${img_to_add}" -geometry +0+0 "${dir}/${base}_${img_to_add_base}.${ext}" 2>&1) 788 | return $? 789 | } 790 | 791 | run_overturn () { 792 | if [ "${overwrite}" = true ]; then 793 | msg=$("${magick_bin}" "${input}" -"${value}" "${input}" 2>&1) 794 | else 795 | msg=$("${magick_bin}" "${input}" -"${value}" "${dir}/${base}_${value}.${ext}" 2>&1) 796 | fi 797 | 798 | return $? 799 | } 800 | 801 | run_rotate () { 802 | if [ "${overwrite}" = true ]; then 803 | if [ "${angle}" = "auto" ]; then 804 | msg=$("${magick_bin}" "${input}" -auto-orient "${input}" 2>&1) 805 | else 806 | msg=$("${magick_bin}" "${input}" -rotate ${angle} "${input}" 2>&1) 807 | fi 808 | else 809 | if [ "${angle}" = "auto" ]; then 810 | msg=$("${magick_bin}" "${input}" -auto-orient "${dir}/${base}_rotated.${ext}" 2>&1) 811 | else 812 | msg=$("${magick_bin}" "${input}" -rotate ${angle} "${dir}/${base}_rotated.${ext}" 2>&1) 813 | fi 814 | fi 815 | 816 | return $? 817 | } 818 | 819 | run_sepia () { 820 | if [ "${overwrite}" = true ]; then 821 | msg=$("${magick_bin}" "${input}" -sepia-tone "${value}" "${input}" 2>&1) 822 | else 823 | msg=$("${magick_bin}" "${input}" -sepia-tone "${value}" "${dir}/${base}_sepia.${ext}" 2>&1) 824 | fi 825 | 826 | return $? 827 | } 828 | 829 | run_shadow () { 830 | jfif=$(file "${input}" | grep JFIF) 831 | [ -n "${jfif}" ] && "${kdialog_bin}" --icon configure --title "${!msg_finish_title}" --sorry "${msg_common_transparent_unsupported_text}" && return 0 832 | 833 | if [ "${overwrite}" = true ]; then 834 | msg=$("${magick_bin}" "${input}" \( +clone -background black -shadow 80x8+8+8 \) +swap -background none -layers merge +repage "${input}" 2>&1) 835 | else 836 | msg=$("${magick_bin}" "${input}" \( +clone -background black -shadow 80x8+8+8 \) +swap -background none -layers merge +repage "${dir}/${base}_shadow.${ext}" 2>&1) 837 | fi 838 | 839 | return $? 840 | } 841 | 842 | run_timestamp () { 843 | timestamp=$(jhead -exifmap 01.jpg | grep "Date/Time" | sed "s/^[^:]*:[[:blank:]]*\([[:digit:]]\{4\}\):\([[:digit:]]\{2\}\):\([[:digit:]]\{2\}\)/\1-\2-\3/") 844 | 845 | if [ "${overwrite}" = true ]; then 846 | msg=$("${magick_bin}" "${input}" -gravity SouthEast -pointsize 30 -fill white -annotate +30+30 "${timestamp}" "${input}" 2>&1) 847 | else 848 | msg=$("${magick_bin}" "${input}" -gravity SouthEast -pointsize 30 -fill white -annotate +30+30 "${timestamp}" "${dir}/${base}_timestamp.${ext}" 2>&1) 849 | fi 850 | 851 | return $? 852 | } 853 | 854 | run_transparent2color () { 855 | if [ "${overwrite}" = true ]; then 856 | msg=$("${magick_bin}" "${input}" -background "${color}" -flatten "${input}" 2>&1) 857 | else 858 | msg=$("${magick_bin}" "${input}" -background "${color}" -flatten "${dir}/${base}_background.${ext}" 2>&1) 859 | fi 860 | 861 | return $? 862 | } 863 | 864 | ######################################## Run metadata scripts 865 | 866 | ## rename file with Exif datetime 867 | run_rfe () { 868 | msg=$("${jhead_bin}" -exonly -q -nf%Y-%m-%d_%H%M%S -ft "${input}" 2>&1) 869 | code=$? 870 | [ -z "${msg}" ] && msg=msg_${action}_no_metadata && msg="${!msg}" 871 | return $code 872 | } 873 | 874 | ## rename file with file's datetime 875 | run_rff () { 876 | DATE=$(date -r "${input}" +%Y-%m-%d_%H%M%S) 877 | 878 | if [ "${overwrite}" = true ]; then 879 | [ "${dir}/${name}" = "${dir}/${DATE}.${ext}" ] && return 0 880 | 881 | msg=$(mv "${dir}/${name}" "${dir}/${DATE}.${ext}" 2>&1) 882 | return $? 883 | else 884 | destination_dir="renamed" 885 | msg=$(mkdir -p "${destination_dir}" 2>&1 && cp "${dir}/${name}" "${dir}/${destination_dir}/${DATE}.${ext}" 2>&1) 886 | return $? 887 | fi 888 | } 889 | 890 | ######################################## 891 | 892 | ## set file's datetime from Exif date 893 | run_sffe () { 894 | custom_msg=msg_${action}_no_metadata 895 | msg=$("${jhead_bin}" -exonly -q -ft "${input}" 2>&1) 896 | code=$? 897 | [ -z "${msg}" ] && msg=msg_${action}_no_metadata && msg="${!msg}" 898 | return $code 899 | } 900 | 901 | ## set file's datetime from file's name 902 | run_sffn () { 903 | echo "${input}" | egrep -q "[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}_[[:digit:]]{6}" || \ 904 | { "${kdialog_bin}" --title "${!msg_title}" --icon configure --error "${msg_common_name_error}" && qdbus $dbus_ref close && exit 2; } 905 | DATE=$(echo "${input}" | sed "s/.*\([[:digit:]]\{4\}\)-\([[:digit:]]\{2\}\)-\([[:digit:]]\{2\}\)_\([[:digit:]]\{2\}\)\([[:digit:]]\{2\}\)\([[:digit:]]\{2\}\).*/\1\2\3\4\5.\6/") 906 | 907 | msg=$(touch -t $DATE "${input}" 2>&1) 908 | return $? 909 | } 910 | 911 | ######################################## 912 | 913 | ## set Exif datetime from file's date 914 | run_seff () { 915 | msg=$("${jhead_bin}" -q -dsft "${input}" 2>&1) 916 | return $? 917 | } 918 | 919 | ## set Exif datetime from file's name 920 | run_sefn () { 921 | echo "${input}" | egrep -q "[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}_[[:digit:]]{6}" || \ 922 | { "${kdialog_bin}" --title "${!msg_title}" --icon configure --error "${msg_common_name_error}" && qdbus $dbus_ref close && exit 2; } 923 | DATE=$(echo "${input}" | sed "s/.*\([[:digit:]]\{4\}\)-\([[:digit:]]\{2\}\)-\([[:digit:]]\{2\}\)_\([[:digit:]]\{2\}\)\([[:digit:]]\{2\}\)\([[:digit:]]\{2\}\).*/\1:\2:\3-\4:\5:\6/") 924 | 925 | msg=$("${jhead_bin}" -q -ts$DATE "${input}" 2>&1) 926 | return $? 927 | } 928 | 929 | ## Add comment 930 | run_ac () { 931 | msg=$("${jhead_bin}" -q -cl "${comment}" "${input}" 2>&1) 932 | return $? 933 | } 934 | 935 | ## Viwe metadata 936 | run_ve () { 937 | msg=$("${jhead_bin}" -q -exifmap "${input}" | grep -v "^Map" 2>&1) 938 | $kdialog_bin --msgbox "${msg}" 939 | return $? 940 | } 941 | 942 | ## Extract metadata to file 943 | run_ee () { 944 | msg=$("${jhead_bin}" -q -exifmap "${input}" | grep -v "^Map" > "${dir}/${base}.txt" 2>&1) 945 | return $? 946 | } 947 | 948 | ## Delete comment field 949 | run_dc () { 950 | msg=$("${jhead_bin}" -q -dc "${input}" 2>&1) 951 | return $? 952 | } 953 | 954 | ## Strip Exif section 955 | run_de () { 956 | msg=$("${jhead_bin}" -q -de "${input}" 2>&1) 957 | return $? 958 | } 959 | 960 | ## Delete IPTC section 961 | run_di () { 962 | msg=$("${jhead_bin}" -q -di "${input}" 2>&1) 963 | return $? 964 | } 965 | 966 | ## Delete XMP section 967 | run_dx () { 968 | msg=$("${jhead_bin}" -q -dx "${input}" 2>&1) 969 | return $? 970 | } 971 | 972 | ## Strip all unnecessary data 973 | run_purejpg () { 974 | msg=$("${jhead_bin}" -q -purejpg "${input}" 2>&1) 975 | return $? 976 | } 977 | 978 | ######################################## 979 | 980 | do_you_want_to_overwrite () { 981 | "${kdialog_bin}" --icon configure --title "${!msg_title}" --warningyesno "${msg_common_overwrite_text}" && overwrite=true || \ 982 | { 983 | [ $? -eq 1 ] && overwrite=false || \ 984 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 985 | } 986 | } 987 | 988 | manage_input_separately () { 989 | [ ${#} -lt 1 ] && help 990 | [ ${#} -gt 1 ] && multiple_files=true 991 | 992 | type run_${action} > /dev/null || \ 993 | { "${kdialog_bin}" --title "${msg_common_software_not_found_title}" --icon configure --error "${msg_common_action_not_found_text}" && exit 2; } 994 | 995 | [ "${ask_overwrite}" = true ] && do_you_want_to_overwrite 996 | 997 | quantity=$# 998 | dbus_ref=$(kdialog --icon configure --title "${!msg_title}" --progressbar "${msg_common_start}" $quantity) 999 | qdbus $dbus_ref showCancelButton true 1000 | processed=0 1001 | 1002 | for input in "$@"; do 1003 | ## Check if cancel button has been pushed 1004 | [ "$(qdbus $dbus_ref wasCancelled)" = "true" ] && \ 1005 | qdbus $dbus_ref close && "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1006 | 1007 | dir=$(dirname -- "${input}") 1008 | name="${input##*/}" 1009 | base="${name%.*}" 1010 | ext="${name##*.}" 1011 | 1012 | processed=$(($processed + 1)) 1013 | load_language 1014 | 1015 | [ ! -f "${input}" ] && "${kdialog_bin}" --title --icon configure "${!msg_title}" --error "${msg_common_file_not_found}" && break 1016 | qdbus $dbus_ref setLabelText "${msg_common_progress_text}" 1017 | 1018 | msg_finish_title=msg_${action}_finish_title 1019 | run_${action} && \ 1020 | "${kdialog_bin}" --title "${!msg_finish_title}" --passivepopup "${msg_common_finish_ok}" 5 || \ 1021 | { qdbus $dbus_ref close; "${kdialog_bin}" --icon configure --title "${!msg_finish_title}" --detailederror "${msg_common_finish_error}" "${msg}"; exit 2; } 1022 | 1023 | qdbus $dbus_ref org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value $processed 1024 | done 1025 | 1026 | qdbus $dbus_ref close 1027 | } 1028 | 1029 | manage_input_at_once () { 1030 | [ ${#} -lt 1 ] && help 1031 | 1032 | dir=$(dirname -- "${1}") 1033 | name="${1##*/}" 1034 | load_language 1035 | 1036 | msg_finish_title=msg_${action}_finish_title 1037 | run_${action} "${@}" && \ 1038 | "${kdialog_bin}" --title "${!msg_finish_title}" --passivepopup "${msg_common_finish_ok}" 5 || \ 1039 | { qdbus $dbus_ref close; "${kdialog_bin}" --icon configure --title "${!msg_finish_title}" --detailederror "${msg_common_finish_error}" "${msg}"; exit 2; } 1040 | 1041 | } 1042 | 1043 | ######################################## Set compress and resize input 1044 | 1045 | set_compress () { 1046 | value="${1}" 1047 | shift 1048 | 1049 | quality="75%" 1050 | if [ "${value}" = "custom" ]; then 1051 | quality=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_compress_quality_input_text}" "${quality}") || \ 1052 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1053 | else 1054 | quality="${value}" 1055 | fi 1056 | 1057 | ask_overwrite=true 1058 | manage_input_separately "${@}" 1059 | } 1060 | 1061 | set_optimize () { 1062 | ask_overwrite=true 1063 | manage_input_separately "${@}" 1064 | } 1065 | 1066 | set_progressive () { 1067 | ask_overwrite=true 1068 | manage_input_separately "${@}" 1069 | } 1070 | 1071 | set_resize () { 1072 | value="${1}" 1073 | shift 1074 | 1075 | if [ "${value}" = "custom" ]; then 1076 | scale=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_resize_scale_input_text}") || \ 1077 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1078 | else 1079 | scale="${value}" 1080 | fi 1081 | 1082 | ask_overwrite=true 1083 | manage_input_separately "${@}" 1084 | } 1085 | 1086 | ######################################## Set convert and rotate input 1087 | 1088 | set_agif () { 1089 | [ ${#} -lt 2 ] && help 1090 | 1091 | default_delay=100 1092 | default_cicles_number=1 1093 | 1094 | delay=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_agif_delay_input_text}" $default_delay) || { 1095 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1096 | } 1097 | 1098 | "${kdialog_bin}" --icon configure --title "${!msg_title}" --yesnocancel "${msg_agif_loop_input_text}" && loop=0 || { 1099 | [ $? -eq 1 ] && { 1100 | loop=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_agif_cicles_number_input_text}" $default_cicles_number) || { 1101 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1102 | } 1103 | } || { 1104 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1105 | } 1106 | } 1107 | 1108 | manage_input_at_once "${@}" 1109 | } 1110 | 1111 | set_apng () { 1112 | [ ${#} -lt 2 ] && help 1113 | 1114 | default_delay=100 1115 | default_cicles_number=1 1116 | 1117 | delay=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_apng_delay_input_text}" $default_delay) || { 1118 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1119 | } 1120 | 1121 | "${kdialog_bin}" --icon configure --title "${!msg_title}" --yesnocancel "${msg_apng_loop_input_text}" && loop=0 || { 1122 | [ $? -eq 1 ] && { 1123 | loop=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_apng_cicles_number_input_text}" $default_cicles_number) || { 1124 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1125 | } 1126 | } || { 1127 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1128 | } 1129 | } 1130 | 1131 | manage_input_at_once "${@}" 1132 | } 1133 | 1134 | set_webp () { 1135 | [ ${#} -lt 2 ] && help 1136 | 1137 | default_delay=100 1138 | default_cicles_number=1 1139 | 1140 | delay=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_webp_delay_input_text}" $default_delay) || { 1141 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1142 | } 1143 | 1144 | "${kdialog_bin}" --icon configure --title "${!msg_title}" --yesnocancel "${msg_webp_loop_input_text}" && loop=0 || { 1145 | [ $? -eq 1 ] && { 1146 | loop=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_webp_cicles_number_input_text}" $default_cicles_number) || { 1147 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1148 | } 1149 | } || { 1150 | "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; 1151 | } 1152 | } 1153 | 1154 | manage_input_at_once "${@}" 1155 | } 1156 | 1157 | set_border () { 1158 | value="${1}" 1159 | shift 1160 | 1161 | if [ "${value}" = "custom" ]; then 1162 | color=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --getcolor --default "#FFFFFF") || \ 1163 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1164 | else 1165 | color="${value}" 1166 | fi 1167 | 1168 | size="5%" 1169 | size=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_border_size_input_text}" "${size}") || \ 1170 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1171 | 1172 | ask_overwrite=true 1173 | manage_input_separately "${@}" 1174 | } 1175 | 1176 | set_colorspace () { 1177 | value="${1}" 1178 | shift 1179 | 1180 | ask_overwrite=true 1181 | manage_input_separately "${@}" 1182 | } 1183 | 1184 | set_convert () { 1185 | value="${1}" 1186 | shift 1187 | 1188 | [ "${value}" = "formats" ] && { formats; exit 0; } 1189 | 1190 | if [ "${value}" = "custom" ]; then 1191 | format=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_convert_format_input_text}") || \ 1192 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1193 | else 1194 | format="${value}" 1195 | fi 1196 | 1197 | for arg in "$@"; do 1198 | arg_ext="${arg##*.}" 1199 | [ "${arg_ext}" = "${format}" ] && ask_overwrite=true && break 1200 | done 1201 | 1202 | manage_input_separately "${@}" 1203 | } 1204 | 1205 | set_favicons () { 1206 | value="${1}" 1207 | shift 1208 | 1209 | for arg in "$@"; do 1210 | arg_ext="${arg##*.}" 1211 | [ "${arg_ext}" = "${format}" ] && ask_overwrite=true && break 1212 | done 1213 | 1214 | manage_input_separately "${@}" 1215 | } 1216 | 1217 | set_montage () { 1218 | img_to_add=$("${kdialog_bin}" --title "${!msg_title}" --icon document-open --getopenfilename " " ) || \ 1219 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1220 | 1221 | img_to_add_name="${img_to_add##*/}" 1222 | img_to_add_base="${img_to_add_name%.*}" 1223 | 1224 | manage_input_separately "${@}" 1225 | } 1226 | 1227 | set_overturn () { 1228 | value="${1}" 1229 | shift 1230 | 1231 | ask_overwrite=true 1232 | manage_input_separately "${@}" 1233 | } 1234 | 1235 | set_rotate () { 1236 | value="${1}" 1237 | shift 1238 | 1239 | if [ "${value}" = "custom" ]; then 1240 | angle=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_rotate_angle_input_text}") || \ 1241 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1242 | else 1243 | angle="${value}" 1244 | fi 1245 | 1246 | ask_overwrite=true 1247 | manage_input_separately "${@}" 1248 | } 1249 | 1250 | set_sepia () { 1251 | value="${1}" 1252 | shift 1253 | 1254 | ask_overwrite=true 1255 | manage_input_separately "${@}" 1256 | } 1257 | 1258 | set_shadow () { 1259 | ask_overwrite=true 1260 | manage_input_separately "${@}" 1261 | } 1262 | 1263 | set_timestamp () { 1264 | ask_overwrite=true 1265 | manage_input_separately "${@}" 1266 | } 1267 | 1268 | set_transparent2color () { 1269 | color=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --getcolor --default "#FFFFFF") || \ 1270 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1271 | 1272 | ask_overwrite=true 1273 | manage_input_separately "${@}" 1274 | } 1275 | 1276 | ######################################## Set metadata functions input 1277 | 1278 | ## rename file with Exif datetime 1279 | set_rfe () { 1280 | manage_input_separately "${@}" 1281 | } 1282 | 1283 | ## rename file with file's datetime 1284 | set_rff () { 1285 | ask_overwrite=true 1286 | manage_input_separately "${@}" 1287 | } 1288 | 1289 | ## set file's datetime from Exif date 1290 | set_sffe () { 1291 | manage_input_separately "${@}" 1292 | } 1293 | 1294 | ## set file's datetime from file's name 1295 | set_sffn () { 1296 | manage_input_separately "${@}" 1297 | } 1298 | 1299 | ## set Exif datetime from file's date 1300 | set_seff () { 1301 | manage_input_separately "${@}" 1302 | } 1303 | 1304 | ## set Exif datetime from file's name 1305 | set_sefn () { 1306 | manage_input_separately "${@}" 1307 | } 1308 | 1309 | ## Add comment 1310 | set_ac () { 1311 | comment=$("${kdialog_bin}" --icon configure --title "${!msg_title}" --inputbox "${msg_ac_comment_input_text}") || \ 1312 | { "${kdialog_bin}" --title "${!msg_title}" --passivepopup "${msg_common_abort}" 5 && exit 2; } 1313 | 1314 | manage_input_separately "${@}" 1315 | } 1316 | 1317 | ## Viwe metadata 1318 | set_ve () { 1319 | manage_input_separately "${@}" 1320 | } 1321 | 1322 | ## Extract metadata to file 1323 | set_ee () { 1324 | manage_input_separately "${@}" 1325 | } 1326 | 1327 | ## Delete comment field 1328 | set_dc () { 1329 | manage_input_separately "${@}" 1330 | } 1331 | 1332 | ## Strip Exif section 1333 | set_de () { 1334 | manage_input_separately "${@}" 1335 | } 1336 | 1337 | ## Delete IPTC section 1338 | set_di () { 1339 | manage_input_separately "${@}" 1340 | } 1341 | 1342 | ## Delete XMP section 1343 | set_dx () { 1344 | manage_input_separately "${@}" 1345 | } 1346 | 1347 | ## Strip all unnecessary data 1348 | set_purejpg () { 1349 | manage_input_separately "${@}" 1350 | } 1351 | 1352 | ################################################################################ 1353 | 1354 | [ "${1}" = "-h" ] || [ "${1}" = "--help" ] || [ ${#} -lt 2 ] && help 1355 | 1356 | kdialog_bin=$(which kdialog) 1357 | [ -z "${kdialog_bin}" ] && echo "kdialog not found!" && exit 1 1358 | 1359 | magick_bin=$(which cjxl) 1360 | [ -z "${magick_bin}" "${input}" ] && \ 1361 | "${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_cjxl_not_found_text}" && exit 2 1362 | 1363 | magick_bin=$(which djxl) 1364 | [ -z "${magick_bin}" "${input}" ] && \ 1365 | "${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_cjxl_not_found_text}" && exit 2 1366 | 1367 | magick_bin=$(which magick) 1368 | [ -z "${magick_bin}" "${input}" ] && \ 1369 | "${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_magick_not_found_text}" && exit 2 1370 | 1371 | jhead_bin=$(which jhead) 1372 | [ -z "${jhead_bin}" ] && \ 1373 | "${kdialog_bin}" --title "${msg_common_software_not_found_title}" --icon configure --error "${msg_common_jhead_not_found_text}" && exit 2 1374 | 1375 | webp_bin=$(which webpinfo) 1376 | [ -z "${webp_bin}" ] && \ 1377 | "${kdialog_bin}" --title "${msg_common_software_not_found_title}" --icon configure --error "${msg_common_webp_not_found_text}" && exit 2 1378 | 1379 | action="${1}" 1380 | shift 1381 | 1382 | load_language 1383 | msg_title=msg_${action}_title 1384 | 1385 | type set_${action} &> /dev/null || \ 1386 | { "${kdialog_bin}" --icon configure --title "${msg_common_software_not_found_title}" --error "${msg_common_action_not_found_text}" && exit 3; } 1387 | 1388 | ask_overwrite=false 1389 | set_${action} "${@}" 1390 | 1391 | exit 0 1392 | --------------------------------------------------------------------------------