├── qss ├── style_linux.qss ├── style_osx.qss └── style_win.qss ├── qt.conf ├── TODO.md ├── icons ├── ui │ ├── add.png │ ├── clear.png │ ├── folder.png │ ├── loader.gif │ ├── remove.png │ ├── update.png │ ├── compress.png │ ├── settings.png │ ├── add_hover.png │ ├── clear_hover.png │ ├── dock_close.png │ ├── dock_float.png │ ├── side_panel.png │ ├── folder_hover.png │ ├── remove_hover.png │ ├── compress_hover.png │ ├── dock_close_hover.png │ ├── dock_float_hover.png │ ├── dropdown_arrow.png │ ├── settings_hover.png │ └── side_panel_active.png ├── main │ ├── icon.ico │ ├── logo.png │ └── logo_alpha.png ├── icons │ └── icon.icns └── settings │ ├── general.png │ └── compression.png ├── translations ├── caesiumph_en_US.qm ├── caesiumph_it_IT.qm ├── caesiumph_ja_JP.qm ├── caesiumph_zh_CN.qm ├── caesiumph_en_US.ts ├── caesiumph_zh_CN.ts ├── caesiumph_ja_JP.ts └── caesiumph_it_IT.ts ├── style.qrc ├── AUTHORS.md ├── .gitignore ├── src ├── lossless.h ├── cphlist.h ├── aboutdialog.h ├── exif.h ├── qdroptreewidget.h ├── cimageinfo.h ├── aboutdialog.cpp ├── qdroptreewidget.cpp ├── networkoperations.h ├── cimageinfo.cpp ├── ctreewidgetitem.h ├── utils.h ├── preferencedialog.h ├── cphlist.cpp ├── caesiumph.h ├── main.cpp ├── exif.cpp ├── lossless.cpp ├── utils.cpp ├── networkoperations.cpp ├── preferencedialog.cpp ├── aboutdialog.ui └── preferencedialog.ui ├── icons.qrc ├── README.md ├── CaesiumPH.pro └── CHANGELOG.md /qss/style_linux.qss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt.conf: -------------------------------------------------------------------------------- 1 | [Paths] 2 | Prefix = . 3 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | ### TODO 2 | - .cphlf association (Windows only) 3 | -------------------------------------------------------------------------------- /icons/ui/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/add.png -------------------------------------------------------------------------------- /icons/main/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/main/icon.ico -------------------------------------------------------------------------------- /icons/main/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/main/logo.png -------------------------------------------------------------------------------- /icons/ui/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/clear.png -------------------------------------------------------------------------------- /icons/ui/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/folder.png -------------------------------------------------------------------------------- /icons/ui/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/loader.gif -------------------------------------------------------------------------------- /icons/ui/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/remove.png -------------------------------------------------------------------------------- /icons/ui/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/update.png -------------------------------------------------------------------------------- /icons/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/icons/icon.icns -------------------------------------------------------------------------------- /icons/ui/compress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/compress.png -------------------------------------------------------------------------------- /icons/ui/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/settings.png -------------------------------------------------------------------------------- /icons/ui/add_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/add_hover.png -------------------------------------------------------------------------------- /icons/ui/clear_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/clear_hover.png -------------------------------------------------------------------------------- /icons/ui/dock_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/dock_close.png -------------------------------------------------------------------------------- /icons/ui/dock_float.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/dock_float.png -------------------------------------------------------------------------------- /icons/ui/side_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/side_panel.png -------------------------------------------------------------------------------- /icons/main/logo_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/main/logo_alpha.png -------------------------------------------------------------------------------- /icons/settings/general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/settings/general.png -------------------------------------------------------------------------------- /icons/ui/folder_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/folder_hover.png -------------------------------------------------------------------------------- /icons/ui/remove_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/remove_hover.png -------------------------------------------------------------------------------- /icons/ui/compress_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/compress_hover.png -------------------------------------------------------------------------------- /icons/ui/dock_close_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/dock_close_hover.png -------------------------------------------------------------------------------- /icons/ui/dock_float_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/dock_float_hover.png -------------------------------------------------------------------------------- /icons/ui/dropdown_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/dropdown_arrow.png -------------------------------------------------------------------------------- /icons/ui/settings_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/settings_hover.png -------------------------------------------------------------------------------- /icons/settings/compression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/settings/compression.png -------------------------------------------------------------------------------- /icons/ui/side_panel_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/icons/ui/side_panel_active.png -------------------------------------------------------------------------------- /translations/caesiumph_en_US.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/translations/caesiumph_en_US.qm -------------------------------------------------------------------------------- /translations/caesiumph_it_IT.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/translations/caesiumph_it_IT.qm -------------------------------------------------------------------------------- /translations/caesiumph_ja_JP.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/translations/caesiumph_ja_JP.qm -------------------------------------------------------------------------------- /translations/caesiumph_zh_CN.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lymphatus/CaesiumPH/HEAD/translations/caesiumph_zh_CN.qm -------------------------------------------------------------------------------- /style.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | qss/style_osx.qss 4 | qss/style_linux.qss 5 | qss/style_win.qss 6 | 7 | 8 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | ##### Authors of CaesiumPH 2 | - **Matteo Paonessa** - Designed and coded CaesiumPH. <> 3 | 4 | -------------------------- 5 | 6 | ###### Translations 7 | - **it_IT** - [Matteo Paonessa](https://github.com/Lymphatus) 8 | - **ja_JP** - Tilt 9 | - **zh_CN** - [yfdyh000](https://github.com/yfdyh000) 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # C++ objects and libs 2 | 3 | *.slo 4 | *.lo 5 | *.o 6 | *.a 7 | *.la 8 | *.lai 9 | *.so 10 | *.dll 11 | *.dylib 12 | 13 | # Qt-es 14 | 15 | /.qmake.cache 16 | /.qmake.stash 17 | *.pro.user 18 | *.pro.user.* 19 | *.qbs.user 20 | *.qbs.user.* 21 | *.moc 22 | moc_*.cpp 23 | qrc_*.cpp 24 | ui_*.h 25 | Makefile* 26 | *build-* 27 | 28 | # QtCreator 29 | 30 | *.autosave 31 | 32 | #QtCtreator Qml 33 | *.qmlproject.user 34 | *.qmlproject.user.* 35 | 36 | #QtCtreator CMake 37 | CMakeLists.txt.user 38 | 39 | #Build folder 40 | build/* 41 | -------------------------------------------------------------------------------- /src/lossless.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef CCLT_LOSSLESS 25 | #define CCLT_LOSSLESS 26 | 27 | extern int cclt_optimize(char* input_file, 28 | char* output_file, 29 | int exif_flag, 30 | int progressive_flag, 31 | char* exif_src); 32 | struct jpeg_decompress_struct cclt_get_markers(char* input); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/main/logo.png 4 | icons/ui/add.png 5 | icons/ui/clear.png 6 | icons/ui/folder.png 7 | icons/ui/remove.png 8 | icons/ui/compress.png 9 | icons/ui/add_hover.png 10 | icons/ui/clear_hover.png 11 | icons/ui/compress_hover.png 12 | icons/ui/folder_hover.png 13 | icons/ui/remove_hover.png 14 | icons/ui/side_panel.png 15 | icons/ui/side_panel_active.png 16 | icons/ui/dock_close_hover.png 17 | icons/ui/dock_close.png 18 | icons/ui/dock_float_hover.png 19 | icons/ui/dock_float.png 20 | icons/settings/general.png 21 | icons/ui/settings_hover.png 22 | icons/ui/settings.png 23 | icons/settings/compression.png 24 | icons/main/icon.ico 25 | icons/ui/update.png 26 | icons/ui/dropdown_arrow.png 27 | icons/main/logo_alpha.png 28 | icons/ui/loader.gif 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/cphlist.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef CLIST_H 25 | #define CLIST_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #define CLF_VERSION 1 33 | 34 | class CPHList { 35 | public: 36 | CPHList(); 37 | QList readFile(QString path); 38 | void writeToFile(QList list, QString path); 39 | }; 40 | 41 | #endif // CLIST_H 42 | -------------------------------------------------------------------------------- /src/aboutdialog.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef ABOUTDIALOG_H 25 | #define ABOUTDIALOG_H 26 | 27 | #include 28 | 29 | namespace Ui { 30 | class AboutDialog; 31 | } 32 | 33 | class AboutDialog : public QDialog 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | explicit AboutDialog(QWidget *parent = 0); 39 | ~AboutDialog(); 40 | void setupUI(); 41 | 42 | private: 43 | Ui::AboutDialog *ui; 44 | }; 45 | 46 | #endif // ABOUTDIALOG_H 47 | -------------------------------------------------------------------------------- /src/exif.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef EXIF_H 25 | #define EXIF_H 26 | 27 | #include "utils.h" 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | Exiv2::ExifData getExifFromPath(char* filename); 34 | QString exifDataToString(Exiv2::ExifData exifData); 35 | void writeSpecificExifTags(Exiv2::ExifData exifData, QString imagePath, QList exifs); 36 | void writeExif(Exiv2::ExifData exifData, Exiv2::ExifData* newExifData, std::string key_name); 37 | 38 | #endif // EXIF_H 39 | 40 | -------------------------------------------------------------------------------- /qss/style_osx.qss: -------------------------------------------------------------------------------- 1 | /* OSX specific look */ 2 | 3 | QDialog { 4 | background-color: #FFFFFF; 5 | } 6 | 7 | QProgressBar::chunk { 8 | background-color: #1cb495; 9 | border-radius: 2px; 10 | } 11 | 12 | QProgressBar { 13 | border: 1px solid #b5b5b5; 14 | border-radius: 3px; 15 | height: 5px; 16 | color: transparent; 17 | } 18 | 19 | QMainWindow::separator { 20 | background: transparent; 21 | } 22 | 23 | QDockWidget::title { 24 | padding-top: 10px; 25 | height: 32px; 26 | } 27 | 28 | QDockWidget { 29 | titlebar-close-icon: url(:/icons/ui/dock_close.png); 30 | titlebar-normal-icon: url(:/icons/ui/dock_float.png);; 31 | 32 | } 33 | QDockWidget::close-button, QDockWidget::float-button { 34 | width: 32px; 35 | height: 32px; 36 | icon-size: 32px; 37 | } 38 | 39 | QDockWidget::close-button { 40 | 41 | } 42 | 43 | QDockWidget::float-button { 44 | 45 | } 46 | 47 | QDockWidget::close-button:hover { 48 | background-color: red; 49 | } 50 | 51 | QDockWidget::float-button:hover { 52 | 53 | } 54 | 55 | QStatusBar { 56 | font-size: 11pt; 57 | } 58 | 59 | QStatusBar QLabel { 60 | font-size: 11pt; 61 | } 62 | 63 | QStatusBar QToolButton { 64 | font-size: 11pt; 65 | } 66 | 67 | QComboBox QAbstractItemView { 68 | selection-color: white; 69 | selection-background-color: #1cb495; 70 | background: white; 71 | } 72 | 73 | QListWidget { 74 | font-size: 15px; 75 | } 76 | -------------------------------------------------------------------------------- /src/qdroptreewidget.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef QDROPTREEWIDGET_H 25 | #define QDROPTREEWIDGET_H 26 | 27 | #include "src/caesiumph.h" 28 | 29 | #include 30 | 31 | class QMimeData; 32 | class CaesiumPH; 33 | 34 | class QDropTreeWidget : public QTreeWidget 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | QDropTreeWidget(QWidget *parent = 0); 40 | 41 | signals: 42 | void dropFinished(QStringList); 43 | void itemsChanged(); 44 | 45 | protected: 46 | void dragEnterEvent(QDragEnterEvent *event); 47 | void dragMoveEvent(QDragMoveEvent *event); 48 | void dropEvent(QDropEvent *event); 49 | 50 | }; 51 | 52 | #endif // QDROPTREEWIDGET_H 53 | -------------------------------------------------------------------------------- /src/cimageinfo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef CIMAGEINFO_H 25 | #define CIMAGEINFO_H 26 | 27 | #include 28 | 29 | class CImageInfo 30 | { 31 | public: 32 | CImageInfo(QString path); 33 | CImageInfo(); 34 | virtual ~CImageInfo(); 35 | 36 | QString getFullPath() const; 37 | void setFullPath(const QString &value); 38 | 39 | QString getBaseName() const; 40 | void setBaseName(const QString &value); 41 | 42 | int getSize() const; 43 | void setSize(int value); 44 | 45 | QString getFormattedSize() const; 46 | void setFormattedSize(const QString &value); 47 | 48 | bool isEqual(QString path); 49 | 50 | private: 51 | QString fullPath; 52 | QString baseName; 53 | int size; 54 | QString formattedSize; 55 | }; 56 | 57 | #endif // CIMAGEINFO_H 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## CaesiumPH 2 | ##### v0.9.5-beta (build 20160209) - Copyright © Matteo Paonessa, 2016. All Rights Reserved. 3 | 4 | [](https://flattr.com/submit/auto?user_id=Lymphatus&url=https://github.com/Lymphatus/CaesiumPH&title=CaesiumPH&tags=github&category=software) 5 | [](https://www.paypal.me/MPaonessa) 6 | 7 | 8 | 9 | schermata 2016-03-01 alle 10 51 18 10 | 11 | ---------- 12 | 13 | > A Caesium version featuring lossless JPEG optimization/compression for photographers and webmasters. 14 | 15 | ---------- 16 | 17 | ##### REQUIREMENTS 18 | * [mozjpeg](https://github.com/mozilla/mozjpeg) 19 | * [Exiv2](http://www.exiv2.org/) 20 | 21 | ---------- 22 | 23 | ##### TESTED PLATFORMS 24 | * MacOSX El Capitan (v. 10.11.1) 25 | * Windows 10 64 bit 26 | * ArchLinux 27 | 28 | ---------- 29 | 30 | ##### INSTALLATION 31 | Binaries can be found at [GitHub](https://github.com/Lymphatus/CaesiumPH/releases/latest) 32 | 33 | Linux source code must be compiled using Qt5.5. 34 | 35 | ---------- 36 | 37 | ##### KNOWN ISSUES 38 | - Sorting by ```NEW SIZE``` uses a rounded value and may not be 100% accurate 39 | 40 | ---------- 41 | 42 | ##### RESOURCES 43 | * CaesiumPH website - [http://saerasoft.com/caesium/ph](http://saerasoft.com/caesium/ph) 44 | * CaesiumPH Git Repository - [https://github.com/Lymphatus/CaesiumPH](https://github.com/Lymphatus/CaesiumPH) 45 | * Author website - SaeraSoft - [http://saerasoft.com](http://saerasoft.com) 46 | * Author Twitter [http://twitter.com/MatteoPaonessa](http://twitter.com/MatteoPaonessa) 47 | -------------------------------------------------------------------------------- /qss/style_win.qss: -------------------------------------------------------------------------------- 1 | /* Windows specific look */ 2 | 3 | QDialog { 4 | color: #FFFFFF; 5 | } 6 | 7 | QProgressBar::chunk { 8 | background-color: #1cb495; 9 | border-radius: 2px; 10 | } 11 | 12 | QProgressBar { 13 | border: 1px solid #b5b5b5; 14 | border-radius: 3px; 15 | height: 5px; 16 | color: transparent; 17 | } 18 | 19 | QMenu, QMenuBar { 20 | background-color: #FFFFFF; 21 | } 22 | 23 | QMenuBar::item, QMenu::item { 24 | color: #757575; 25 | } 26 | 27 | QMenu::item:selected, QMenuBar::item:selected { 28 | background-color: #221cb495; 29 | color: #757575; 30 | } 31 | 32 | QMenu:separator { 33 | height: 1px; 34 | background: #DD757575; 35 | margin: 0px 5px 0px 5px; 36 | } 37 | 38 | QDockWidget { 39 | titlebar-close-icon: url(:/icons/ui/dock_close.png); 40 | titlebar-normal-icon: url(:/icons/ui/dock_float.png); 41 | } 42 | 43 | QPushButton, QDialogButtonBox { 44 | background-color: #FFFFFF; 45 | border: 1px solid #1cb495; 46 | padding: 3px 10px 4px 10px; 47 | color: #757575; 48 | } 49 | 50 | QLineEdit { 51 | border: 1px solid #1cb495; 52 | padding: 2px 5px 2px 5px; 53 | } 54 | 55 | QComboBox { 56 | background: none; 57 | border: 1px solid #1cb495; 58 | padding: 2px 5px 2px 5px; 59 | } 60 | 61 | QComboBox::down-arrow { 62 | image: url(:/icons/ui/dropdown_arrow.png); 63 | } 64 | 65 | QComboBox::drop-down { 66 | padding: 5px; 67 | background: transparent; 68 | } 69 | 70 | QComboBox QAbstractItemView { 71 | border: 1px solid #1cb495; 72 | } 73 | 74 | QAction:active { 75 | background-color: #1cb495; 76 | } 77 | 78 | QLabel { 79 | color: #757575; 80 | } 81 | 82 | QStatusBar QToolButton { 83 | background-color: transparent; 84 | border: none; 85 | } 86 | 87 | QStatusBar QFrame { 88 | background: transparent; 89 | } 90 | 91 | #languageWarningLabel { 92 | font-size: 9px; 93 | } 94 | -------------------------------------------------------------------------------- /src/aboutdialog.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "aboutdialog.h" 25 | #include "ui_aboutdialog.h" 26 | #include "utils.h" 27 | 28 | #include 29 | #include 30 | 31 | AboutDialog::AboutDialog(QWidget *parent) : 32 | QDialog(parent), 33 | ui(new Ui::AboutDialog) 34 | { 35 | ui->setupUi(this); 36 | setupUI(); 37 | } 38 | 39 | AboutDialog::~AboutDialog() 40 | { 41 | delete ui; 42 | } 43 | 44 | void AboutDialog::setupUI() { 45 | //Add logo 46 | QGraphicsScene* scene = new QGraphicsScene(0, 0, 100, 100, this); 47 | QGraphicsPixmapItem* gItem = new QGraphicsPixmapItem(QIcon(":/icons/main/logo.png").pixmap(96)); 48 | scene->addItem(gItem); 49 | ui->logoGraphicsView->setScene(scene); 50 | 51 | //Version label 52 | ui->versionLabel->setText(tr("Version") + 53 | " " + versionString + 54 | "
(build " + 55 | QString::number(buildNumber) + ")"); 56 | } 57 | -------------------------------------------------------------------------------- /src/qdroptreewidget.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "qdroptreewidget.h" 25 | #include "caesiumph.h" 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | QDropTreeWidget::QDropTreeWidget(QWidget *parent) 35 | : QTreeWidget(parent) 36 | { 37 | 38 | } 39 | 40 | void QDropTreeWidget::dragEnterEvent(QDragEnterEvent *event) { 41 | event->acceptProposedAction(); 42 | } 43 | 44 | void QDropTreeWidget::dragMoveEvent(QDragMoveEvent *event) { 45 | event->accept(); 46 | } 47 | 48 | void QDropTreeWidget::dropEvent(QDropEvent *event) { 49 | const QMimeData *mimeData = event->mimeData(); 50 | QList urlList = mimeData->urls(); 51 | QStringList fileList; 52 | if (mimeData->hasFormat("text/uri-list")) { 53 | foreach (QUrl url, urlList) { 54 | fileList << url.toLocalFile(); 55 | } 56 | } 57 | event->acceptProposedAction(); 58 | emit dropFinished(fileList); 59 | } 60 | -------------------------------------------------------------------------------- /src/networkoperations.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef NETWORKOPERATIONS_H 25 | #define NETWORKOPERATIONS_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | class NetworkOperations : public QObject 33 | { 34 | Q_OBJECT 35 | 36 | public: 37 | explicit NetworkOperations(QObject *parent = 0); 38 | void checkForUpdates(); 39 | void downloadUpdateRequest(QString checksum); 40 | 41 | 42 | public slots: 43 | void getCurrentBuild(); 44 | void flushUpdate(); 45 | int compareUpdateChecksums(QString checksum, QByteArray *file); 46 | 47 | signals: 48 | void checkForUpdatesFinished(int, QString, QString); 49 | void updateDownloadFinished(QString); 50 | 51 | private: 52 | QNetworkAccessManager* networkManager = new QNetworkAccessManager(); 53 | QNetworkReply* updateReply; 54 | QNetworkReply* downloadUpdateReply; 55 | QString releaseURL; 56 | QProgressDialog* pDialog; 57 | QString updateChecksum; 58 | QString updatePath; 59 | 60 | }; 61 | 62 | #endif // NETWORKOPERATIONS_H 63 | -------------------------------------------------------------------------------- /src/cimageinfo.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "cimageinfo.h" 25 | #include "utils.h" 26 | 27 | #include 28 | 29 | CImageInfo::CImageInfo(QString path) { 30 | QFileInfo* fi = new QFileInfo(path); 31 | fullPath = path; 32 | baseName = fi->completeBaseName(); 33 | size = fi->size(); 34 | formattedSize = toHumanSize(size); 35 | } 36 | 37 | CImageInfo::CImageInfo() { 38 | 39 | } 40 | 41 | CImageInfo::~CImageInfo() { 42 | 43 | } 44 | 45 | QString CImageInfo::getFullPath() const { 46 | return fullPath; 47 | } 48 | 49 | void CImageInfo::setFullPath(const QString &value) { 50 | fullPath = value; 51 | } 52 | 53 | QString CImageInfo::getBaseName() const { 54 | return baseName; 55 | } 56 | 57 | void CImageInfo::setBaseName(const QString &value) { 58 | baseName = value; 59 | } 60 | 61 | int CImageInfo::getSize() const { 62 | return size; 63 | } 64 | 65 | void CImageInfo::setSize(int value) { 66 | size = value; 67 | } 68 | 69 | QString CImageInfo::getFormattedSize() const { 70 | return formattedSize; 71 | } 72 | 73 | void CImageInfo::setFormattedSize(const QString &value) { 74 | formattedSize = value; 75 | } 76 | 77 | bool CImageInfo::isEqual(QString path) { 78 | return (QString::compare(fullPath, path) == 0); 79 | } 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /CaesiumPH.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-07-12T17:46:21 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui concurrent network 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = CaesiumPH 12 | TEMPLATE = app 13 | 14 | QMAKE_MAC_SDK = macosx10.11 15 | 16 | macx { 17 | QMAKE_CXXFLAGS_CXX11 = -std=gnu++1y 18 | CONFIG *= c++11 19 | QMAKE_CXXFLAGS += -stdlib=libc++ 20 | LIBS += -L/usr/local/lib -lexiv2.14 -L/opt/mozjpeg/lib -ljpeg.62 -stdlib=libc++ 21 | INCLUDEPATH += /opt/mozjpeg/include /usr/local/include 22 | ICON = icons/icons/icon.icns 23 | } 24 | 25 | win32 { 26 | LIBS += -LC:\\mozjpeg\\lib -ljpeg -LC:\\exiv2\\src\\.libs -lexiv2 27 | INCLUDEPATH += C:\\mozjpeg\\include C:\\exiv2\\include 28 | RC_ICONS = icons/main/icon.ico 29 | } 30 | 31 | unix { 32 | LIBS += -ljpeg -lexiv2 33 | } 34 | 35 | CONFIG += warn_off c++11 36 | 37 | SOURCES += src/main.cpp\ 38 | src/caesiumph.cpp \ 39 | src/aboutdialog.cpp \ 40 | src/cimageinfo.cpp \ 41 | src/lossless.cpp \ 42 | src/utils.cpp \ 43 | src/exif.cpp \ 44 | src/preferencedialog.cpp \ 45 | src/networkoperations.cpp \ 46 | src/qdroptreewidget.cpp \ 47 | src/cphlist.cpp 48 | 49 | HEADERS += src/caesiumph.h \ 50 | src/aboutdialog.h \ 51 | src/cimageinfo.h \ 52 | src/lossless.h \ 53 | src/utils.h \ 54 | src/exif.h \ 55 | src/preferencedialog.h \ 56 | src/networkoperations.h \ 57 | src/qdroptreewidget.h \ 58 | src/ctreewidgetitem.h \ 59 | src/cphlist.h 60 | 61 | FORMS += \ 62 | src/aboutdialog.ui \ 63 | src/preferencedialog.ui \ 64 | src/caesiumph.ui 65 | 66 | RESOURCES += \ 67 | icons.qrc \ 68 | style.qrc 69 | 70 | DISTFILES += \ 71 | qss/style_osx.qss \ 72 | qss/style_win.qss \ 73 | qss/style_linux.qss \ 74 | README.md \ 75 | CHANGELOG.md \ 76 | LICENSE \ 77 | TODO.md \ 78 | qt.conf \ 79 | AUTHORS.md 80 | 81 | TRANSLATIONS = translations/caesiumph_en_US.ts \ 82 | translations/caesiumph_it_IT.ts \ 83 | translations/caesiumph_zh_CN.ts \ 84 | translations/caesiumph_ja_JP.ts 85 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### CHANGELOG 2 | 3 | ###### 0.9.5-beta (12/04/2016) 4 | * FIXED 5 | * UI Restyle 6 | * Experimental fix for crash at compression start 7 | * ADDED 8 | * Preview loader animation 9 | * REMOVED 10 | * Usage reports 11 | 12 | ---------- 13 | 14 | ###### 0.9.4-beta (01/02/2016) 15 | * FIXED 16 | * Remove/Clear button behaviour with empty lists 17 | * Overflow for big file sizes converted to human form 18 | * Bugfixes 19 | * From LGPL to GPL 20 | * ComboBox styling on OSX 21 | * ADDED 22 | * Context menu for the file list 23 | * Save/Open list 24 | * Copyright notice in source files 25 | * Update system now detects already downloaded updates 26 | * Checksum check for downloaded updates 27 | * Logging to file 28 | * Multilanguage support 29 | 30 | ---------- 31 | 32 | ###### 0.9.3-beta (01/12/2015) 33 | * FIXED 34 | * The EXIF checkbox now it's tri-state 35 | * Fixed sorting for ```NEW SIZE``` and ```RATIO``` columns 36 | * Dropping multiple folders now correctly adds them all instead of the only one active 37 | * Progressive support working as intended 38 | * Style tuning 39 | * ADDED 40 | * If the compressed file is bigger than the original it now skips it 41 | * A little status bar, documenting actions (and compression results) 42 | * ImageDescription and XPComment are now saved if we choose to keep the EXIF comments 43 | * The update process is now performed at startup 44 | * New brand compress button 45 | 46 | ---------- 47 | 48 | ###### 0.9.2-beta (25/09/2015) 49 | * FIXED 50 | * Wrong OS recognition under Linux 51 | * The list now correcly reads focus and keyboard shortcuts 52 | * JPEG module on OSX is now correcly bundled 53 | * Items removal now correctly removes all the selected items 54 | * Fixed the browse button behaviour in preferences 55 | * ADDED 56 | * You can now keep only Copyright, Datetime and Comments in EXIF 57 | * By deleting an item or clearing the list, the preview and EXIF box will empty 58 | 59 | ---------- 60 | 61 | ###### 0.9.1-beta (04/09/2015) 62 | Initial release 63 | 64 | ---------- 65 | 66 | For a more detailed list of commits, see the [GitHub Repository](https://github.com/Lymphatus/CaesiumPH) 67 | -------------------------------------------------------------------------------- /src/ctreewidgetitem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef CTREEWIDGETITEM_H 25 | #define CTREEWIDGETITEM_H 26 | 27 | #include 28 | #include 29 | 30 | #include "src/utils.h" 31 | 32 | class CTreeWidgetItem : public QTreeWidgetItem 33 | { 34 | public: 35 | CTreeWidgetItem(QTreeWidget* parent) : QTreeWidgetItem(parent) {} 36 | CTreeWidgetItem(QTreeWidget* parent, QStringList list) : QTreeWidgetItem(parent, list) {} 37 | private: 38 | bool operator< (const QTreeWidgetItem &other) const { 39 | int column = treeWidget()->sortColumn(); 40 | switch (column) { 41 | case 1: 42 | return QFileInfo(text(COLUMN_PATH)).size() < QFileInfo(other.text(COLUMN_PATH)).size(); 43 | case 2: 44 | //Sort by compressed size 45 | /* 46 | * WARNING This methods ignores the less significant bytes of the size 47 | * and may lead to inaccurate sorting. Won't fix for now as not critical. 48 | */ 49 | return humanToDouble(text(column)) < humanToDouble(other.text(column)); 50 | case 3: 51 | //Sort by saved space 52 | return ratioToDouble(text(column)) < ratioToDouble(other.text(column)); 53 | default: 54 | //Sort by path 55 | return text(column).toLower() < other.text(column).toLower(); 56 | } 57 | } 58 | }; 59 | 60 | #endif // CTREEWIDGETITEM_H 61 | -------------------------------------------------------------------------------- /src/utils.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef UTILS_H 25 | #define UTILS_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #define MAX_COLUMNS 5 35 | 36 | enum cexifs { 37 | EXIF_COPYRIGHT, 38 | EXIF_DATE, 39 | EXIF_COMMENTS 40 | }; 41 | 42 | enum list_columns { 43 | COLUMN_NAME = 0, 44 | COLUMN_ORIGINAL_SIZE = 1, 45 | COLUMN_NEW_SIZE = 2, 46 | COLUMN_SAVED = 3, 47 | COLUMN_PATH = 4 48 | }; 49 | 50 | typedef struct var { 51 | int exif; 52 | QList importantExifs; 53 | int progressive; 54 | bool overwrite; 55 | int outMethodIndex; 56 | QString outMethodString; 57 | } cparams; 58 | 59 | extern QString clfFilter; 60 | extern QStringList inputFilterList; 61 | extern QString versionString; 62 | extern int versionNumber; 63 | extern QString updateVersionTag; 64 | extern int buildNumber; 65 | extern long originalsSize, compressedSize; //Before and after bytes count 66 | extern int compressedFiles; //Compressed files count 67 | extern cparams params; //Important parameters 68 | extern QStringList osAndExtension; 69 | extern QTemporaryDir tempDir; 70 | extern QElapsedTimer timer; 71 | extern QString lastCPHListPath; //Path of the last list saved 72 | extern QList locales; 73 | extern QString logPath; //Log file path 74 | 75 | QString toHumanSize(long); 76 | double humanToDouble(QString); 77 | QString getRatio(qint64, qint64); 78 | char* QStringToChar(QString s); 79 | QSize getScaledSizeWithRatio(QSize size, int square); //Image preview resize 80 | double ratioToDouble(QString ratio); 81 | bool isJPEG(char* path); 82 | QString msToFormattedString(qint64); 83 | bool haveSameRootFolder(QList items); 84 | QString toCapitalCase(const QString); 85 | void loadLocales(); 86 | 87 | #endif // UTILS_H 88 | -------------------------------------------------------------------------------- /src/preferencedialog.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef PREFERENCEDIALOG_H 25 | #define PREFERENCEDIALOG_H 26 | 27 | #include 28 | #include 29 | 30 | //Preference group keys 31 | #define KEY_PREF_GROUP_GENERAL QString("PreferenceGeneral/") 32 | #define KEY_PREF_GROUP_COMPRESSION QString("PreferenceCompression/") 33 | #define KEY_PREF_GROUP_PRIVACY QString("PreferencePrivacy/") 34 | #define KEY_PREF_GROUP_GEOMETRY QString("WindowGeometry/") 35 | 36 | //General group keys 37 | #define KEY_PREF_GENERAL_OVERWRITE QString("overwrite") 38 | #define KEY_PREF_GENERAL_SUBFOLDER QString("subfolder") 39 | #define KEY_PREF_GENERAL_OUTPUT_METHOD QString("outMethod") 40 | #define KEY_PREF_GENERAL_OUTPUT_STRING QString("outString") 41 | #define KEY_PREF_GENERAL_LOCALE QString("locale") 42 | #define KEY_PREF_GENERAL_LOCALE_STRING QString("localeString") 43 | #define KEY_PREF_GENERAL_PROMPT QString("promptExit") 44 | 45 | //Compression group keys 46 | #define KEY_PREF_COMPRESSION_EXIF QString("exif") 47 | #define KEY_PREF_COMPRESSION_EXIF_COPYRIGHT QString("exifCopyright") 48 | #define KEY_PREF_COMPRESSION_EXIF_DATE QString("exifDate") 49 | #define KEY_PREF_COMPRESSION_EXIF_COMMENT QString("exifComment") 50 | #define KEY_PREF_COMPRESSION_PROGRESSIVE QString("progressive") 51 | 52 | //Geometry group keys 53 | #define KEY_PREF_GEOMETRY_SIZE QString("size") 54 | #define KEY_PREF_GEOMETRY_POS QString("pos") 55 | #define KEY_PREF_GEOMETRY_PANEL_VISIBLE QString("sidePanelVisible") 56 | #define KEY_PREF_GEOMETRY_PANEL_FLOAT QString("sidePanelFloating") 57 | #define KEY_PREF_GEOMETRY_SORT_ORDER QString("sortOrder") 58 | #define KEY_PREF_GEOMETRY_SORT_COLUMN QString("sortColumn") 59 | 60 | namespace Ui { 61 | class PreferenceDialog; 62 | } 63 | 64 | class PreferenceDialog : public QMainWindow 65 | { 66 | Q_OBJECT 67 | 68 | public: 69 | explicit PreferenceDialog(QWidget *parent = 0); 70 | ~PreferenceDialog(); 71 | 72 | private slots: 73 | void closeEvent(QCloseEvent *event); 74 | void writePreferences(); 75 | void readPreferences(); 76 | void loadTranslations(); 77 | 78 | void on_outputFileMethodComboBox_currentIndexChanged(int index); 79 | void on_browseButton_clicked(); 80 | void on_keepCopyrightCheckBox_toggled(bool checked); 81 | void on_keepDateCheckBox_toggled(bool checked); 82 | void on_keepCommentsCheckBox_toggled(bool checked); 83 | void on_languageComboBox_currentIndexChanged(int index); 84 | 85 | void on_menuListWidget_currentRowChanged(int currentRow); 86 | 87 | private: 88 | Ui::PreferenceDialog *ui; 89 | enum Qt::CheckState getExifsCheckBoxGroupState(); 90 | QSettings settings; 91 | 92 | }; 93 | 94 | #endif // PREFERENCEDIALOG_H 95 | -------------------------------------------------------------------------------- /src/cphlist.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "cphlist.h" 25 | #include "utils.h" 26 | 27 | #include 28 | #include 29 | 30 | CPHList::CPHList() { 31 | 32 | } 33 | 34 | QList CPHList::readFile(QString path) { 35 | //Create a QFile to perform some checks 36 | QFile in(path); 37 | //And the container list 38 | QList items; 39 | //Check existance and open it 40 | if (in.exists() && in.open(QIODevice::ReadOnly)) { 41 | //TODO it does not check if the file is poorly written 42 | //First line is the file version number 43 | int version = QString(in.readLine()).split("\n").at(0).toInt(); 44 | //If version is lesser than the current, perform version update 45 | if (version < CLF_VERSION) { 46 | //TODO Implement version update according to the future <3 47 | } 48 | 49 | //Second line is the column count 50 | int column_count = QString(in.readLine()).split("\n").at(0).toInt(); 51 | 52 | //Third is the item count 53 | int item_count = QString(in.readLine()).split("\n").at(0).toInt(); 54 | 55 | //Start reading data 56 | for (int i = 0; i < item_count; i++) { 57 | 58 | //Temporary list 59 | QStringList buffer; 60 | //For every item, read the columns 61 | for (int j = 0; j < column_count; j++) { 62 | buffer.append(QString(in.readLine()).split("\n").at(0)); 63 | } 64 | //Add the compiled specs to the Items list 65 | items.append(new QTreeWidgetItem(buffer)); 66 | } 67 | //CLose the file 68 | in.close(); 69 | } else { 70 | qCritical() << "Failed to open CPHLF at path: " << path; 71 | } 72 | return items; 73 | } 74 | 75 | void CPHList::writeToFile(QList list, QString path) { 76 | //Create a QFile to perform some checks 77 | QFile out(path); 78 | 79 | if (out.open(QIODevice::WriteOnly)) { 80 | //Fisrt line is the version number 81 | out.write(QByteArray::number(CLF_VERSION) + "\n"); 82 | 83 | //Second is the columns number 84 | out.write(QByteArray::number(MAX_COLUMNS) + "\n"); 85 | 86 | //Third is the item count 87 | out.write(QByteArray::number(list.length()) + "\n"); 88 | 89 | //Then we can write the lines 90 | for (int i = 0; i < list.length(); i++) { 91 | for (int j = 0; j < MAX_COLUMNS; j++) { 92 | out.write(list.at(i)->text(j).toUtf8() + "\n"); 93 | } 94 | } 95 | //CLose the file 96 | out.close(); 97 | } else { 98 | qCritical() << "Failed to write CPHLF at path: " << path; 99 | return; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/caesiumph.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #ifndef CAESIUMPH_H 25 | #define CAESIUMPH_H 26 | 27 | #include "cimageinfo.h" 28 | #include "cphlist.h" 29 | #include "ctreewidgetitem.h" 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | namespace Ui { 40 | class CaesiumPH; 41 | } 42 | 43 | class CaesiumPH : public QMainWindow 44 | { 45 | Q_OBJECT 46 | 47 | public: 48 | explicit CaesiumPH(QWidget *parent = 0); 49 | bool eventFilter(QObject *obj, QEvent *event); 50 | ~CaesiumPH(); 51 | static CaesiumPH* instance() { 52 | static CaesiumPH window; 53 | return &window; 54 | } 55 | 56 | //Gets the right output folder 57 | QString getOutputPath(QFileInfo *originalInfo); 58 | 59 | //Compress routine 60 | void compressRoutine(CTreeWidgetItem* ); 61 | 62 | signals: 63 | void dropAccepted(QStringList); 64 | 65 | private slots: 66 | void on_actionAbout_CaesiumPH_triggered(); 67 | void on_actionAdd_pictures_triggered(); 68 | void on_actionAdd_folder_triggered(); 69 | void on_actionRemove_items_triggered(); 70 | void on_actionCompress_triggered(); 71 | void compressionStarted(); 72 | void compressionFinished(); 73 | void on_sidePanelDockWidget_topLevelChanged(bool topLevel); 74 | void on_sidePanelDockWidget_visibilityChanged(bool visible); 75 | void on_showSidePanelButton_clicked(bool checked); 76 | void on_listTreeWidget_itemSelectionChanged(); 77 | QImage loadImagePreview(QString path); 78 | void finishPreviewLoading(int i); 79 | void closeEvent(QCloseEvent *event); 80 | void on_settingsButton_clicked(); 81 | void showImportProgressDialog(QStringList); 82 | void updateAvailable(int, QString, QString); 83 | void on_updateButton_clicked(); 84 | void updateDownloadFinished(QString); 85 | void clearUI(); 86 | void updateStatusBarCount(); 87 | void showListContextMenu(QPoint); 88 | void on_actionShow_input_folder_triggered(); 89 | void on_actionShow_output_folder_triggered(); 90 | void on_actionSave_list_triggered(); 91 | void on_actionSave_list_as_triggered(); 92 | void on_actionOpen_list_triggered(); 93 | void listChanged(); 94 | //TODO Remove, just test slot 95 | void testSignal(); 96 | void on_exifTextEdit_textChanged(); 97 | void startPreviewLoading(); 98 | 99 | 100 | private: 101 | Ui::CaesiumPH *ui; 102 | QFutureWatcher imageWatcher; //Image preview loader 103 | //Status bar widgets 104 | QToolButton* updateButton = new QToolButton(); 105 | QFrame* statusStatusBarLine = new QFrame(); 106 | QFrame* updateStatusBarLine = new QFrame(); 107 | QLabel* statusBarLabel = new QLabel(); 108 | QString updatePath; 109 | QString inputFilter = QIODevice::tr("Image Files") + " (*.jpg *.jpeg)"; 110 | 111 | //List Menu 112 | QMenu* listMenu; 113 | //List menu actions 114 | QAction* listRemoveAction; 115 | QAction* listShowInputFolderAction; 116 | QAction* listShowOutputFolderAction; 117 | QAction* listClearAction; 118 | 119 | 120 | void initializeConnections(); 121 | void initializeUI(); 122 | void readPreferences(); 123 | 124 | //Update 125 | void checkUpdates(); 126 | //Menus 127 | void createMenuActions(); 128 | void createMenus(); 129 | 130 | //Check list duplicates 131 | bool hasADuplicateInList(CImageInfo* c); 132 | 133 | //CPHList save function 134 | void saveCPHListToFile(QString path); 135 | 136 | }; 137 | 138 | #endif // CAESIUMPH_H 139 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "caesiumph.h" 25 | #include "utils.h" 26 | #include "preferencedialog.h" 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | void logHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { 36 | //TODO Close the file? 37 | QByteArray localMsg = msg.toUtf8(); 38 | 39 | QString logMessage; 40 | 41 | QFile *file = new QFile(logPath); 42 | 43 | if (file->open(QFile::Append | QIODevice::Text)) { 44 | QTextStream out(file); 45 | switch (type) { 46 | case QtDebugMsg: 47 | logMessage.sprintf("[%s] [DEBUG] %s \n(%s:%u, %s)\n", 48 | QStringToChar(QTime::currentTime().toString("hh:mm:ss.zzz")), 49 | localMsg.constData(), 50 | context.file, 51 | context.line, 52 | context.function); 53 | out << logMessage; 54 | break; 55 | case QtInfoMsg: 56 | logMessage.sprintf("[%s] [INFO] %s\n", 57 | QStringToChar(QTime::currentTime().toString("hh:mm:ss.zzz")), 58 | localMsg.constData()); 59 | out << logMessage; 60 | break; 61 | case QtWarningMsg: 62 | logMessage.sprintf("[%s] [WARNING] %s\n", 63 | QStringToChar(QTime::currentTime().toString("hh:mm:ss.zzz")), 64 | localMsg.constData()); 65 | out << logMessage; 66 | break; 67 | case QtCriticalMsg: 68 | logMessage.sprintf("[%s] [CRITICAL] %s \n(%s:%u, %s)\n", 69 | QStringToChar(QTime::currentTime().toString("hh:mm:ss.zzz")), 70 | localMsg.constData(), 71 | context.file, 72 | context.line, 73 | context.function); 74 | out << logMessage; 75 | break; 76 | case QtFatalMsg: 77 | logMessage.sprintf("[%s] [FATAL] %s \n(%s:%u, %s)\n", 78 | QStringToChar(QTime::currentTime().toString("hh:mm:ss.zzz")), 79 | localMsg.constData(), 80 | context.file, 81 | context.line, 82 | context.function); 83 | out << logMessage; 84 | abort(); 85 | 86 | out.flush(); 87 | } 88 | } else { 89 | qCritical() << "Cannot log to file."; 90 | } 91 | } 92 | 93 | int main(int argc, char *argv[]) { 94 | qInstallMessageHandler(logHandler); 95 | QApplication a(argc, argv); 96 | 97 | QCoreApplication::setApplicationName("CaesiumPH"); 98 | QCoreApplication::setOrganizationName("SaeraSoft"); 99 | QCoreApplication::setOrganizationDomain("saerasoft.com"); 100 | 101 | QSettings settings; 102 | 103 | qInfo() << "----------------- CaesiumPH session started at " 104 | << QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss") << "-----------------"; 105 | 106 | //Load languages 107 | loadLocales(); 108 | QString locale; 109 | if (settings.value(KEY_PREF_GENERAL_LOCALE_STRING).value().isEmpty()) { 110 | locale = locales.at(0).name(); 111 | } else { 112 | locale = settings.value(KEY_PREF_GENERAL_LOCALE_STRING).value(); 113 | } 114 | 115 | //2x images for OSX Retina 116 | a.setAttribute(Qt::AA_UseHighDpiPixmaps); 117 | 118 | //Load styles 119 | #ifdef __APPLE__ 120 | QFile qss(":/qss/style_osx.qss"); 121 | #elif _WIN32 122 | QFile qss(":/qss/style_win.qss"); 123 | #else 124 | QFile qss(":/qss/style_linux.qss"); 125 | #endif 126 | 127 | qss.open(QFile::ReadOnly); 128 | //Apply 129 | QString style(qss.readAll()); 130 | a.setStyleSheet(style); 131 | 132 | //Translation support 133 | //Qt Widgets 134 | QTranslator qtTranslator; 135 | qtTranslator.load("qt_" + locale, 136 | QLibraryInfo::location(QLibraryInfo::TranslationsPath)); 137 | a.installTranslator(&qtTranslator); 138 | 139 | //App translations 140 | QTranslator myappTranslator; 141 | bool tr_loaded = myappTranslator.load("caesiumph_" + 142 | locale, 143 | QLibraryInfo::location(QLibraryInfo::TranslationsPath)); 144 | a.installTranslator(&myappTranslator); 145 | 146 | CaesiumPH w; 147 | w.show(); 148 | 149 | qInfo() << "Translation path is: " << QLibraryInfo::location(QLibraryInfo::TranslationsPath); 150 | qInfo() << "Trying to load translation for language" << locale; 151 | qInfo() << "Translation loading result was" << tr_loaded; 152 | 153 | return a.exec(); 154 | } 155 | -------------------------------------------------------------------------------- /src/exif.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include 25 | #include "exif.h" 26 | #include "utils.h" 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | #include 35 | 36 | 37 | Exiv2::ExifData getExifFromPath(char* filename) { 38 | qDebug() << "Trying to read EXIF for" << filename; 39 | try { 40 | Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); 41 | assert(image.get() != 0); 42 | image->readMetadata(); 43 | 44 | Exiv2::ExifData &exifData = image->exifData(); 45 | if (exifData.empty()) { 46 | std::string error(filename); 47 | error += ": No Exif data found in the file"; 48 | 49 | //TODO Translate 50 | //throw Exiv2::Error(1, error); 51 | } 52 | return exifData; 53 | } catch (Exiv2::Error& e) { 54 | Exiv2::ExifData exifData; 55 | qCritical() << "Caught Exiv2 exception '" << e.what(); 56 | //TODO Translate 57 | return exifData; 58 | } 59 | 60 | 61 | } 62 | 63 | QString exifDataToString(Exiv2::ExifData exifData) { 64 | if (exifData.empty()) { 65 | //TODO Translate 66 | return QString("No EXIF found"); 67 | } 68 | try { 69 | Exiv2::ExifData::const_iterator end = exifData.end(); 70 | QString tmpExif, final; 71 | for (Exiv2::ExifData::const_iterator i = exifData.begin(); i != end; ++i) { 72 | const char* tn = i->typeName(); 73 | /*std::string str = i->key() << " "; 74 | << "0x" << std::setw(4) << std::setfill('0') << std::right 75 | << std::hex << i->tag() << " " 76 | << std::setw(9) << std::setfill(' ') << std::left 77 | << (tn ? tn : "Unknown") << " " 78 | << std::dec << std::setw(3) 79 | << std::setfill(' ') << std::right 80 | << i->count() << " " 81 | << std::dec << i->value() 82 | << "\n";*/ 83 | tmpExif = "" + QString::fromStdString(i->key()).split(".").at(2) + " " + 84 | //QString::number(i->tag()) + "\t" + 85 | //(tn ? tn : "Unknown") + "\t" + 86 | //QString::number(i->count()) + "\t" + 87 | QString::fromStdString(i->value().toString()) + "
"; 88 | final.append(tmpExif); 89 | } 90 | return final; 91 | } catch(Exiv2::Error& e) { 92 | std::cout << "Caught Exiv2 exception '" << e.what() << "'\n"; 93 | //TODO Translate 94 | return QString("Error while reading EXIF"); 95 | } 96 | } 97 | 98 | void writeSpecificExifTags(Exiv2::ExifData exifData, QString imagePath, QList exifs) { 99 | //If tags are empty, jus return back 100 | if (exifData.empty()) { 101 | return; 102 | } 103 | //Get output file path 104 | std::string path = imagePath.toStdString(); 105 | 106 | Exiv2::ExifData newExifData; 107 | 108 | foreach (cexifs cex, exifs) { 109 | if (cex == EXIF_COPYRIGHT) { 110 | writeExif(exifData, &newExifData, "Exif.Image.Copyright"); 111 | } else if (cex == EXIF_DATE) { 112 | writeExif(exifData, &newExifData, "Exif.Image.DateTime"); 113 | writeExif(exifData, &newExifData, "Exif.Image.DateTimeOriginal"); 114 | writeExif(exifData, &newExifData, "Exif.Photo.DateTimeOriginal"); 115 | writeExif(exifData, &newExifData, "Exif.Photo.DateTimeDigitized"); 116 | writeExif(exifData, &newExifData, "Exif.Photo.SubSecTime"); 117 | writeExif(exifData, &newExifData, "Exif.Photo.SubSecTimeOriginal"); 118 | writeExif(exifData, &newExifData, "Exif.Photo.SubSecTimeDigitized"); 119 | writeExif(exifData, &newExifData, "Exif.GPSInfo.GPSDateStamp"); 120 | } else if (cex == EXIF_COMMENTS) { 121 | writeExif(exifData, &newExifData, "Exif.Photo.UserComment"); 122 | writeExif(exifData, &newExifData, "Exif.Image.ImageDescription"); 123 | writeExif(exifData, &newExifData, "Exif.Image.XPComment"); 124 | } 125 | } 126 | 127 | Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path); 128 | assert(image.get() != 0); 129 | 130 | image->setExifData(newExifData); 131 | image->writeMetadata(); 132 | } 133 | 134 | void writeExif(Exiv2::ExifData exifData, Exiv2::ExifData* newExifData, std::string key_name) { 135 | //TODO Errors 136 | try { 137 | Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::asciiString); 138 | Exiv2::ExifData::iterator pos; 139 | 140 | //Get the tag and rewrite it 141 | Exiv2::ExifKey key = Exiv2::ExifKey(key_name); 142 | pos = exifData.findKey(key); 143 | if (pos != exifData.end()) { 144 | v = pos->getValue(); 145 | newExifData->add(key, v.get()); 146 | } else { 147 | //Not found 148 | } 149 | } 150 | catch (Exiv2::AnyError& e) { 151 | qWarning() << "Caught Exiv2 exception: " + QString(e.what()) + "\n"; 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /src/lossless.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | 33 | #include "lossless.h" 34 | #include "caesiumph.h" 35 | 36 | struct jpeg_decompress_struct cclt_get_markers(char* input) { 37 | FILE* fp; 38 | struct jpeg_decompress_struct einfo; 39 | struct jpeg_error_mgr eerr; 40 | einfo.err = jpeg_std_error(&eerr); 41 | 42 | jpeg_create_decompress(&einfo); 43 | 44 | //Open the input file 45 | fp = fopen(input, "r"); 46 | 47 | //Check for errors 48 | if (fp == NULL) { 49 | qCritical() << "Failed to open exif file" << input; 50 | } 51 | 52 | //Create the IO istance for the input file 53 | jpeg_stdio_src(&einfo, fp); 54 | 55 | //Save EXIF info 56 | for (int m = 0; m < 16; m++) { 57 | jpeg_save_markers(&einfo, JPEG_APP0 + m, 0xFFFF); 58 | } 59 | 60 | jpeg_read_header(&einfo, TRUE); 61 | 62 | fclose(fp); 63 | 64 | return einfo; 65 | } 66 | 67 | void jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo) { 68 | jpeg_saved_marker_ptr marker; 69 | 70 | for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) { 71 | if (dstinfo->write_JFIF_header && 72 | marker->marker == JPEG_APP0 && 73 | marker->data_length >= 5 && 74 | GETJOCTET(marker->data[0]) == 0x4A && 75 | GETJOCTET(marker->data[1]) == 0x46 && 76 | GETJOCTET(marker->data[2]) == 0x49 && 77 | GETJOCTET(marker->data[3]) == 0x46 && 78 | GETJOCTET(marker->data[4]) == 0) 79 | continue; 80 | if (dstinfo->write_Adobe_marker && 81 | marker->marker == JPEG_APP0+14 && 82 | marker->data_length >= 5 && 83 | GETJOCTET(marker->data[0]) == 0x41 && 84 | GETJOCTET(marker->data[1]) == 0x64 && 85 | GETJOCTET(marker->data[2]) == 0x6F && 86 | GETJOCTET(marker->data[3]) == 0x62 && 87 | GETJOCTET(marker->data[4]) == 0x65) 88 | continue; 89 | jpeg_write_marker(dstinfo, marker->marker, 90 | marker->data, marker->data_length); 91 | } 92 | } 93 | 94 | extern int cclt_optimize(char* input_file, char* output_file, int exif_flag, int progressive_flag, char* exif_src) { 95 | //File pointer for both input and output 96 | FILE* fp; 97 | 98 | //Those will hold the input/output structs 99 | struct jpeg_decompress_struct srcinfo; 100 | struct jpeg_compress_struct dstinfo; 101 | 102 | //Error handling 103 | struct jpeg_error_mgr jsrcerr, jdsterr; 104 | 105 | //Input/Output array coefficents 106 | jvirt_barray_ptr* src_coef_arrays; 107 | jvirt_barray_ptr* dst_coef_arrays; 108 | 109 | //Set errors and create the compress/decompress istances 110 | srcinfo.err = jpeg_std_error(&jsrcerr); 111 | jpeg_create_decompress(&srcinfo); 112 | dstinfo.err = jpeg_std_error(&jdsterr); 113 | jpeg_create_compress(&dstinfo); 114 | 115 | //Open the input file 116 | fp = fopen(input_file, "rb"); 117 | 118 | qInfo() << "Compressing" << input_file; 119 | 120 | //Check for errors 121 | if (fp == NULL) { 122 | qCritical() << "Failed to open file" << input_file; 123 | return -1; 124 | } 125 | 126 | //Create the IO istance for the input file 127 | jpeg_stdio_src(&srcinfo, fp); 128 | 129 | qInfo() << "Save EXIF info"; 130 | 131 | //Save EXIF info 132 | if (exif_flag == 2) { 133 | for (int m = 0; m < 16; m++) { 134 | jpeg_save_markers(&srcinfo, JPEG_APP0 + m, 0xFFFF); 135 | } 136 | } 137 | 138 | //Read the input headers 139 | (void) jpeg_read_header(&srcinfo, TRUE); 140 | 141 | //Read input coefficents 142 | src_coef_arrays = jpeg_read_coefficients(&srcinfo); 143 | 144 | //Copy parameters 145 | jpeg_copy_critical_parameters(&srcinfo, &dstinfo); 146 | 147 | //Set coefficents array to be the same 148 | dst_coef_arrays = src_coef_arrays; 149 | 150 | //We don't need the input file anymore 151 | fclose(fp); 152 | 153 | qInfo() << "Input file read succesfully"; 154 | 155 | //Open the output one instead 156 | fp = fopen(output_file, "wb"); 157 | //Check for errors 158 | if (fp == NULL) { 159 | qCritical() << "Failed to open output file" << output_file; 160 | return -1; 161 | } 162 | 163 | //CRITICAL - This is the optimization step 164 | dstinfo.optimize_coding = TRUE; 165 | 166 | //Progressive 167 | if (progressive_flag) { 168 | jpeg_simple_progression(&dstinfo); 169 | } else { 170 | //Outputs a baseline image 171 | dstinfo.scan_info = NULL; 172 | } 173 | 174 | //Set the output file parameters 175 | jpeg_stdio_dest(&dstinfo, fp); 176 | 177 | //Actually write the coefficents 178 | jpeg_write_coefficients(&dstinfo, dst_coef_arrays); 179 | 180 | qInfo() << "Output file wrote succesfully"; 181 | 182 | //Write EXIF 183 | if (exif_flag == 2) { 184 | if (strcmp(input_file, exif_src) == 0) { 185 | jcopy_markers_execute(&srcinfo, &dstinfo); 186 | } else { 187 | //For standard compression EXIF data 188 | struct jpeg_decompress_struct einfo = cclt_get_markers(exif_src); 189 | jcopy_markers_execute(&einfo, &dstinfo); 190 | jpeg_destroy_decompress(&einfo); 191 | } 192 | } 193 | 194 | qInfo() << "EXIF copied, if any"; 195 | 196 | //Finish and free 197 | jpeg_finish_compress(&dstinfo); 198 | jpeg_destroy_compress(&dstinfo); 199 | (void) jpeg_finish_decompress(&srcinfo); 200 | jpeg_destroy_decompress(&srcinfo); 201 | 202 | //Close the output file 203 | fclose(fp); 204 | 205 | return 0; 206 | } 207 | -------------------------------------------------------------------------------- /src/utils.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "utils.h" 25 | #include "math.h" 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | QString clfFilter = "CaesiumPH List File (*.cphlf)"; 37 | QStringList inputFilterList = QStringList() << "*.jpg" << "*.jpeg"; 38 | QString versionString = "0.9.5-beta"; 39 | int versionNumber = 95; 40 | int buildNumber = QDateTime::currentDateTime().toString("yyyyMMdd").toInt(); 41 | QString updateVersionTag = ""; 42 | long originalsSize = 0; 43 | long compressedSize = 0; 44 | int compressedFiles = 0; 45 | cparams params; 46 | QStringList osAndExtension = QStringList() << 47 | #ifdef _WIN32 48 | "win" << ".exe"; 49 | #elif __APPLE__ 50 | "osx" << ".dmg"; 51 | #else 52 | "linux" << ".tar.gz"; 53 | #endif 54 | QTemporaryDir tempDir; 55 | QElapsedTimer timer; 56 | QString lastCPHListPath = ""; 57 | QList locales; 58 | QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + 59 | "/" + 60 | QDate::currentDate().toString("caesiumph_dd_MM_yyyy.log"); 61 | 62 | QString toHumanSize(long size) { 63 | //Check if size is 0 to avoid crashes 64 | if (size == 0) { 65 | return "0 bytes"; 66 | } 67 | 68 | QStringList unit; 69 | unit << "Bytes" << "Kb" << "Mb" << "Gb" << "Tb"; 70 | //Index of the array containing the correct unit 71 | double order = floor(log2(labs(size)) / 10); 72 | 73 | //We should never handle files over 1k Tb, but... 74 | if (order > 4) { 75 | qWarning() << "Woah, huge collection!"; 76 | order = 4; 77 | } 78 | 79 | return QString::number(size / (pow(1024, order)), 'f', 2) + unit[(int)order]; 80 | } 81 | 82 | double humanToDouble(QString human_size) { 83 | QStringList splitted = human_size.split(" "); 84 | if (splitted.at(1) == "Kb") { 85 | return QString(splitted.at(0)).toDouble() * 1024; 86 | } else if (splitted.at(1) == "Mb") { 87 | return QString(splitted.at(0)).toDouble() * 1048576; 88 | } else { 89 | return QString(splitted.at(0)).toDouble(); 90 | } 91 | } 92 | 93 | QString getRatio(qint64 original, qint64 compressed) { 94 | return QString::number(((float) ((original - compressed) * 100) / (float) original), 'f', 1) + "%"; 95 | } 96 | 97 | char* QStringToChar(QString s) { 98 | char* c_str = (char*) malloc((s.length() + 1) * sizeof(char)); 99 | QByteArray bArray = s.toLocal8Bit(); 100 | strcpy(c_str, bArray.data()); 101 | return c_str; 102 | } 103 | 104 | QSize getScaledSizeWithRatio(QSize size, int square) { 105 | int w = size.width(); 106 | int h = size.height(); 107 | 108 | double ratio = 0.0; 109 | 110 | //Check the biggest between the two and scale on that dimension 111 | if (w >= h) { 112 | ratio = w / (double) square; 113 | } else { 114 | ratio = h / (double) square; 115 | } 116 | 117 | return QSize((int) round(w / ratio), (int) h / ratio); 118 | } 119 | 120 | double ratioToDouble(QString ratio) { 121 | ratio = ratio.split("%").at(0); 122 | return ratio.toDouble(); 123 | } 124 | 125 | bool isJPEG(char* path) { 126 | FILE* fp; 127 | unsigned char* type_buffer = (unsigned char*) malloc(2); 128 | 129 | fp = fopen(path, "r"); 130 | 131 | if (fp == NULL) { 132 | qWarning() << "Cannot open" << path << "for type detection. Skipping"; 133 | return false; 134 | } 135 | 136 | if (fread(type_buffer, 1, 2, fp) < 2) { 137 | qWarning() << "Cannot read" << path << "type. Skipping"; 138 | return false; 139 | } 140 | 141 | fclose(fp); 142 | 143 | if (((int) type_buffer[0] == 0xFF) && ((int) type_buffer[1] == 0xD8)) { 144 | free(type_buffer); 145 | return true; 146 | } else { 147 | fprintf(stderr, "Unsupported file type. Skipping.\n"); 148 | return false; 149 | } 150 | } 151 | 152 | QString msToFormattedString(qint64 ms) { 153 | if (ms < 1000) { 154 | return QString::number(ms) + " ms"; 155 | } else if (ms >= 1000 && ms < 60000) { 156 | return QString::number(((double) ms) / 1000, 'f', 1) + "s"; 157 | } else { 158 | return QString::number(ms / 60000) + ":" 159 | + (ms < 70000 ? "0" : "") + 160 | QString::number(ms / 1000 % 60) + 161 | QT_TRANSLATE_NOOP("Utils"," minutes"); 162 | } 163 | } 164 | 165 | bool haveSameRootFolder(QList items) { 166 | QDir root = QFileInfo(items.at(0)->text(COLUMN_PATH)).dir(); 167 | for (int i = 1; i < items.length(); i++) { 168 | if (QString::compare(QFileInfo(items.at(i)->text(COLUMN_PATH)).dir().absolutePath(), 169 | root.absolutePath(), 170 | Qt::CaseSensitive) != 0) { 171 | return false; 172 | } 173 | } 174 | return true; 175 | } 176 | 177 | QString toCapitalCase(const QString str) { 178 | if (str.size() < 1) { 179 | return ""; 180 | } 181 | 182 | QStringList tokens = str.split(" "); 183 | QList::iterator tokItr = tokens.begin(); 184 | 185 | for (tokItr = tokens.begin(); tokItr != tokens.end(); ++tokItr) { 186 | (*tokItr) = (*tokItr).at(0).toUpper() + (*tokItr).mid(1); 187 | } 188 | 189 | return tokens.join(" "); 190 | } 191 | 192 | void loadLocales() { 193 | locales.insert(0, QLocale::system()); 194 | QString translationPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); 195 | //Iterate trough files and get the language string 196 | QDirIterator it(translationPath, QStringList() << "*.qm"); 197 | while (it.hasNext()) { 198 | it.next(); 199 | locales.append(QLocale(it.fileInfo().baseName().replace("caesiumph_", ""))); 200 | } 201 | qInfo() << "Found locales" << locales; 202 | } 203 | -------------------------------------------------------------------------------- /src/networkoperations.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "networkoperations.h" 25 | #include "utils.h" 26 | 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | NetworkOperations::NetworkOperations(QObject *parent) : QObject(parent) { 34 | releaseURL = "https://github.com/Lymphatus/CaesiumPH/releases/download/v" + 35 | updateVersionTag + "/caesiumph-" + updateVersionTag + 36 | osAndExtension.at(1); 37 | 38 | updatePath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + 39 | "/" + 40 | "cph_u" + 41 | osAndExtension.at(1); 42 | } 43 | 44 | void NetworkOperations::checkForUpdates() { 45 | //Request current build from network 46 | //TODO Rewrite with GitHub API 47 | QNetworkRequest request; 48 | request.setUrl(QUrl("http://download.saerasoft.com/caesiumph/current")); 49 | request.setRawHeader( "User-Agent" , "Mozilla Firefox" ); 50 | updateReply = networkManager->get(request); 51 | connect(updateReply, SIGNAL(readyRead()), this, SLOT(getCurrentBuild())); 52 | } 53 | 54 | void NetworkOperations::getCurrentBuild() { 55 | //Actually gets the build number 56 | if (updateReply->error() == QNetworkReply::NoError) { 57 | int v_number = updateReply->readLine().split('\n').at(0).toInt(); 58 | QString v_string = updateReply->readLine().replace("\n", ""); 59 | 60 | qInfo() << "Latest remote version is" << v_number << v_string; 61 | 62 | //Start reading for checksums 63 | QString line = updateReply->readLine(); 64 | while (!line.isEmpty()) { 65 | //Read the right release checksum 66 | if (line.contains(osAndExtension.at(0))) { 67 | line = line.split(' ').at(1); 68 | updateChecksum = line.replace("\n", ""); 69 | qInfo() << "Remote update checksum is " << updateChecksum; 70 | break; 71 | } 72 | line = updateReply->readLine(); 73 | } 74 | //If the file already exists check it's the correct one 75 | QFile updateFile(updatePath); 76 | qInfo() << updatePath << "exists?" << updateFile.exists(); 77 | if (updateFile.exists()) { 78 | qInfo() << "Already found an update"; 79 | if (updateFile.open(QFile::ReadOnly)) { 80 | QByteArray data = updateFile.readAll(); 81 | qInfo() << "Checking integrity"; 82 | if (compareUpdateChecksums(updateChecksum, &data) != 0) { 83 | qInfo() << "Different checksums"; 84 | emit checkForUpdatesFinished(v_number, 85 | v_string, 86 | updateChecksum); 87 | } else if (v_number > versionNumber){ 88 | qInfo() << "Checksums are equal, skip downloading"; 89 | emit updateDownloadFinished(updatePath); 90 | } 91 | } else { 92 | qCritical() << "Failed to open the already downloaded update"; 93 | } 94 | } else { 95 | qInfo() << "No already downloaded update found. Get it"; 96 | emit checkForUpdatesFinished(v_number, 97 | v_string, 98 | updateChecksum); 99 | } 100 | } else { 101 | qCritical() << "Failed to get latest release build. Error: " << updateReply->errorString(); 102 | } 103 | updateReply->close(); 104 | } 105 | 106 | void NetworkOperations::downloadUpdateRequest(QString checksum) { 107 | updateChecksum = checksum; 108 | //Set the right URL according to OS 109 | QUrl url; 110 | url.setUrl(releaseURL); 111 | 112 | //Build a request and set an header 113 | QNetworkRequest request; 114 | request.setUrl(url); 115 | request.setRawHeader( "User-Agent" , "Mozilla Firefox" ); 116 | 117 | //Get request 118 | downloadUpdateReply = networkManager->get(request); 119 | qInfo() << "Update GET request started"; 120 | 121 | //Connections 122 | connect(downloadUpdateReply, SIGNAL(finished()), this, SLOT(flushUpdate())); 123 | } 124 | 125 | void NetworkOperations::flushUpdate() { 126 | if (downloadUpdateReply->error() == QNetworkReply::NoError) { 127 | //Check if we are being redirected 128 | QVariant variant = downloadUpdateReply->attribute(QNetworkRequest::RedirectionTargetAttribute); 129 | 130 | if (!variant.isNull()) { 131 | //Handle redirection; abort the current operation 132 | downloadUpdateReply->abort(); 133 | //Change the url to the new one 134 | releaseURL = variant.toString(); 135 | //Go again 136 | NetworkOperations::downloadUpdateRequest(updateChecksum); 137 | //Don't forget to return to abort the current function 138 | return; 139 | } 140 | 141 | QFile *file = new QFile(updatePath); 142 | 143 | //Flush the file 144 | if (file->open(QFile::WriteOnly)) { 145 | QByteArray data = downloadUpdateReply->readAll(); 146 | file->write(data); 147 | file->flush(); 148 | qInfo() << "Download finished and flushed"; 149 | if (compareUpdateChecksums(updateChecksum, &data) == 0) { 150 | file->close(); 151 | //Correct checksum 152 | qInfo() << "Correct checksum"; 153 | emit updateDownloadFinished(updatePath); 154 | } else { 155 | //Failure 156 | //By now, retry on the next CaesiumPH start 157 | } 158 | downloadUpdateReply->deleteLater(); 159 | } else { 160 | downloadUpdateReply->deleteLater(); 161 | qCritical() << "Cannot write update to file"; 162 | } 163 | } else if (downloadUpdateReply->error() == QNetworkReply::OperationCanceledError) { 164 | qCritical() << "Update write aborted"; 165 | } 166 | } 167 | 168 | int NetworkOperations::compareUpdateChecksums(QString checksum, QByteArray* file) { 169 | QCryptographicHash hash(QCryptographicHash::Sha256); 170 | hash.addData(*file); 171 | QString downloadedChecksum = hash.result().toHex(); 172 | qInfo() << "Comparing checksums. Original: " << checksum << "\nDownloaded: " << downloadedChecksum; 173 | return QString::compare(downloadedChecksum, checksum); 174 | } 175 | -------------------------------------------------------------------------------- /src/preferencedialog.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * This file is part of CaesiumPH. 4 | * 5 | * CaesiumPH - A Caesium version featuring lossless JPEG optimization/compression 6 | * for photographers and webmasters. 7 | * 8 | * Copyright (C) 2016 - Matteo Paonessa 9 | * 10 | * This program is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. 20 | * If not, see 21 | * 22 | */ 23 | 24 | #include "preferencedialog.h" 25 | #include "ui_preferencedialog.h" 26 | #include "caesiumph.h" 27 | #include "utils.h" 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | PreferenceDialog::PreferenceDialog(QWidget *parent) : 40 | QMainWindow(parent), 41 | ui(new Ui::PreferenceDialog) { 42 | 43 | this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint); 44 | ui->setupUi(this); 45 | QSettings settings; 46 | loadTranslations(); 47 | readPreferences(); 48 | 49 | //If we want a custom folder, show the browse button 50 | ui->browseButton->setVisible(ui->outputFileMethodComboBox->currentIndex() == 2); 51 | 52 | //Override the item delegate for styling QComboBox on OSX 53 | QStyledItemDelegate* itemDelegate = new QStyledItemDelegate(); 54 | ui->languageComboBox->setItemDelegate(itemDelegate); 55 | ui->outputFileMethodComboBox->setItemDelegate(itemDelegate); 56 | 57 | //Initial list state 58 | ui->menuListWidget->setCurrentRow(ui->stackedWidget->currentIndex()); 59 | } 60 | 61 | PreferenceDialog::~PreferenceDialog() { 62 | delete ui; 63 | } 64 | 65 | void PreferenceDialog::closeEvent(QCloseEvent *event) { 66 | writePreferences(); 67 | event->accept(); 68 | } 69 | 70 | void PreferenceDialog::writePreferences() { 71 | //General 72 | settings.beginGroup(KEY_PREF_GROUP_GENERAL); 73 | settings.setValue(KEY_PREF_GENERAL_OVERWRITE, ui->overwriteOriginalCheckBox->isChecked()); 74 | settings.setValue(KEY_PREF_GENERAL_SUBFOLDER, ui->subfoldersCheckBox->isChecked()); 75 | settings.setValue(KEY_PREF_GENERAL_OUTPUT_METHOD, ui->outputFileMethodComboBox->currentIndex()); 76 | settings.setValue(KEY_PREF_GENERAL_OUTPUT_STRING, ui->outputFileMethodLineEdit->text()); 77 | settings.setValue(KEY_PREF_GENERAL_PROMPT, ui->promptExitCheckBox->isChecked()); 78 | settings.setValue(KEY_PREF_GENERAL_LOCALE, ui->languageComboBox->currentIndex()); 79 | settings.endGroup(); 80 | 81 | //Compression 82 | settings.beginGroup(KEY_PREF_GROUP_COMPRESSION); 83 | settings.setValue(KEY_PREF_COMPRESSION_EXIF, ui->exifCheckBox->checkState()); 84 | settings.setValue(KEY_PREF_COMPRESSION_EXIF_COPYRIGHT, ui->keepCopyrightCheckBox->isChecked()); 85 | settings.setValue(KEY_PREF_COMPRESSION_EXIF_DATE, ui->keepDateCheckBox->isChecked()); 86 | settings.setValue(KEY_PREF_COMPRESSION_EXIF_COMMENT, ui->keepCommentsCheckBox->isChecked()); 87 | settings.setValue(KEY_PREF_COMPRESSION_PROGRESSIVE, ui->progressiveCheckBox->isChecked()); 88 | settings.endGroup(); 89 | } 90 | 91 | void PreferenceDialog::readPreferences() { 92 | //General 93 | settings.beginGroup(KEY_PREF_GROUP_GENERAL); 94 | ui->overwriteOriginalCheckBox->setChecked(settings.value(KEY_PREF_GENERAL_OVERWRITE).value()); 95 | ui->subfoldersCheckBox->setChecked(settings.value(KEY_PREF_GENERAL_SUBFOLDER).value()); 96 | ui->outputFileMethodComboBox->setCurrentIndex(settings.value(KEY_PREF_GENERAL_OUTPUT_METHOD).value()); 97 | ui->outputFileMethodLineEdit->setText(settings.value(KEY_PREF_GENERAL_OUTPUT_STRING).value()); 98 | ui->promptExitCheckBox->setChecked(settings.value(KEY_PREF_GENERAL_PROMPT).value()); 99 | ui->languageComboBox->setCurrentIndex(settings.value(KEY_PREF_GENERAL_LOCALE).value()); 100 | settings.endGroup(); 101 | 102 | //Compression 103 | settings.beginGroup(KEY_PREF_GROUP_COMPRESSION); 104 | ui->exifCheckBox->setCheckState(settings.value(KEY_PREF_COMPRESSION_EXIF).value()); 105 | ui->keepCopyrightCheckBox->setChecked(settings.value(KEY_PREF_COMPRESSION_EXIF_COPYRIGHT).value()); 106 | ui->keepDateCheckBox->setChecked(settings.value(KEY_PREF_COMPRESSION_EXIF_DATE).value()); 107 | ui->keepCommentsCheckBox->setChecked(settings.value(KEY_PREF_COMPRESSION_EXIF_COMMENT).value()); 108 | ui->progressiveCheckBox->setChecked(settings.value(KEY_PREF_COMPRESSION_PROGRESSIVE).value()); 109 | settings.endGroup(); 110 | } 111 | 112 | void PreferenceDialog::on_outputFileMethodComboBox_currentIndexChanged(int index) { 113 | ui->outputFileMethodLineEdit->setReadOnly(index == 2); 114 | ui->browseButton->setVisible(index == 2); 115 | switch(index) { 116 | case 0: 117 | ui->outputFileMethodLineEdit->setText(tr("_compressed")); 118 | break; 119 | case 1: 120 | ui->outputFileMethodLineEdit->setText(tr("compressed")); 121 | break; 122 | case 2: 123 | ui->outputFileMethodLineEdit->setText(QStandardPaths::writableLocation(QStandardPaths::PicturesLocation) + 124 | "/CaesiumPH"); 125 | break; 126 | default: 127 | break; 128 | } 129 | } 130 | 131 | void PreferenceDialog::on_browseButton_clicked() { 132 | ui->outputFileMethodLineEdit->setText( 133 | QFileDialog::getExistingDirectory(this, 134 | tr("Select an output folder..."), 135 | QStandardPaths::writableLocation(QStandardPaths::PicturesLocation), 136 | QFileDialog::ShowDirsOnly)); 137 | } 138 | 139 | void PreferenceDialog::on_keepCopyrightCheckBox_toggled(bool checked) { 140 | ui->exifCheckBox->setCheckState(getExifsCheckBoxGroupState()); 141 | } 142 | 143 | void PreferenceDialog::on_keepDateCheckBox_toggled(bool checked) { 144 | ui->exifCheckBox->setCheckState(getExifsCheckBoxGroupState()); 145 | } 146 | 147 | void PreferenceDialog::on_keepCommentsCheckBox_toggled(bool checked) { 148 | ui->exifCheckBox->setCheckState(getExifsCheckBoxGroupState()); 149 | } 150 | 151 | enum Qt::CheckState PreferenceDialog::getExifsCheckBoxGroupState() { 152 | if (ui->keepDateCheckBox->isChecked() && 153 | ui->keepCommentsCheckBox->isChecked() && 154 | ui->keepCopyrightCheckBox->isChecked()) { 155 | //All selected 156 | return Qt::Checked; 157 | } else if (ui->keepDateCheckBox->isChecked() || 158 | ui->keepCommentsCheckBox->isChecked() || 159 | ui->keepCopyrightCheckBox->isChecked()) { 160 | //At least one is selected 161 | return Qt::PartiallyChecked; 162 | } else { 163 | //None is selected 164 | return Qt::Unchecked; 165 | } 166 | } 167 | 168 | void PreferenceDialog::loadTranslations() { 169 | for (int i = 1; i < locales.length(); i++) { 170 | ui->languageComboBox->addItem(toCapitalCase(locales.at(i).nativeLanguageName())); 171 | } 172 | } 173 | 174 | void PreferenceDialog::on_languageComboBox_currentIndexChanged(int index) { 175 | qDebug() << "Writing to settings language" << locales.at(index).name(); 176 | settings.setValue(KEY_PREF_GENERAL_LOCALE_STRING, locales.at(index).name()); 177 | } 178 | 179 | 180 | void PreferenceDialog::on_menuListWidget_currentRowChanged(int currentRow) { 181 | ui->stackedWidget->setCurrentIndex(currentRow); 182 | } 183 | -------------------------------------------------------------------------------- /src/aboutdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | AboutDialog 4 | 5 | 6 | Qt::ApplicationModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 284 13 | 326 14 | 15 | 16 | 17 | 18 | 284 19 | 284 20 | 21 | 22 | 23 | 24 | 16000 25 | 16000 26 | 27 | 28 | 29 | ArrowCursor 30 | 31 | 32 | CaesiumPH 33 | 34 | 35 | 36 | :/logo/icons/logo/logo.png:/logo/icons/logo/logo.png 37 | 38 | 39 | QWidget { 40 | background-color: #FFFFFF; 41 | color: #757575; 42 | } 43 | 44 | QPushButton { 45 | background-color: #1cb495; 46 | color: #FFFFFF; 47 | padding: 5px; 48 | border-radius: 3px; 49 | } 50 | 51 | QPushButton:hover { 52 | background-color: #1ba68a; 53 | color: #FFFFFF; 54 | } 55 | 56 | QDialog { 57 | border: 1px solid #1cb495; 58 | } 59 | 60 | 61 | 62 | 63 | 64 | true 65 | 66 | 67 | 68 | 6 69 | 70 | 71 | 12 72 | 73 | 74 | 6 75 | 76 | 77 | 6 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 100 86 | 100 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 117 96 | 117 97 | 117 98 | 99 | 100 | 101 | 102 | 103 | 104 | 255 105 | 255 106 | 255 107 | 108 | 109 | 110 | 111 | 112 | 113 | 117 114 | 117 115 | 117 116 | 117 | 118 | 119 | 120 | 121 | 122 | 117 123 | 117 124 | 117 125 | 126 | 127 | 128 | 129 | 130 | 131 | 255 132 | 255 133 | 255 134 | 135 | 136 | 137 | 138 | 139 | 140 | 255 141 | 255 142 | 255 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 117 152 | 117 153 | 117 154 | 155 | 156 | 157 | 158 | 159 | 160 | 255 161 | 255 162 | 255 163 | 164 | 165 | 166 | 167 | 168 | 169 | 117 170 | 117 171 | 117 172 | 173 | 174 | 175 | 176 | 177 | 178 | 117 179 | 117 180 | 117 181 | 182 | 183 | 184 | 185 | 186 | 187 | 255 188 | 255 189 | 255 190 | 191 | 192 | 193 | 194 | 195 | 196 | 255 197 | 255 198 | 255 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 117 208 | 117 209 | 117 210 | 211 | 212 | 213 | 214 | 215 | 216 | 255 217 | 255 218 | 255 219 | 220 | 221 | 222 | 223 | 224 | 225 | 117 226 | 117 227 | 117 228 | 229 | 230 | 231 | 232 | 233 | 234 | 117 235 | 117 236 | 117 237 | 238 | 239 | 240 | 241 | 242 | 243 | 255 244 | 255 245 | 255 246 | 247 | 248 | 249 | 250 | 251 | 252 | 255 253 | 255 254 | 255 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | QFrame::NoFrame 263 | 264 | 265 | QFrame::Plain 266 | 267 | 268 | 0 269 | 270 | 271 | Qt::ScrollBarAlwaysOff 272 | 273 | 274 | Qt::ScrollBarAlwaysOff 275 | 276 | 277 | QAbstractScrollArea::AdjustToContents 278 | 279 | 280 | QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 75 289 | true 290 | 291 | 292 | 293 | CaesiumPH 294 | 295 | 296 | Qt::AlignCenter 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 10 305 | 306 | 307 | 308 | Lossless JPEG compression 309 | 310 | 311 | Qt::AlignCenter 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 10 320 | 321 | 322 | 323 | 324 | 325 | 326 | Qt::RichText 327 | 328 | 329 | Qt::AlignCenter 330 | 331 | 332 | 333 | 334 | 335 | 336 | Qt::Vertical 337 | 338 | 339 | 340 | 20 341 | 40 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 10 351 | 352 | 353 | 354 | <html><head/><body><p><a href="http://saerasoft.com/caesium/ph"><span style=" text-decoration: underline; color:#0000ff;">http://saerasoft.com/caesium/ph</span></a></p></body></html> 355 | 356 | 357 | Qt::AlignCenter 358 | 359 | 360 | true 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 10 369 | 370 | 371 | 372 | © 2016 - SaeraSoft and Matteo Paonessa 373 | 374 | 375 | Qt::AlignCenter 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 10 384 | 385 | 386 | 387 | All rights reserved. 388 | 389 | 390 | Qt::AlignCenter 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 10 399 | 400 | 401 | 402 | <html><head/><body><p><a href="http://www.gnu.org/licenses/gpl-3.0.en.html"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 403 | 404 | 405 | Qt::AlignCenter 406 | 407 | 408 | true 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | Qt::Horizontal 418 | 419 | 420 | 421 | 40 422 | 20 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 0 432 | 0 433 | 434 | 435 | 436 | 437 | 80 438 | 0 439 | 440 | 441 | 442 | 443 | 75 444 | true 445 | 446 | 447 | 448 | PointingHandCursor 449 | 450 | 451 | 452 | 453 | 454 | Close 455 | 456 | 457 | true 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | okButton 471 | clicked() 472 | AboutDialog 473 | close() 474 | 475 | 476 | 215 477 | 304 478 | 479 | 480 | 10 481 | 286 482 | 483 | 484 | 485 | 486 | 487 | -------------------------------------------------------------------------------- /translations/caesiumph_en_US.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AboutDialog 6 | 7 | 8 | 9 | CaesiumPH 10 | 11 | 12 | 13 | 14 | Lossless JPEG compression 15 | 16 | 17 | 18 | 19 | © 2016 - SaeraSoft and Matteo Paonessa 20 | 21 | 22 | 23 | 24 | All rights reserved. 25 | 26 | 27 | 28 | 29 | <html><head/><body><p><a href="http://www.gnu.org/licenses/gpl-3.0.en.html"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 30 | 31 | 32 | 33 | 34 | Close 35 | 36 | 37 | 38 | 39 | Version 40 | 41 | 42 | 43 | 44 | CaesiumPH 45 | 46 | 47 | 48 | 49 | CaesiumPH 50 | 51 | 52 | 53 | 54 | Name 55 | 56 | 57 | 58 | 59 | Original Size 60 | 61 | 62 | 63 | 64 | New Size 65 | 66 | 67 | 68 | 69 | Saved 70 | 71 | 72 | 73 | 74 | Full Path 75 | 76 | 77 | 78 | 79 | Add files 80 | 81 | 82 | 83 | 84 | Import folder 85 | 86 | 87 | 88 | 89 | 90 | Compress 91 | 92 | 93 | 94 | 95 | 96 | Remove item 97 | 98 | 99 | 100 | 101 | 102 | 103 | Clear list 104 | 105 | 106 | 107 | 108 | File 109 | 110 | 111 | 112 | 113 | Edit 114 | 115 | 116 | 117 | 118 | Actions 119 | 120 | 121 | 122 | 123 | Help 124 | 125 | 126 | 127 | 128 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 129 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 130 | p, li { white-space: pre-wrap; } 131 | </style></head><body style=" font-family:'Monaco,monospace'; font-size:11px; font-weight:400; font-style:normal;"> 132 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> 133 | 134 | 135 | 136 | 137 | preview 138 | 139 | 140 | 141 | 142 | Add pictures... 143 | 144 | 145 | 146 | 147 | Add folder... 148 | 149 | 150 | 151 | 152 | Quit 153 | 154 | 155 | 156 | 157 | Remove items 158 | 159 | 160 | 161 | 162 | Select all 163 | 164 | 165 | 166 | 167 | About CaesiumPH... 168 | 169 | 170 | 171 | 172 | Save list 173 | 174 | 175 | 176 | 177 | 178 | Save list as... 179 | 180 | 181 | 182 | 183 | Save list as 184 | 185 | 186 | 187 | 188 | Open list... 189 | 190 | 191 | 192 | 193 | 194 | metadata 195 | 196 | 197 | 198 | 199 | A new version is available! 200 | 201 | 202 | 203 | 204 | 205 | Import files... 206 | 207 | 208 | 209 | 210 | Importing... 211 | 212 | 213 | 214 | 215 | Cancel 216 | 217 | 218 | 219 | 220 | 221 | files added to the list 222 | 223 | 224 | 225 | 226 | duplicates found 227 | 228 | 229 | 230 | 231 | Select a folder to import... 232 | 233 | 234 | 235 | 236 | items removed 237 | 238 | 239 | 240 | 241 | 242 | ERROR: could not create output folder. Check user permissions. 243 | 244 | 245 | 246 | 247 | Compressing... 248 | 249 | 250 | 251 | 252 | Compression completed! 253 | 254 | 255 | 256 | 257 | files compressed in 258 | 259 | 260 | 261 | 262 | from 263 | 264 | 265 | 266 | 267 | to 268 | 269 | 270 | 271 | 272 | Saved 273 | 274 | 275 | 276 | 277 | Do you really want to exit? 278 | 279 | 280 | 281 | 282 | Update available 283 | 284 | 285 | 286 | 287 | This will close CaesiumPH. Do you really want to update now? 288 | 289 | 290 | 291 | 292 | files in list 293 | 294 | 295 | 296 | 297 | List cleared 298 | 299 | 300 | 301 | 302 | Remove the item from the list 303 | 304 | 305 | 306 | 307 | Show in folder 308 | 309 | 310 | 311 | 312 | Opens the folder containing the file 313 | 314 | 315 | 316 | 317 | Show destination folder 318 | 319 | 320 | 321 | 322 | Opens the destination folder for the file 323 | 324 | 325 | 326 | 327 | Clears the list 328 | 329 | 330 | 331 | 332 | PreferenceDialog 333 | 334 | 335 | Preferences 336 | 337 | 338 | 339 | 340 | Language 341 | 342 | 343 | 344 | 345 | Overwrite original files 346 | 347 | 348 | 349 | 350 | Leaving empty will overwrite the file 351 | 352 | 353 | 354 | 355 | Custom suffix 356 | 357 | 358 | 359 | 360 | Subfolder 361 | 362 | 363 | 364 | 365 | Custom folder 366 | 367 | 368 | 369 | 370 | -- System language -- 371 | 372 | 373 | 374 | 375 | Prompt before exit 376 | 377 | 378 | 379 | 380 | Walk through subfolders 381 | 382 | 383 | 384 | 385 | Done 386 | 387 | 388 | 389 | 390 | Language will change after restart 391 | 392 | 393 | 394 | 395 | Keep copyright 396 | 397 | 398 | 399 | 400 | Keep date 401 | 402 | 403 | 404 | 405 | Progressive 406 | 407 | 408 | 409 | 410 | Keep comments 411 | 412 | 413 | 414 | 415 | Keep EXIF information 416 | 417 | 418 | 419 | 420 | General 421 | 422 | 423 | 424 | 425 | Compression 426 | 427 | 428 | 429 | 430 | _compressed 431 | 432 | 433 | 434 | 435 | compressed 436 | 437 | 438 | 439 | 440 | Select an output folder... 441 | 442 | 443 | 444 | 445 | QIODevice 446 | 447 | 448 | Image Files 449 | 450 | 451 | 452 | 453 | Utils 454 | 455 | 456 | minutes 457 | 458 | 459 | 460 | 461 | -------------------------------------------------------------------------------- /src/preferencedialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | PreferenceDialog 4 | 5 | 6 | Qt::ApplicationModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 574 13 | 303 14 | 15 | 16 | 17 | Preferences 18 | 19 | 20 | QWidget { 21 | color: #757575; 22 | } 23 | 24 | QListWidget::item { 25 | padding: 3px 0 3px 0; 26 | } 27 | 28 | QListWidget { 29 | padding-top: 16px; 30 | background: #f5f5f5; 31 | } 32 | 33 | QListWidget::item:selected { 34 | background: #ffffff; 35 | color: #757575; 36 | } 37 | 38 | QMainWindow { 39 | border: 1px solid #1cb495; 40 | } 41 | 42 | 43 | 44 | 45 | 46 | true 47 | 48 | 49 | 50 | 51 | 0 52 | 53 | 54 | 0 55 | 56 | 57 | 0 58 | 59 | 60 | 0 61 | 62 | 63 | 4 64 | 65 | 66 | 67 | 68 | 69 | 200 70 | 16777215 71 | 72 | 73 | 74 | Qt::NoFocus 75 | 76 | 77 | border: 1px solid #1cb495; 78 | border-right: none; 79 | 80 | 81 | QFrame::NoFrame 82 | 83 | 84 | QListView::ListMode 85 | 86 | 87 | false 88 | 89 | 90 | 91 | General 92 | 93 | 94 | 95 | :/icons/settings/general.png:/icons/settings/general.png 96 | 97 | 98 | 99 | 100 | Compression 101 | 102 | 103 | 104 | :/icons/settings/compression.png:/icons/settings/compression.png 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 6 113 | 114 | 115 | 8 116 | 117 | 118 | 119 | 120 | Qt::Horizontal 121 | 122 | 123 | 124 | 40 125 | 20 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 80 135 | 0 136 | 137 | 138 | 139 | 140 | 75 141 | true 142 | 143 | 144 | 145 | PointingHandCursor 146 | 147 | 148 | QPushButton { 149 | background-color: #1cb495; 150 | color: #FFFFFF; 151 | padding: 5px; 152 | border-radius: 3px; 153 | margin-right: 10px; 154 | margin-bottom: 10px; 155 | } 156 | 157 | QPushButton:hover { 158 | background-color: #1ba68a; 159 | color: #FFFFFF; 160 | } 161 | 162 | 163 | Done 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 0 173 | 174 | 175 | 6 176 | 177 | 178 | 16 179 | 180 | 181 | 6 182 | 183 | 184 | 185 | 186 | 1 187 | 188 | 189 | 0 190 | 191 | 192 | 0 193 | 194 | 195 | 196 | 197 | 6 198 | 199 | 200 | 0 201 | 202 | 203 | 0 204 | 205 | 206 | 0 207 | 208 | 209 | 0 210 | 211 | 212 | 213 | 214 | QLayout::SetMaximumSize 215 | 216 | 217 | 6 218 | 219 | 220 | 221 | 222 | Qt::Vertical 223 | 224 | 225 | 226 | 20 227 | 40 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | false 236 | 237 | 238 | 239 | 240 | 241 | true 242 | 243 | 244 | 245 | Custom suffix 246 | 247 | 248 | 249 | 250 | Subfolder 251 | 252 | 253 | 254 | 255 | Custom folder 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | false 264 | 265 | 266 | Leaving empty will overwrite the file 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | Walk through subfolders 277 | 278 | 279 | false 280 | 281 | 282 | 283 | 284 | 285 | 286 | ... 287 | 288 | 289 | false 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | -- System language -- 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | Prompt before exit 309 | 310 | 311 | false 312 | 313 | 314 | 315 | 316 | 317 | 318 | Overwrite original files 319 | 320 | 321 | true 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 11 330 | 331 | 332 | 333 | Language will change after restart 334 | 335 | 336 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 0 345 | 0 346 | 347 | 348 | 349 | 350 | 140 351 | 0 352 | 353 | 354 | 355 | Language 356 | 357 | 358 | 359 | 360 | 361 | 362 | Qt::Horizontal 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 0 374 | 375 | 376 | 0 377 | 378 | 379 | 0 380 | 381 | 382 | 0 383 | 384 | 385 | 386 | 387 | QLayout::SetMaximumSize 388 | 389 | 390 | 391 | 392 | Keep copyright 393 | 394 | 395 | 396 | 397 | 398 | 399 | Qt::Horizontal 400 | 401 | 402 | QSizePolicy::Fixed 403 | 404 | 405 | 406 | 15 407 | 5 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | Keep date 416 | 417 | 418 | 419 | 420 | 421 | 422 | Qt::Vertical 423 | 424 | 425 | 426 | 20 427 | 40 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | Qt::Horizontal 436 | 437 | 438 | QSizePolicy::Fixed 439 | 440 | 441 | 442 | 15 443 | 5 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | Progressive 452 | 453 | 454 | true 455 | 456 | 457 | 458 | 459 | 460 | 461 | Keep comments 462 | 463 | 464 | 465 | 466 | 467 | 468 | Keep EXIF information 469 | 470 | 471 | false 472 | 473 | 474 | true 475 | 476 | 477 | 478 | 479 | 480 | 481 | Qt::Horizontal 482 | 483 | 484 | QSizePolicy::Fixed 485 | 486 | 487 | 488 | 15 489 | 5 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | overwriteOriginalCheckBox 511 | toggled(bool) 512 | outputFileMethodComboBox 513 | setDisabled(bool) 514 | 515 | 516 | 105 517 | 94 518 | 519 | 520 | 103 521 | 121 522 | 523 | 524 | 525 | 526 | overwriteOriginalCheckBox 527 | toggled(bool) 528 | outputFileMethodLineEdit 529 | setDisabled(bool) 530 | 531 | 532 | 228 533 | 95 534 | 535 | 536 | 241 537 | 112 538 | 539 | 540 | 541 | 542 | exifCheckBox 543 | clicked(bool) 544 | keepCopyrightCheckBox 545 | setChecked(bool) 546 | 547 | 548 | 106 549 | 86 550 | 551 | 552 | 106 553 | 93 554 | 555 | 556 | 557 | 558 | exifCheckBox 559 | clicked(bool) 560 | keepDateCheckBox 561 | setChecked(bool) 562 | 563 | 564 | 106 565 | 86 566 | 567 | 568 | 106 569 | 99 570 | 571 | 572 | 573 | 574 | exifCheckBox 575 | clicked(bool) 576 | keepCommentsCheckBox 577 | setChecked(bool) 578 | 579 | 580 | 106 581 | 86 582 | 583 | 584 | 106 585 | 106 586 | 587 | 588 | 589 | 590 | okButton 591 | clicked() 592 | PreferenceDialog 593 | close() 594 | 595 | 596 | 401 597 | 295 598 | 599 | 600 | 282 601 | 277 602 | 603 | 604 | 605 | 606 | 607 | -------------------------------------------------------------------------------- /translations/caesiumph_zh_CN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AboutDialog 6 | 7 | 8 | 9 | CaesiumPH 10 | CaesiumPH 11 | 12 | 13 | 14 | Lossless JPEG compression 15 | 无损 JPEG 压缩 16 | 17 | 18 | 19 | © 2016 - SaeraSoft and Matteo Paonessa 20 | © 2016 - SaeraSoft 和 Matteo Paonessa 21 | 22 | 23 | 24 | All rights reserved. 25 | 保留所有权利。 26 | 27 | 28 | 29 | <html><head/><body><p><a href="http://www.gnu.org/licenses/gpl-3.0.en.html"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 30 | 31 | 32 | 33 | <html><head/><body><p><a href="http://saerasoft.com/caesium"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 34 | <html><head/><body><p><a href="http://saerasoft.com/caesium"><span style=" text-decoration: underline; color:#0000ff;">许可协议</span></a></p></body></html> 35 | 36 | 37 | 38 | Close 39 | 40 | 41 | 42 | 43 | Version 44 | 版本 45 | 46 | 47 | 48 | CaesiumPH 49 | 50 | 51 | 52 | 53 | CaesiumPH 54 | CaesiumPH 55 | 56 | 57 | 58 | Name 59 | 名称 60 | 61 | 62 | 63 | Original Size 64 | 原大小 65 | 66 | 67 | 68 | New Size 69 | 新大小 70 | 71 | 72 | 73 | Saved 74 | 已节约 75 | 76 | 77 | 78 | Full Path 79 | 完整路径 80 | 81 | 82 | 83 | Add files 84 | 添加文件 85 | 86 | 87 | 88 | Import folder 89 | 导入文件夹 90 | 91 | 92 | 93 | 94 | Compress 95 | 压缩 96 | 97 | 98 | 99 | 100 | Remove item 101 | 移除文件 102 | 103 | 104 | 105 | 106 | 107 | Clear list 108 | 清空列表 109 | 110 | 111 | 112 | File 113 | 文件 114 | 115 | 116 | 117 | Edit 118 | 编辑 119 | 120 | 121 | 122 | Actions 123 | 操作 124 | 125 | 126 | 127 | Help 128 | 帮助 129 | 130 | 131 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 132 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 133 | p, li { white-space: pre-wrap; } 134 | </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> 135 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">No EXIF info available</span></p></body></html> 136 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 137 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 138 | p, li { white-space: pre-wrap; } 139 | </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> 140 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">无 EXIF 信息可用</span></p></body></html> 141 | 142 | 143 | 144 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 145 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 146 | p, li { white-space: pre-wrap; } 147 | </style></head><body style=" font-family:'Monaco,monospace'; font-size:11px; font-weight:400; font-style:normal;"> 148 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> 149 | 150 | 151 | 152 | 153 | preview 154 | 155 | 156 | 157 | 158 | Add pictures... 159 | 添加图片... 160 | 161 | 162 | 163 | Add folder... 164 | 添加文件夹... 165 | 166 | 167 | 168 | Quit 169 | 退出 170 | 171 | 172 | 173 | Remove items 174 | 移除项目 175 | 176 | 177 | 178 | Select all 179 | 全选 180 | 181 | 182 | 183 | About CaesiumPH... 184 | 关于 CaesiumPH... 185 | 186 | 187 | 188 | Save list 189 | 保存列表 190 | 191 | 192 | 193 | 194 | Save list as... 195 | 列表另存为... 196 | 197 | 198 | 199 | Save list as 200 | 列表另存为 201 | 202 | 203 | 204 | Open list... 205 | 打开列表... 206 | 207 | 208 | No EXIF info available 209 | 无 EXIF 信息可用 210 | 211 | 212 | 213 | 214 | metadata 215 | 216 | 217 | 218 | 219 | A new version is available! 220 | 有新版本可用! 221 | 222 | 223 | 224 | 225 | Import files... 226 | 导入文件... 227 | 228 | 229 | 230 | Importing... 231 | 正在导入... 232 | 233 | 234 | 235 | Cancel 236 | 取消 237 | 238 | 239 | 240 | 241 | files added to the list 242 | 个文件已添加到列表 243 | 244 | 245 | 246 | duplicates found 247 | 项重复 248 | 249 | 250 | 251 | Select a folder to import... 252 | 选择一个文件夹以导入... 253 | 254 | 255 | 256 | items removed 257 | 项已移除 258 | 259 | 260 | 261 | 262 | ERROR: could not create output folder. Check user permissions. 263 | 264 | 265 | 266 | 267 | Compressing... 268 | 正在压缩... 269 | 270 | 271 | 272 | Compression completed! 273 | 压缩已完成! 274 | 275 | 276 | 277 | files compressed in 278 | 个文件已压缩,用时 279 | 280 | 281 | 282 | from 283 | 284 | 285 | 286 | 287 | to 288 | 变为 289 | 290 | 291 | 292 | Saved 293 | 节约 294 | 295 | 296 | 297 | Do you really want to exit? 298 | 确定退出? 299 | 300 | 301 | 302 | Update available 303 | 有更新可用 304 | 305 | 306 | 307 | This will close CaesiumPH. Do you really want to update now? 308 | 这将关闭 CaesiumPH。您确定要立即更新? 309 | 310 | 311 | 312 | files in list 313 | 个文件已列出 314 | 315 | 316 | 317 | List cleared 318 | 列表已清空 319 | 320 | 321 | 322 | Remove the item from the list 323 | 在列表中移除该文件 324 | 325 | 326 | 327 | Show in folder 328 | 在文件夹中显示 329 | 330 | 331 | 332 | Opens the folder containing the file 333 | 打开文件所在文件夹 334 | 335 | 336 | 337 | Show destination folder 338 | 显示目标文件夹 339 | 340 | 341 | 342 | Opens the destination folder for the file 343 | 打开该文件的目标文件夹 344 | 345 | 346 | 347 | Clears the list 348 | 清空列表 349 | 350 | 351 | 352 | PreferenceDialog 353 | 354 | 355 | Preferences 356 | 选项 357 | 358 | 359 | 360 | Language 361 | 语言 362 | 363 | 364 | 365 | Overwrite original files 366 | 覆盖原文件 367 | 368 | 369 | 370 | Leaving empty will overwrite the file 371 | 留空将覆盖文件 372 | 373 | 374 | 375 | Custom suffix 376 | 自定义后缀 377 | 378 | 379 | 380 | Subfolder 381 | 子文件夹 382 | 383 | 384 | 385 | Custom folder 386 | 自定义文件夹 387 | 388 | 389 | 390 | -- System language -- 391 | -- 系统语言 -- 392 | 393 | 394 | 395 | Prompt before exit 396 | 退出前提示 397 | 398 | 399 | 400 | Walk through subfolders 401 | 流经子文件夹 402 | 403 | 404 | 405 | Done 406 | 407 | 408 | 409 | 410 | Language will change after restart 411 | 语言将在软件重启后生效 412 | 413 | 414 | 415 | Keep copyright 416 | 保留版权 417 | 418 | 419 | 420 | Keep date 421 | 保留日期 422 | 423 | 424 | 425 | Progressive 426 | 渐进式 (交错化) 427 | 428 | 429 | 430 | Keep comments 431 | 保留注解 432 | 433 | 434 | 435 | Keep EXIF information 436 | 保留 EXIF 信息 437 | 438 | 439 | Send anonymous usage information 440 | 发送匿名使用统计 441 | 442 | 443 | See info... 444 | 查看信息... 445 | 446 | 447 | Not yet implemented 448 | 尚未实现 449 | 450 | 451 | 452 | General 453 | 常规 454 | 455 | 456 | 457 | Compression 458 | 压缩 459 | 460 | 461 | Privacy 462 | 隐私 463 | 464 | 465 | This data will help improve this application and won't be shared with anyone. 466 | 此数据将帮助改善此软件,并且不会与其他人共享。 467 | 468 | 469 | 470 | _compressed 471 | _压缩 472 | 473 | 474 | 475 | compressed 476 | 压缩 477 | 478 | 479 | 480 | Select an output folder... 481 | 选择一个目标文件夹... 482 | 483 | 484 | 485 | QIODevice 486 | 487 | 488 | Image Files 489 | 图片文件 490 | 491 | 492 | 493 | Utils 494 | 495 | 496 | minutes 497 | 分钟 498 | 499 | 500 | 501 | -------------------------------------------------------------------------------- /translations/caesiumph_ja_JP.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AboutDialog 6 | 7 | 8 | 9 | CaesiumPH 10 | CaesiumPH 11 | 12 | 13 | 14 | Lossless JPEG compression 15 | ロスレスJPEG 圧縮 16 | 17 | 18 | 19 | © 2016 - SaeraSoft and Matteo Paonessa 20 | © 2016 - SaeraSoft and Matteo Paonessa 21 | 22 | 23 | 24 | All rights reserved. 25 | All rights reserved. 26 | 27 | 28 | 29 | <html><head/><body><p><a href="http://www.gnu.org/licenses/gpl-3.0.en.html"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 30 | 31 | 32 | 33 | 34 | Close 35 | 閉じる 36 | 37 | 38 | <html><head/><body><p><a href="http://saerasoft.com/caesium"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 39 | <html><head/><body><p><a href="http://saerasoft.com/caesium"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 40 | 41 | 42 | 43 | Version 44 | バージョン 45 | 46 | 47 | 48 | CaesiumPH 49 | 50 | 51 | 52 | 53 | CaesiumPH 54 | CaesiumPH 55 | 56 | 57 | 58 | Name 59 | 名前 60 | 61 | 62 | 63 | Original Size 64 | 元のサイズ 65 | 66 | 67 | 68 | New Size 69 | 新たなサイズ 70 | 71 | 72 | 73 | Saved 74 | 減少率 75 | 76 | 77 | 78 | Full Path 79 | フルパス 80 | 81 | 82 | 83 | Add files 84 | ファイルを追加(&A) 85 | 86 | 87 | 88 | Import folder 89 | フォルダをインポート(&I) 90 | 91 | 92 | 93 | 94 | Compress 95 | 圧縮(&C) 96 | 97 | 98 | 99 | 100 | Remove item 101 | 項目を除去(&R) 102 | 103 | 104 | 105 | 106 | 107 | Clear list 108 | リストをクリア(&C) 109 | 110 | 111 | 112 | File 113 | ファイル(&F) 114 | 115 | 116 | 117 | Edit 118 | 編集(&E) 119 | 120 | 121 | 122 | Actions 123 | 操作(&A) 124 | 125 | 126 | 127 | Help 128 | ヘルプ(&H) 129 | 130 | 131 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 132 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 133 | p, li { white-space: pre-wrap; } 134 | </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> 135 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">No EXIF info available</span></p></body></html> 136 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 137 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 138 | p, li { white-space: pre-wrap; } 139 | </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> 140 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">No EXIF info available</span></p></body></html> 141 | 142 | 143 | 144 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 145 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 146 | p, li { white-space: pre-wrap; } 147 | </style></head><body style=" font-family:'Monaco,monospace'; font-size:11px; font-weight:400; font-style:normal;"> 148 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> 149 | 150 | 151 | 152 | 153 | Add pictures... 154 | ピクチャを追加(&P)... 155 | 156 | 157 | 158 | Add folder... 159 | フォルダを追加(&F)... 160 | 161 | 162 | 163 | Quit 164 | 終了(&X) 165 | 166 | 167 | 168 | Remove items 169 | 項目を除去(&R) 170 | 171 | 172 | 173 | Select all 174 | すべて選択(&S) 175 | 176 | 177 | 178 | About CaesiumPH... 179 | CaesiumPH について(&A)... 180 | 181 | 182 | 183 | Save list 184 | リストを保存(&S) 185 | 186 | 187 | 188 | 189 | Save list as... 190 | リストを別名で保存(&A)... 191 | 192 | 193 | 194 | Save list as 195 | リストを別名保存(&A) 196 | 197 | 198 | 199 | Open list... 200 | リストを開く(&O)... 201 | 202 | 203 | No EXIF info available 204 | 利用可能な EXIF 情報はありません 205 | 206 | 207 | 208 | 209 | metadata 210 | メタデータ 211 | 212 | 213 | 214 | A new version is available! 215 | 新しいバージョンが利用できます! 216 | 217 | 218 | 219 | 220 | Import files... 221 | ファイルをインポート... 222 | 223 | 224 | 225 | Importing... 226 | インポート中... 227 | 228 | 229 | 230 | Cancel 231 | キャンセル 232 | 233 | 234 | 235 | 236 | files added to the list 237 | ファイルをリストに追加 238 | 239 | 240 | 241 | duplicates found 242 | 重複を検出 243 | 244 | 245 | 246 | Select a folder to import... 247 | フォルダを選択してインポート... 248 | 249 | 250 | 251 | items removed 252 | 項目を除去 253 | 254 | 255 | 256 | 257 | ERROR: could not create output folder. Check user permissions. 258 | エラー: 出力フォルダを作成できません、権限を確認してください 259 | 260 | 261 | 262 | Compressing... 263 | 圧縮しています... 264 | 265 | 266 | 267 | Compression completed! 268 | 圧縮完了! 269 | 270 | 271 | 272 | files compressed in 273 | 個を処理 274 | 275 | 276 | 277 | from 278 | - 279 | 280 | 281 | 282 | to 283 | -> 284 | 285 | 286 | 287 | Saved 288 | 減少 : 289 | 290 | 291 | 292 | Do you really want to exit? 293 | 本当に終了しますか? 294 | 295 | 296 | 297 | Update available 298 | アップデートが利用可能 299 | 300 | 301 | 302 | This will close CaesiumPH. Do you really want to update now? 303 | CaesiumPH を閉じる必要がありますが、今すぐ更新しますか? 304 | 305 | 306 | 307 | preview 308 | プレビュー 309 | 310 | 311 | 312 | files in list 313 | 個のファイル 314 | 315 | 316 | 317 | List cleared 318 | リストをクリア 319 | 320 | 321 | 322 | Remove the item from the list 323 | リストから項目を除去 324 | 325 | 326 | 327 | Show in folder 328 | ファイルの場所を開く(&S) 329 | 330 | 331 | 332 | Opens the folder containing the file 333 | ファイルが含まれるフォルダを開く 334 | 335 | 336 | 337 | Show destination folder 338 | 保存先フォルダを開く(&D) 339 | 340 | 341 | 342 | Opens the destination folder for the file 343 | ファイルの保存先フォルダを開く 344 | 345 | 346 | 347 | Clears the list 348 | リストをクリア 349 | 350 | 351 | 352 | PreferenceDialog 353 | 354 | 355 | Preferences 356 | 環境設定 357 | 358 | 359 | 360 | Language 361 | 言語 362 | 363 | 364 | 365 | Overwrite original files 366 | 元ファイルに上書き 367 | 368 | 369 | 370 | Leaving empty will overwrite the file 371 | 空白にするとファイルは上書きされます 372 | 373 | 374 | 375 | Custom suffix 376 | 接尾語を指定 377 | 378 | 379 | 380 | Subfolder 381 | サブフォルダを作成 382 | 383 | 384 | 385 | Custom folder 386 | カスタム フォルダ 387 | 388 | 389 | 390 | -- System language -- 391 | -- システム言語 -- 392 | 393 | 394 | 395 | Prompt before exit 396 | 終了前に確認する 397 | 398 | 399 | 400 | Walk through subfolders 401 | サブフォルダをスルー 402 | 403 | 404 | 405 | Done 406 | 完了 407 | 408 | 409 | 410 | Language will change after restart 411 | 言語の変更は再起動後に適用されます 412 | 413 | 414 | 415 | Keep copyright 416 | 著作権を保持 417 | 418 | 419 | 420 | Keep date 421 | 日付を保持 422 | 423 | 424 | 425 | Progressive 426 | プログレッシブ 427 | 428 | 429 | 430 | Keep comments 431 | コメントを保持 432 | 433 | 434 | 435 | Keep EXIF information 436 | EXIF 情報を保持 437 | 438 | 439 | Send anonymous usage information 440 | 匿名で使用状況を送る 441 | 442 | 443 | See info... 444 | 情報を確認... 445 | 446 | 447 | Not yet implemented 448 | 実装されていません 449 | 450 | 451 | 452 | General 453 | 一般 454 | 455 | 456 | 457 | Compression 458 | 圧縮 459 | 460 | 461 | Privacy 462 | プライバシー 463 | 464 | 465 | This data will help improve this application and won't be shared with anyone. 466 | このデータはアプリケーションの向上にのみ利用され、第三者と共有されるようなことはありません。 467 | 468 | 469 | 470 | _compressed 471 | _圧縮済 472 | 473 | 474 | 475 | compressed 476 | 圧縮済 477 | 478 | 479 | 480 | Select an output folder... 481 | 出力先フォルダを選択... 482 | 483 | 484 | 485 | QIODevice 486 | 487 | 488 | Image Files 489 | イメージ ファイル 490 | 491 | 492 | 493 | Utils 494 | 495 | 496 | minutes 497 | 498 | 499 | 500 | 501 | -------------------------------------------------------------------------------- /translations/caesiumph_it_IT.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AboutDialog 6 | 7 | 8 | 9 | CaesiumPH 10 | CaesiumPH 11 | 12 | 13 | 14 | Lossless JPEG compression 15 | Compressione JPEG senza perdita di qualità 16 | 17 | 18 | 19 | © 2016 - SaeraSoft and Matteo Paonessa 20 | © 2016 - SaeraSoft e Matteo Paonessa 21 | 22 | 23 | 24 | All rights reserved. 25 | Tutti i diritti riservati. 26 | 27 | 28 | 29 | <html><head/><body><p><a href="http://www.gnu.org/licenses/gpl-3.0.en.html"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 30 | <html><head/><body><p><a href="http://www.gnu.org/licenses/gpl-3.0.en.html"><span style=" text-decoration: underline; color:#0000ff;">Licenza</span></a></p></body></html> 31 | 32 | 33 | <html><head/><body><p><a href="http://saerasoft.com/caesium"><span style=" text-decoration: underline; color:#0000ff;">License</span></a></p></body></html> 34 | <html><head/><body><p><a href="http://saerasoft.com/caesium"><span style=" text-decoration: underline; color:#0000ff;">Licenza d'uso</span></a></p></body></html> 35 | 36 | 37 | 38 | Close 39 | Chiudi 40 | 41 | 42 | 43 | Version 44 | Versione 45 | 46 | 47 | 48 | CaesiumPH 49 | 50 | 51 | 52 | 53 | CaesiumPH 54 | CaesiumPH 55 | 56 | 57 | 58 | Name 59 | Nome 60 | 61 | 62 | 63 | Original Size 64 | Dimensione originale 65 | 66 | 67 | 68 | New Size 69 | Nuova dimensione 70 | 71 | 72 | 73 | Saved 74 | Risparmio 75 | 76 | 77 | 78 | Full Path 79 | Percorso 80 | 81 | 82 | 83 | Add files 84 | Aggiungi files 85 | 86 | 87 | 88 | Import folder 89 | Importa cartella 90 | 91 | 92 | 93 | 94 | Compress 95 | Comprimi 96 | 97 | 98 | 99 | 100 | Remove item 101 | Rimuovi 102 | 103 | 104 | 105 | 106 | 107 | Clear list 108 | Pulisci lista 109 | 110 | 111 | 112 | File 113 | File 114 | 115 | 116 | 117 | Edit 118 | Modifica 119 | 120 | 121 | 122 | Actions 123 | Azioni 124 | 125 | 126 | 127 | Help 128 | Aiuto 129 | 130 | 131 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 132 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 133 | p, li { white-space: pre-wrap; } 134 | </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> 135 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">No EXIF info available</span></p></body></html> 136 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 137 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 138 | p, li { white-space: pre-wrap; } 139 | </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> 140 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">Nessun EXIF trovato</span></p></body></html> 141 | 142 | 143 | 144 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 145 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 146 | p, li { white-space: pre-wrap; } 147 | </style></head><body style=" font-family:'Monaco,monospace'; font-size:11px; font-weight:400; font-style:normal;"> 148 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> 149 | 150 | 151 | 152 | 153 | preview 154 | anteprima 155 | 156 | 157 | 158 | Add pictures... 159 | Aggiungi immagini... 160 | 161 | 162 | 163 | Add folder... 164 | Apri cartella... 165 | 166 | 167 | 168 | Quit 169 | Esci 170 | 171 | 172 | 173 | Remove items 174 | Rimuovi elementi 175 | 176 | 177 | 178 | Select all 179 | Seleziona tutti 180 | 181 | 182 | 183 | About CaesiumPH... 184 | Informazioni su CaesiumPH... 185 | 186 | 187 | 188 | Save list 189 | Salva lista 190 | 191 | 192 | 193 | 194 | Save list as... 195 | Salva lista come... 196 | 197 | 198 | 199 | Save list as 200 | Salva lista come 201 | 202 | 203 | 204 | Open list... 205 | Apri lista... 206 | 207 | 208 | No EXIF info available 209 | Nessun EXIF trovato 210 | 211 | 212 | 213 | 214 | metadata 215 | metadata 216 | 217 | 218 | 219 | A new version is available! 220 | Una nuova versione è disponibile! 221 | 222 | 223 | 224 | 225 | Import files... 226 | Aggiungi files... 227 | 228 | 229 | 230 | Importing... 231 | Importazione... 232 | 233 | 234 | 235 | Cancel 236 | Annulla 237 | 238 | 239 | 240 | 241 | files added to the list 242 | files aggiunti alla lista 243 | 244 | 245 | 246 | duplicates found 247 | duplicati trovati 248 | 249 | 250 | 251 | Select a folder to import... 252 | Seleziona una cartella da importare... 253 | 254 | 255 | 256 | items removed 257 | elementi rimossi 258 | 259 | 260 | 261 | 262 | ERROR: could not create output folder. Check user permissions. 263 | ERRORE: impossibile creare la cartella di output. Controlla i permessi. 264 | 265 | 266 | 267 | Compressing... 268 | Compressione... 269 | 270 | 271 | 272 | Compression completed! 273 | Compressione completata! 274 | 275 | 276 | 277 | files compressed in 278 | files compressi in 279 | 280 | 281 | 282 | from 283 | da 284 | 285 | 286 | 287 | to 288 | a 289 | 290 | 291 | 292 | Saved 293 | Risparmiati 294 | 295 | 296 | 297 | Do you really want to exit? 298 | Sei sicuro di voler uscire? 299 | 300 | 301 | 302 | Update available 303 | Aggiornamento disponibile 304 | 305 | 306 | 307 | This will close CaesiumPH. Do you really want to update now? 308 | Per aggiornare devi chiudere CaesiumPH. Vuoi farlo ora? 309 | 310 | 311 | 312 | files in list 313 | files nella lista 314 | 315 | 316 | 317 | List cleared 318 | Lista svuotata 319 | 320 | 321 | 322 | Remove the item from the list 323 | Rimuovi l'elemento dalla lista 324 | 325 | 326 | 327 | Show in folder 328 | Mostra nella cartella 329 | 330 | 331 | 332 | Opens the folder containing the file 333 | Apre la cartella che contiene il file 334 | 335 | 336 | 337 | Show destination folder 338 | Mostra destinazione 339 | 340 | 341 | 342 | Opens the destination folder for the file 343 | Apre la cartella di destinazione del file 344 | 345 | 346 | 347 | Clears the list 348 | Pulisce la lista 349 | 350 | 351 | 352 | PreferenceDialog 353 | 354 | 355 | Preferences 356 | Impostazioni 357 | 358 | 359 | 360 | Language 361 | Lingua 362 | 363 | 364 | 365 | Overwrite original files 366 | Sovrascrivi i file originali 367 | 368 | 369 | 370 | Leaving empty will overwrite the file 371 | Lasciare vuoto sovrascriverà i file 372 | 373 | 374 | 375 | Custom suffix 376 | Suffisso 377 | 378 | 379 | 380 | Subfolder 381 | Sottocartella 382 | 383 | 384 | 385 | Custom folder 386 | Cartella 387 | 388 | 389 | 390 | -- System language -- 391 | -- Lingua di sistema -- 392 | 393 | 394 | 395 | Prompt before exit 396 | Chiedi prima di uscire 397 | 398 | 399 | 400 | Walk through subfolders 401 | Apri anche le sottocartelle 402 | 403 | 404 | 405 | Done 406 | Fine 407 | 408 | 409 | 410 | Language will change after restart 411 | La lingua cambierà dopo il riavvio 412 | 413 | 414 | 415 | Keep copyright 416 | Mantieni copyright 417 | 418 | 419 | 420 | Keep date 421 | Mantieni la data 422 | 423 | 424 | 425 | Progressive 426 | Progressivo 427 | 428 | 429 | 430 | Keep comments 431 | Mantieni commenti 432 | 433 | 434 | 435 | Keep EXIF information 436 | Mantieni EXIF 437 | 438 | 439 | Send anonymous usage information 440 | Manda report anonimi sull'uso 441 | 442 | 443 | See info... 444 | Vedi le informazioni... 445 | 446 | 447 | Not yet implemented 448 | Non ancora implementato 449 | 450 | 451 | toolBar 452 | barraDegliStrumenti 453 | 454 | 455 | 456 | General 457 | Generale 458 | 459 | 460 | 461 | Compression 462 | Compressione 463 | 464 | 465 | Privacy 466 | Privacy 467 | 468 | 469 | This data will help improve this application and won't be shared with anyone. 470 | Questi dati aiuteranno a migliorare l'applicazione e non saranno condivisi con nessuno. 471 | 472 | 473 | 474 | _compressed 475 | _compressa 476 | 477 | 478 | 479 | compressed 480 | compresse 481 | 482 | 483 | 484 | Select an output folder... 485 | Seleziona una cartella di destinazione... 486 | 487 | 488 | 489 | QIODevice 490 | 491 | 492 | Image Files 493 | File immagine 494 | 495 | 496 | 497 | Utils 498 | 499 | 500 | minutes 501 | minuti 502 | 503 | 504 | 505 | --------------------------------------------------------------------------------