Skip to content

Commit 19754f8

Browse files
committed
4.15.2: patchs by @zvezdochiot
1 parent 5d968fc commit 19754f8

30 files changed

+1845
-522
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
`Origin :`
12
![License](https://img.shields.io/github/license/ksharindam/photoquick)
23
![Release](https://img.shields.io/github/v/release/ksharindam/photoquick)
34
![Release Date](https://img.shields.io/github/release-date/ksharindam/photoquick)
45
![Downloads Total](https://img.shields.io/github/downloads/ksharindam/photoquick/total)
5-
![Downloads Latest](https://img.shields.io/github/downloads/ksharindam/photoquick/latest/total)
6+
![Downloads Latest](https://img.shields.io/github/downloads/ksharindam/photoquick/latest/total)
7+
`ORG.IPEP:`
8+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/ImageProcessing-ElectronicPublications/photoquick)
9+
![GitHub Release Date](https://img.shields.io/github/release-date/ImageProcessing-ElectronicPublications/photoquick)
10+
![GitHub repo size](https://img.shields.io/github/repo-size/ImageProcessing-ElectronicPublications/photoquick)
11+
![GitHub all releases](https://img.shields.io/github/downloads/ImageProcessing-ElectronicPublications/photoquick/total)
12+
![GitHub](https://img.shields.io/github/license/ImageProcessing-ElectronicPublications/photoquick)
613

714
# PhotoQuick (for Linux and Windows)
815
A simple handy image viewer and editor with some useful features (Qt based).
@@ -113,3 +120,6 @@ Photo-Grid
113120
Scissor Tool
114121
![Scissor Tool](data/screenshots/Screenshot3.jpg)
115122

123+
### Examples
124+
125+
See [examples](https://github.com/ImageProcessing-ElectronicPublications/photoquick-examples).

data/menu/photoquick

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
?package(photoquick):needs="x11" \
2+
section="Applications/Graphics" \
3+
title="PhotoQuick" \
4+
longtitle="A simple handy image viewer and editor with some useful features" \
5+
icon="/usr/share/pixmaps/photoquick.xpm" \
6+
command="/usr/bin/photoquick"

data/menu/photoquick.xpm

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/* XPM */
2+
static char *photoquick2[] = {
3+
/* columns rows colors chars-per-pixel */
4+
"96 96 8 1 ",
5+
" c black",
6+
". c #FF7053",
7+
"X c #008B00",
8+
"o c orange",
9+
"O c yellow",
10+
"+ c blue",
11+
"@ c #96E9FF",
12+
"# c None",
13+
/* pixels */
14+
"################################################################################################",
15+
"################################################################################################",
16+
"################################################################################################",
17+
"################################################################################################",
18+
"################################################################################################",
19+
"################################################################################################",
20+
" ",
21+
" ",
22+
" ",
23+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
24+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
25+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
26+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
27+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
28+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
29+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
30+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
31+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
32+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
33+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
34+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
35+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
36+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
37+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
38+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
39+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
40+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
41+
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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OXXXXXXXXXXXXXXXOOOOOOXXXXXXOOOOOOOOOXXXXXXOOOXXXXXXXXXOOOXXXXXXXXXOOOXXXOOOXXXX ",
86+
" ",
87+
" ",
88+
" ",
89+
"################################################################################################",
90+
"################################################################################################",
91+
"################################################################################################",
92+
"################################################################################################",
93+
"################################################################################################",
94+
"################################################################################################",
95+
"################################################################################################",
96+
"################################################################################################",
97+
"################################################################################################",
98+
"################################################################################################",
99+
"################################################################################################",
100+
"################################################################################################",
101+
"################################################################################################",
102+
"################################################################################################",
103+
"################################################################################################",
104+
"################################################################################################",
105+
"################################################################################################",
106+
"################################################################################################",
107+
"################################################################################################",
108+
"################################################################################################",
109+
"################################################################################################"
110+
};

data/photoquick.desktop

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
[Desktop Entry]
22
Version=1.0
33
Type=Application
4+
Encoding=UTF-8
45
Name=PhotoQuick
6+
Comment=A simple handy image viewer and editor with some useful features
57
Icon=photoquick
68
Exec=photoquick %f
7-
Categories=Graphics;
8-
StartupNotify=false
9+
Categories=Graphics;2DGraphics;RasterGraphics;Qt;
910
Terminal=false
11+
StartupNotify=false

src/canvas.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
/* This file is a part of photoquick program, which is GPLv3 licensed */
22

33
#include "canvas.h"
4-
#include <QDebug>
5-
#include <QSizePolicy>
6-
#include <QTransform>
7-
#include <QPainter>
8-
#include <cmath>
9-
104

115
Canvas:: Canvas(QScrollArea *scrollArea, ImageData *img_dat) : QLabel(scrollArea)
126
{

src/canvas.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
#pragma once
22
/* Image Label Object to display the image. */
3-
#include "plugin.h"
43
#include <QLabel>
54
#include <QMovie>
65
#include <QMouseEvent>
76
#include <QScrollArea>
87
#include <QScrollBar>
98
#include <QCursor>
9+
#include <QDebug>
10+
#include <QSizePolicy>
11+
#include <QTransform>
12+
#include <QPainter>
13+
#include <cmath>
14+
#include "plugin.h"
1015

16+
#ifndef __PHOTOQUICK_CANVAS
17+
#define __PHOTOQUICK_CANVAS
1118

1219
//This is the widget responsible for displaying image
1320
class Canvas : public QLabel
@@ -46,7 +53,6 @@ public slots:
4653
void imageUpdated();
4754
};
4855

49-
5056
// It is a drawing area for some dialogs
5157

5258
class PaintCanvas : public QLabel
@@ -72,3 +78,5 @@ typedef struct {
7278
int y;
7379
QImage image;// this image is replaced by new image at pos (x,y)
7480
} HistoryItem;
81+
82+
#endif /* __PHOTOQUICK_CANVAS */

src/common.cpp

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
/* This file is a part of photoquick program, which is GPLv3 licensed */
22

33
#include "common.h"
4-
#include <QTimer>
5-
#include <QEventLoop>
6-
#include <QFile>
7-
#include <QBuffer>
8-
#include <QTransform>
9-
#include <QIcon>
10-
#include <QImageReader>
11-
#include <QPainter>
12-
#include <QDesktopServices>
13-
#include <cmath>
14-
#include <unistd.h> // dup()
15-
16-
174

185
void fitToSize(int W, int H, int max_w, int max_h, int &out_w, int &out_h)
196
{
@@ -254,3 +241,9 @@ void debug(const char *format, ...)
254241
#else
255242
void debug(const char *, ...) {/* do nothing*/}
256243
#endif
244+
245+
int SelectChannelPixel(QRgb pix, int channel)
246+
{
247+
int value[5] = {qRed(pix), qGreen(pix), qBlue(pix), qAlpha(pix), 0};
248+
return value[channel];
249+
}

src/common.h

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,36 @@
22
#include <QImage>
33
#include <QSystemTrayIcon>
44
#include <QDebug>
5+
#include <QTimer>
6+
#include <QEventLoop>
7+
#include <QFile>
8+
#include <QBuffer>
9+
#include <QTransform>
10+
#include <QIcon>
11+
#include <QImageReader>
12+
#include <QPainter>
13+
#include <QDesktopServices>
14+
#include <cmath>
15+
#include <unistd.h> // dup()
516
#include "exif.h"
617

18+
#ifndef __PHOTOQUICK_COMMON
19+
#define __PHOTOQUICK_COMMON
20+
721
#define PROG_NAME "PhotoQuick"
822
#define PROG_VERSION "4.15.2"
923
#define COPYRIGHT_YEAR "2017-2021"
1024
#define AUTHOR_NAME "Arindam Chaudhuri"
1125
#define AUTHOR_EMAIL "ksharindam@gmail.com"
1226
#define PROJ_RELEASE "https://github.com/ksharindam/photoquick/releases"
1327

28+
// check if armhf architecture, if not then it is assumed to be x86
29+
#ifdef __arm__
30+
#define ARCH "armhf"
31+
//#elif __x86_64__
32+
#else
33+
#define ARCH "x86_64"
34+
#endif
1435

1536
#define MIN(a,b) ({ __typeof__ (a) _a = (a); \
1637
__typeof__ (b) _b = (b); \
@@ -113,11 +134,6 @@ enum
113134
};
114135
#endif
115136

137+
int SelectChannelPixel(QRgb pix, int channel);
116138

117-
// check if armhf architecture, if not then it is assumed to be x86
118-
#ifdef __arm__
119-
#define ARCH "armhf"
120-
//#elif __x86_64__
121-
#else
122-
#define ARCH "x86_64"
123-
#endif
139+
#endif /* __PHOTOQUICK_COMMON */

src/dialogs.cpp

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
// this file is part of photoquick program which is GPLv3 licensed
22
#include "dialogs.h"
3-
#include "common.h"
4-
#include "filters.h"
5-
#include <QDialogButtonBox>
6-
#include <QPushButton>
7-
#include <QGridLayout>
8-
#include <QDesktopServices>
9-
#include <QUrl>
10-
#include <QProcess>
11-
#include <cmath>
123

134
// ------------ Dialog to set JPG Options for saving ------------
145

@@ -589,6 +580,24 @@ UpdateDialog:: checkForUpdate()
589580
updateBtn->setEnabled(true);
590581
}
591582

583+
DeWarpDialog:: DeWarpDialog(QWidget *parent) : QDialog(parent)
584+
{
585+
this->resize(150, 120);
586+
this->setWindowTitle("Dewarp Image");
587+
vLayout = new QVBoxLayout(this);
588+
countLabel = new QLabel("Count nodes :", this);
589+
countSpin = new QSpinBox(this);
590+
countSpin->setAlignment(Qt::AlignHCenter);
591+
countSpin->setRange(2, 50);
592+
countSpin->setValue(5);
593+
btnBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
594+
vLayout->addWidget(countLabel);
595+
vLayout->addWidget(countSpin);
596+
vLayout->addWidget(btnBox);
597+
connect(btnBox, SIGNAL(accepted()), this, SLOT(accept()));
598+
connect(btnBox, SIGNAL(rejected()), this, SLOT(reject()));
599+
}
600+
592601
void
593602
UpdateDialog:: download()
594603
{

src/dialogs.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
#include <QTextEdit>
88
#include <QImage>
99
#include <QTimer>
10+
#include <QDialogButtonBox>
11+
#include <QPushButton>
12+
#include <QGridLayout>
13+
#include <QDesktopServices>
14+
#include <QUrl>
15+
#include <QProcess>
16+
#include <cmath>
17+
#include "common.h"
18+
#include "filters.h"
19+
20+
#ifndef __PHOTOQUICK_DIALOGS
21+
#define __PHOTOQUICK_DIALOGS
1022

1123
// Dialog to set JPG Options for saving
1224
class JpegDialog : public QDialog
@@ -147,6 +159,16 @@ class LevelsDialog : public PreviewDialog
147159
void run();
148160
};
149161

162+
class DeWarpDialog : public QDialog
163+
{
164+
public:
165+
int countn;
166+
QVBoxLayout *vLayout;
167+
QLabel *countLabel;
168+
QSpinBox *countSpin;
169+
QDialogButtonBox *btnBox;
170+
DeWarpDialog(QWidget *parent);
171+
};
150172

151173
class UpdateDialog : public QDialog
152174
{
@@ -168,3 +190,5 @@ class UpdateDialog : public QDialog
168190
private slots:
169191
void checkForUpdate();
170192
};
193+
194+
#endif /* __PHOTOQUICK_DIALOGS */

0 commit comments

Comments
 (0)