├── .DS_Store ├── Images ├── 1.jpg ├── 2.jpg ├── DETAIL.jpg ├── EMBOSS.jpg ├── Text-On-Image.jpg ├── crop.jpg └── sample-out.jpg ├── README.md ├── editing.py ├── editing.ui └── main.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/.DS_Store -------------------------------------------------------------------------------- /Images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/Images/1.jpg -------------------------------------------------------------------------------- /Images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/Images/2.jpg -------------------------------------------------------------------------------- /Images/DETAIL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/Images/DETAIL.jpg -------------------------------------------------------------------------------- /Images/EMBOSS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/Images/EMBOSS.jpg -------------------------------------------------------------------------------- /Images/Text-On-Image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/Images/Text-On-Image.jpg -------------------------------------------------------------------------------- /Images/crop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/Images/crop.jpg -------------------------------------------------------------------------------- /Images/sample-out.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pythondeveloper6/Image-Editing-App-With-PyQt5/c2bf77c344fbcca415dfbf06e5ed8493c473cb66/Images/sample-out.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Image-Editing-App-With-PyQt5 -------------------------------------------------------------------------------- /editing.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'editing.ui' 4 | # 5 | # Created: Sun May 7 21:35:57 2017 6 | # by: PyQt4 UI code generator 4.11.3 7 | # 8 | # WARNING! All changes made in this file will be lost! 9 | 10 | from PyQt4 import QtCore, QtGui 11 | 12 | try: 13 | _fromUtf8 = QtCore.QString.fromUtf8 14 | except AttributeError: 15 | def _fromUtf8(s): 16 | return s 17 | 18 | try: 19 | _encoding = QtGui.QApplication.UnicodeUTF8 20 | def _translate(context, text, disambig): 21 | return QtGui.QApplication.translate(context, text, disambig, _encoding) 22 | except AttributeError: 23 | def _translate(context, text, disambig): 24 | return QtGui.QApplication.translate(context, text, disambig) 25 | 26 | class Ui_MainWindow(object): 27 | def setupUi(self, MainWindow): 28 | MainWindow.setObjectName(_fromUtf8("MainWindow")) 29 | MainWindow.resize(1045, 522) 30 | MainWindow.setStyleSheet(_fromUtf8("QToolTip\n" 31 | "{\n" 32 | " border: 1px solid black;\n" 33 | " background-color: #ffa02f;\n" 34 | " padding: 1px;\n" 35 | " border-radius: 3px;\n" 36 | " opacity: 100;\n" 37 | "}\n" 38 | "\n" 39 | "QWidget\n" 40 | "{\n" 41 | " color: #b1b1b1;\n" 42 | " background-color: #323232;\n" 43 | " font-size: 14px;\n" 44 | "\n" 45 | "}\n" 46 | "\n" 47 | "QWidget:item:hover\n" 48 | "{\n" 49 | " background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #ca0619);\n" 50 | " color: #000000;\n" 51 | "}\n" 52 | "\n" 53 | "QWidget:item:selected\n" 54 | "{\n" 55 | " background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);\n" 56 | "}\n" 57 | "\n" 58 | "QMenuBar::item\n" 59 | "{\n" 60 | " background: transparent;\n" 61 | "}\n" 62 | "\n" 63 | "QMenuBar::item:selected\n" 64 | "{\n" 65 | " background: transparent;\n" 66 | " border: 1px solid #ffaa00;\n" 67 | "}\n" 68 | "\n" 69 | "QMenuBar::item:pressed\n" 70 | "{\n" 71 | " background: #444;\n" 72 | " border: 1px solid #000;\n" 73 | " background-color: QLinearGradient(\n" 74 | " x1:0, y1:0,\n" 75 | " x2:0, y2:1,\n" 76 | " stop:1 #212121,\n" 77 | " stop:0.4 #343434/*,\n" 78 | " stop:0.2 #343434,\n" 79 | " stop:0.1 #ffaa00*/\n" 80 | " );\n" 81 | " margin-bottom:-1px;\n" 82 | " padding-bottom:1px;\n" 83 | "}\n" 84 | "\n" 85 | "QMenu\n" 86 | "{\n" 87 | " border: 1px solid #000;\n" 88 | "}\n" 89 | "\n" 90 | "QMenu::item\n" 91 | "{\n" 92 | " padding: 2px 20px 2px 20px;\n" 93 | "}\n" 94 | "\n" 95 | "QMenu::item:selected\n" 96 | "{\n" 97 | " color: #000000;\n" 98 | "}\n" 99 | "\n" 100 | "QWidget:disabled\n" 101 | "{\n" 102 | " color: #404040;\n" 103 | " background-color: #323232;\n" 104 | "}\n" 105 | "\n" 106 | "QAbstractItemView\n" 107 | "{\n" 108 | " background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0.1 #646464, stop: 1 #5d5d5d);\n" 109 | "}\n" 110 | "\n" 111 | "QWidget:focus\n" 112 | "{\n" 113 | " /*border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);*/\n" 114 | "}\n" 115 | "\n" 116 | "QLineEdit\n" 117 | "{\n" 118 | " background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0 #646464, stop: 1 #5d5d5d);\n" 119 | " padding: 1px;\n" 120 | " border-style: solid;\n" 121 | " border: 1px solid #1e1e1e;\n" 122 | " border-radius: 5;\n" 123 | "}\n" 124 | "\n" 125 | "QPushButton\n" 126 | "{\n" 127 | " color: #b1b1b1;\n" 128 | " background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646);\n" 129 | " border-width: 1px;\n" 130 | " border-color: #1e1e1e;\n" 131 | " border-style: solid;\n" 132 | " border-radius: 10;\n" 133 | " padding: 3px;\n" 134 | " font-size: 18px;\n" 135 | " padding-left: 5px;\n" 136 | " padding-right: 8px;\n" 137 | "}\n" 138 | "\n" 139 | "QPushButton:pressed\n" 140 | "{\n" 141 | " background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2d2d2d, stop: 0.1 #2b2b2b, stop: 0.5 #292929, stop: 0.9 #282828, stop: 1 #252525);\n" 142 | "}\n" 143 | "\n" 144 | "QComboBox\n" 145 | "{\n" 146 | " selection-background-color: #3D7848;\n" 147 | " background-color: #3D7848;\n" 148 | " border-style: solid;\n" 149 | " border: 1px solid #1e1e1e;\n" 150 | " border-radius: 5;\n" 151 | " font-size: 18px;\n" 152 | "\n" 153 | "}\n" 154 | "\n" 155 | "QComboBox:hover,QPushButton:hover\n" 156 | "{\n" 157 | " border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);\n" 158 | "}\n" 159 | "\n" 160 | "\n" 161 | "QComboBox:on\n" 162 | "{\n" 163 | " padding-top: 3px;\n" 164 | " padding-left: 4px;\n" 165 | " background-color: #3D7848 ;\n" 166 | " selection-background-color: #3D7848;\n" 167 | "}\n" 168 | "\n" 169 | "QComboBox QAbstractItemView\n" 170 | "{\n" 171 | " border: 2px solid darkgray;\n" 172 | " selection-background-color: #3D7848;\n" 173 | "}\n" 174 | "\n" 175 | "QComboBox::drop-down\n" 176 | "{\n" 177 | " subcontrol-origin: padding;\n" 178 | " subcontrol-position: top right;\n" 179 | " width: 15px;\n" 180 | "\n" 181 | " border-left-width: 0px;\n" 182 | " border-left-color: darkgray;\n" 183 | " border-left-style: solid; /* just a single line */\n" 184 | " border-top-right-radius: 3px; /* same radius as the QComboBox */\n" 185 | " border-bottom-right-radius: 3px;\n" 186 | " }\n" 187 | "\n" 188 | "QComboBox::down-arrow\n" 189 | "{\n" 190 | " image: url(:/down_arrow.png);\n" 191 | "}\n" 192 | "\n" 193 | "QGroupBox:focus\n" 194 | "{\n" 195 | "border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);\n" 196 | "}\n" 197 | "\n" 198 | "QTextEdit:focus\n" 199 | "{\n" 200 | " border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);\n" 201 | "}\n" 202 | "\n" 203 | "QScrollBar:horizontal {\n" 204 | " border: 1px solid #222222;\n" 205 | " background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);\n" 206 | " height: 7px;\n" 207 | " margin: 0px 16px 0 16px;\n" 208 | "}\n" 209 | "\n" 210 | "QScrollBar::handle:horizontal\n" 211 | "{\n" 212 | " background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f);\n" 213 | " min-height: 20px;\n" 214 | " border-radius: 2px;\n" 215 | "}\n" 216 | "\n" 217 | "QScrollBar::add-line:horizontal {\n" 218 | " border: 1px solid #1b1b19;\n" 219 | " border-radius: 2px;\n" 220 | " background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a);\n" 221 | " width: 14px;\n" 222 | " subcontrol-position: right;\n" 223 | " subcontrol-origin: margin;\n" 224 | "}\n" 225 | "\n" 226 | "QScrollBar::sub-line:horizontal {\n" 227 | " border: 1px solid #1b1b19;\n" 228 | " border-radius: 2px;\n" 229 | " background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a);\n" 230 | " width: 14px;\n" 231 | " subcontrol-position: left;\n" 232 | " subcontrol-origin: margin;\n" 233 | "}\n" 234 | "\n" 235 | "QScrollBar::right-arrow:horizontal, QScrollBar::left-arrow:horizontal\n" 236 | "{\n" 237 | " border: 1px solid black;\n" 238 | " width: 1px;\n" 239 | " height: 1px;\n" 240 | " background: white;\n" 241 | "}\n" 242 | "\n" 243 | "QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal\n" 244 | "{\n" 245 | " background: none;\n" 246 | "}\n" 247 | "\n" 248 | "QScrollBar:vertical\n" 249 | "{\n" 250 | " background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);\n" 251 | " width: 7px;\n" 252 | " margin: 16px 0 16px 0;\n" 253 | " border: 1px solid #222222;\n" 254 | "}\n" 255 | "\n" 256 | "QScrollBar::handle:vertical\n" 257 | "{\n" 258 | " background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f);\n" 259 | " min-height: 20px;\n" 260 | " border-radius: 2px;\n" 261 | "}\n" 262 | "\n" 263 | "QScrollBar::add-line:vertical\n" 264 | "{\n" 265 | " border: 1px solid #1b1b19;\n" 266 | " border-radius: 2px;\n" 267 | " background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);\n" 268 | " height: 14px;\n" 269 | " subcontrol-position: bottom;\n" 270 | " subcontrol-origin: margin;\n" 271 | "}\n" 272 | "\n" 273 | "QScrollBar::sub-line:vertical\n" 274 | "{\n" 275 | " border: 1px solid #1b1b19;\n" 276 | " border-radius: 2px;\n" 277 | " background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d7801a, stop: 1 #ffa02f);\n" 278 | " height: 14px;\n" 279 | " subcontrol-position: top;\n" 280 | " subcontrol-origin: margin;\n" 281 | "}\n" 282 | "\n" 283 | "QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical\n" 284 | "{\n" 285 | " border: 1px solid black;\n" 286 | " width: 1px;\n" 287 | " height: 1px;\n" 288 | " background: white;\n" 289 | "}\n" 290 | "\n" 291 | "\n" 292 | "QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical\n" 293 | "{\n" 294 | " background: none;\n" 295 | "}\n" 296 | "\n" 297 | "QTextEdit\n" 298 | "{\n" 299 | " background-color: #242424;\n" 300 | "}\n" 301 | "\n" 302 | "QPlainTextEdit\n" 303 | "{\n" 304 | " background-color: #242424;\n" 305 | "}\n" 306 | "\n" 307 | "QHeaderView::section\n" 308 | "{\n" 309 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #616161, stop: 0.5 #505050, stop: 0.6 #434343, stop:1 #656565);\n" 310 | " color: white;\n" 311 | " padding-left: 4px;\n" 312 | " border: 1px solid #6c6c6c;\n" 313 | "}\n" 314 | "\n" 315 | "QCheckBox:disabled\n" 316 | "{\n" 317 | "color: #3D7848;\n" 318 | "}\n" 319 | "\n" 320 | "QDockWidget::title\n" 321 | "{\n" 322 | " text-align: center;\n" 323 | " spacing: 3px; /* spacing between items in the tool bar */\n" 324 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232);\n" 325 | "}\n" 326 | "\n" 327 | "QDockWidget::close-button, QDockWidget::float-button\n" 328 | "{\n" 329 | " text-align: center;\n" 330 | " spacing: 1px; /* spacing between items in the tool bar */\n" 331 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232);\n" 332 | "}\n" 333 | "\n" 334 | "QDockWidget::close-button:hover, QDockWidget::float-button:hover\n" 335 | "{\n" 336 | " background: #242424;\n" 337 | "}\n" 338 | "\n" 339 | "QDockWidget::close-button:pressed, QDockWidget::float-button:pressed\n" 340 | "{\n" 341 | " padding: 1px -1px -1px 1px;\n" 342 | "}\n" 343 | "\n" 344 | "QMainWindow::separator\n" 345 | "{\n" 346 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434);\n" 347 | " color: white;\n" 348 | " padding-left: 4px;\n" 349 | " border: 1px solid #4c4c4c;\n" 350 | " spacing: 3px; /* spacing between items in the tool bar */\n" 351 | "}\n" 352 | "\n" 353 | "QMainWindow::separator:hover\n" 354 | "{\n" 355 | "\n" 356 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #d7801a, stop:0.5 #b56c17 stop:1 #ffa02f);\n" 357 | " color: white;\n" 358 | " padding-left: 4px;\n" 359 | " border: 1px solid #6c6c6c;\n" 360 | " spacing: 3px; /* spacing between items in the tool bar */\n" 361 | "}\n" 362 | "\n" 363 | "QToolBar::handle\n" 364 | "{\n" 365 | " spacing: 3px; /* spacing between items in the tool bar */\n" 366 | " background: url(:/images/handle.png);\n" 367 | "}\n" 368 | "\n" 369 | "QMenu::separator\n" 370 | "{\n" 371 | " height: 2px;\n" 372 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434);\n" 373 | " color: white;\n" 374 | " padding-left: 4px;\n" 375 | " margin-left: 10px;\n" 376 | " margin-right: 5px;\n" 377 | "}\n" 378 | "\n" 379 | "QProgressBar\n" 380 | "{\n" 381 | " border: 2px solid grey;\n" 382 | " border-radius: 5px;\n" 383 | " text-align: center;\n" 384 | "}\n" 385 | "\n" 386 | "QProgressBar::chunk\n" 387 | "{\n" 388 | " background-color: #d7801a;\n" 389 | " width: 2.15px;\n" 390 | " margin: 0.5px;\n" 391 | "}\n" 392 | "\n" 393 | "QTabBar::tab {\n" 394 | " color: #b1b1b1;\n" 395 | " border: 1px solid #444;\n" 396 | " border-bottom-style: none;\n" 397 | " background-color: #323232;\n" 398 | " padding-left: 10px;\n" 399 | " padding-right: 10px;\n" 400 | " padding-top: 3px;\n" 401 | " padding-bottom: 2px;\n" 402 | " margin-right: -1px;\n" 403 | "}\n" 404 | "\n" 405 | "QTabWidget::pane {\n" 406 | " border: 1px solid #444;\n" 407 | " top: 1px;\n" 408 | "}\n" 409 | "\n" 410 | "QTabBar::tab:last\n" 411 | "{\n" 412 | " margin-right: 0; /* the last selected tab has nothing to overlap with on the right */\n" 413 | " border-top-right-radius: 3px;\n" 414 | "}\n" 415 | "\n" 416 | "QTabBar::tab:first:!selected\n" 417 | "{\n" 418 | " margin-left: 0px; /* the last selected tab has nothing to overlap with on the right */\n" 419 | "\n" 420 | "\n" 421 | " border-top-left-radius: 3px;\n" 422 | "}\n" 423 | "\n" 424 | "QTabBar::tab:!selected\n" 425 | "{\n" 426 | " color: #b1b1b1;\n" 427 | " border-bottom-style: solid;\n" 428 | " margin-top: 3px;\n" 429 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:.4 #343434);\n" 430 | "}\n" 431 | "\n" 432 | "QTabBar::tab:selected\n" 433 | "{\n" 434 | " border-top-left-radius: 3px;\n" 435 | " border-top-right-radius: 3px;\n" 436 | " margin-bottom: 0px;\n" 437 | "}\n" 438 | "\n" 439 | "QTabBar::tab:!selected:hover\n" 440 | "{\n" 441 | " /*border-top: 2px solid #ffaa00;\n" 442 | " padding-bottom: 3px;*/\n" 443 | " border-top-left-radius: 3px;\n" 444 | " border-top-right-radius: 3px;\n" 445 | " background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:0.4 #343434, stop:0.2 #343434, stop:0.1 #ffaa00);\n" 446 | "}\n" 447 | "\n" 448 | "QRadioButton::indicator:checked, QRadioButton::indicator:unchecked{\n" 449 | " color: #b1b1b1;\n" 450 | " background-color: #323232;\n" 451 | " border: 1px solid #b1b1b1;\n" 452 | " border-radius: 6px;\n" 453 | "}\n" 454 | "\n" 455 | "QRadioButton::indicator:checked\n" 456 | "{\n" 457 | " background-color: qradialgradient(\n" 458 | " cx: 0.5, cy: 0.5,\n" 459 | " fx: 0.5, fy: 0.5,\n" 460 | " radius: 1.0,\n" 461 | " stop: 0.25 #ffaa00,\n" 462 | " stop: 0.3 #323232\n" 463 | " );\n" 464 | "}\n" 465 | "\n" 466 | "QCheckBox::indicator{\n" 467 | " color: #b1b1b1;\n" 468 | " background-color: #323232;\n" 469 | " border: 1px solid #b1b1b1;\n" 470 | " width: 9px;\n" 471 | " height: 9px;\n" 472 | "}\n" 473 | "\n" 474 | "QRadioButton::indicator\n" 475 | "{\n" 476 | " border-radius: 6px;\n" 477 | "}\n" 478 | "\n" 479 | "QRadioButton::indicator:hover, QCheckBox::indicator:hover\n" 480 | "{\n" 481 | " border: 1px solid #ffaa00;\n" 482 | "}\n" 483 | "\n" 484 | "QCheckBox::indicator:checked\n" 485 | "{\n" 486 | " image:url(:/images/checkbox.png);\n" 487 | " background-color:#3D7848;\n" 488 | "}\n" 489 | "\n" 490 | "QCheckBox::indicator:disabled, QRadioButton::indicator:disabled\n" 491 | "{\n" 492 | " border: 1px solid #444;\n" 493 | "}\n" 494 | "QListWidget::item {\n" 495 | " color: #b1b1b1;\n" 496 | " border: 1px solid #444;\n" 497 | " border-bottom-style: none;\n" 498 | " background-color: #323232;\n" 499 | " padding-left: 10px;\n" 500 | " padding-right: 10px;\n" 501 | " padding-top: 3px;\n" 502 | " padding-bottom: 2px;\n" 503 | " margin-right: -1px;\n" 504 | " height: 28px;\n" 505 | "}")) 506 | self.centralwidget = QtGui.QWidget(MainWindow) 507 | self.centralwidget.setObjectName(_fromUtf8("centralwidget")) 508 | self.tabWidget = QtGui.QTabWidget(self.centralwidget) 509 | self.tabWidget.setGeometry(QtCore.QRect(0, 0, 1041, 461)) 510 | self.tabWidget.setTabsClosable(True) 511 | self.tabWidget.setMovable(True) 512 | self.tabWidget.setObjectName(_fromUtf8("tabWidget")) 513 | self.tab = QtGui.QWidget() 514 | self.tab.setObjectName(_fromUtf8("tab")) 515 | self.tabWidget_2 = QtGui.QTabWidget(self.tab) 516 | self.tabWidget_2.setGeometry(QtCore.QRect(0, 0, 691, 421)) 517 | self.tabWidget_2.setTabsClosable(True) 518 | self.tabWidget_2.setMovable(True) 519 | self.tabWidget_2.setObjectName(_fromUtf8("tabWidget_2")) 520 | self.tab_2 = QtGui.QWidget() 521 | self.tab_2.setObjectName(_fromUtf8("tab_2")) 522 | self.tabWidget_2.addTab(self.tab_2, _fromUtf8("")) 523 | self.groupBox = QtGui.QGroupBox(self.tab) 524 | self.groupBox.setEnabled(True) 525 | self.groupBox.setGeometry(QtCore.QRect(719, 80, 301, 161)) 526 | self.groupBox.setTitle(_fromUtf8("")) 527 | self.groupBox.setObjectName(_fromUtf8("groupBox")) 528 | self.pushButton = QtGui.QPushButton(self.groupBox) 529 | self.pushButton.setGeometry(QtCore.QRect(120, 110, 94, 32)) 530 | self.pushButton.setFlat(True) 531 | self.pushButton.setObjectName(_fromUtf8("pushButton")) 532 | self.comboBox_2 = QtGui.QComboBox(self.groupBox) 533 | self.comboBox_2.setGeometry(QtCore.QRect(116, 30, 161, 41)) 534 | self.comboBox_2.setObjectName(_fromUtf8("comboBox_2")) 535 | self.comboBox_2.addItem(_fromUtf8("")) 536 | self.comboBox_2.addItem(_fromUtf8("")) 537 | self.comboBox_2.addItem(_fromUtf8("")) 538 | self.comboBox_2.addItem(_fromUtf8("")) 539 | self.comboBox_2.addItem(_fromUtf8("")) 540 | self.comboBox_2.addItem(_fromUtf8("")) 541 | self.comboBox_2.addItem(_fromUtf8("")) 542 | self.comboBox_2.addItem(_fromUtf8("")) 543 | self.comboBox_2.addItem(_fromUtf8("")) 544 | self.comboBox_2.addItem(_fromUtf8("")) 545 | self.label = QtGui.QLabel(self.groupBox) 546 | self.label.setGeometry(QtCore.QRect(22, 29, 71, 31)) 547 | self.label.setObjectName(_fromUtf8("label")) 548 | self.groupBox_2 = QtGui.QGroupBox(self.tab) 549 | self.groupBox_2.setGeometry(QtCore.QRect(720, 50, 291, 331)) 550 | self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) 551 | self.lineEdit = QtGui.QLineEdit(self.groupBox_2) 552 | self.lineEdit.setGeometry(QtCore.QRect(150, 40, 81, 41)) 553 | self.lineEdit.setObjectName(_fromUtf8("lineEdit")) 554 | self.label_2 = QtGui.QLabel(self.groupBox_2) 555 | self.label_2.setGeometry(QtCore.QRect(50, 40, 91, 41)) 556 | self.label_2.setObjectName(_fromUtf8("label_2")) 557 | self.lineEdit_2 = QtGui.QLineEdit(self.groupBox_2) 558 | self.lineEdit_2.setGeometry(QtCore.QRect(150, 90, 81, 41)) 559 | self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2")) 560 | self.label_3 = QtGui.QLabel(self.groupBox_2) 561 | self.label_3.setGeometry(QtCore.QRect(50, 180, 91, 41)) 562 | self.label_3.setObjectName(_fromUtf8("label_3")) 563 | self.lineEdit_3 = QtGui.QLineEdit(self.groupBox_2) 564 | self.lineEdit_3.setGeometry(QtCore.QRect(150, 140, 81, 41)) 565 | self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3")) 566 | self.label_4 = QtGui.QLabel(self.groupBox_2) 567 | self.label_4.setGeometry(QtCore.QRect(50, 90, 91, 41)) 568 | self.label_4.setObjectName(_fromUtf8("label_4")) 569 | self.lineEdit_4 = QtGui.QLineEdit(self.groupBox_2) 570 | self.lineEdit_4.setGeometry(QtCore.QRect(150, 190, 81, 41)) 571 | self.lineEdit_4.setObjectName(_fromUtf8("lineEdit_4")) 572 | self.label_5 = QtGui.QLabel(self.groupBox_2) 573 | self.label_5.setGeometry(QtCore.QRect(50, 140, 91, 41)) 574 | self.label_5.setObjectName(_fromUtf8("label_5")) 575 | self.pushButton_2 = QtGui.QPushButton(self.groupBox_2) 576 | self.pushButton_2.setGeometry(QtCore.QRect(100, 250, 94, 32)) 577 | self.pushButton_2.setObjectName(_fromUtf8("pushButton_2")) 578 | self.groupBox_3 = QtGui.QGroupBox(self.tab) 579 | self.groupBox_3.setGeometry(QtCore.QRect(709, 60, 301, 361)) 580 | self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) 581 | self.pushButton_4 = QtGui.QPushButton(self.groupBox_3) 582 | self.pushButton_4.setGeometry(QtCore.QRect(110, 290, 94, 32)) 583 | self.pushButton_4.setObjectName(_fromUtf8("pushButton_4")) 584 | self.label_6 = QtGui.QLabel(self.groupBox_3) 585 | self.label_6.setGeometry(QtCore.QRect(30, 70, 63, 20)) 586 | self.label_6.setObjectName(_fromUtf8("label_6")) 587 | self.label_10 = QtGui.QLabel(self.groupBox_3) 588 | self.label_10.setGeometry(QtCore.QRect(10, 170, 63, 20)) 589 | self.label_10.setObjectName(_fromUtf8("label_10")) 590 | self.label_11 = QtGui.QLabel(self.groupBox_3) 591 | self.label_11.setGeometry(QtCore.QRect(10, 210, 63, 20)) 592 | self.label_11.setObjectName(_fromUtf8("label_11")) 593 | self.lineEdit_8 = QtGui.QLineEdit(self.groupBox_3) 594 | self.lineEdit_8.setGeometry(QtCore.QRect(80, 60, 221, 41)) 595 | self.lineEdit_8.setObjectName(_fromUtf8("lineEdit_8")) 596 | self.lineEdit_9 = QtGui.QLineEdit(self.groupBox_3) 597 | self.lineEdit_9.setGeometry(QtCore.QRect(80, 160, 113, 41)) 598 | self.lineEdit_9.setObjectName(_fromUtf8("lineEdit_9")) 599 | self.lineEdit_10 = QtGui.QLineEdit(self.groupBox_3) 600 | self.lineEdit_10.setGeometry(QtCore.QRect(80, 210, 113, 41)) 601 | self.lineEdit_10.setObjectName(_fromUtf8("lineEdit_10")) 602 | self.lineEdit_11 = QtGui.QLineEdit(self.groupBox_3) 603 | self.lineEdit_11.setGeometry(QtCore.QRect(80, 110, 113, 41)) 604 | self.lineEdit_11.setObjectName(_fromUtf8("lineEdit_11")) 605 | self.label_12 = QtGui.QLabel(self.groupBox_3) 606 | self.label_12.setGeometry(QtCore.QRect(10, 120, 63, 20)) 607 | self.label_12.setObjectName(_fromUtf8("label_12")) 608 | self.groupBox_4 = QtGui.QGroupBox(self.tab) 609 | self.groupBox_4.setGeometry(QtCore.QRect(710, 30, 311, 381)) 610 | self.groupBox_4.setObjectName(_fromUtf8("groupBox_4")) 611 | self.pushButton_5 = QtGui.QPushButton(self.groupBox_4) 612 | self.pushButton_5.setGeometry(QtCore.QRect(100, 330, 94, 32)) 613 | self.pushButton_5.setObjectName(_fromUtf8("pushButton_5")) 614 | self.label_13 = QtGui.QLabel(self.groupBox_4) 615 | self.label_13.setGeometry(QtCore.QRect(10, 70, 71, 20)) 616 | self.label_13.setObjectName(_fromUtf8("label_13")) 617 | self.label_14 = QtGui.QLabel(self.groupBox_4) 618 | self.label_14.setGeometry(QtCore.QRect(10, 120, 71, 20)) 619 | self.label_14.setObjectName(_fromUtf8("label_14")) 620 | self.lineEdit_12 = QtGui.QLineEdit(self.groupBox_4) 621 | self.lineEdit_12.setGeometry(QtCore.QRect(130, 60, 113, 32)) 622 | self.lineEdit_12.setObjectName(_fromUtf8("lineEdit_12")) 623 | self.lineEdit_13 = QtGui.QLineEdit(self.groupBox_4) 624 | self.lineEdit_13.setGeometry(QtCore.QRect(130, 110, 113, 32)) 625 | self.lineEdit_13.setObjectName(_fromUtf8("lineEdit_13")) 626 | self.tabWidget.addTab(self.tab, _fromUtf8("")) 627 | MainWindow.setCentralWidget(self.centralwidget) 628 | self.menubar = QtGui.QMenuBar(MainWindow) 629 | self.menubar.setGeometry(QtCore.QRect(0, 0, 1045, 25)) 630 | self.menubar.setObjectName(_fromUtf8("menubar")) 631 | self.menuFile = QtGui.QMenu(self.menubar) 632 | self.menuFile.setObjectName(_fromUtf8("menuFile")) 633 | self.menuFilters = QtGui.QMenu(self.menubar) 634 | self.menuFilters.setObjectName(_fromUtf8("menuFilters")) 635 | MainWindow.setMenuBar(self.menubar) 636 | self.statusbar = QtGui.QStatusBar(MainWindow) 637 | self.statusbar.setObjectName(_fromUtf8("statusbar")) 638 | MainWindow.setStatusBar(self.statusbar) 639 | self.actionOpen_Images = QtGui.QAction(MainWindow) 640 | self.actionOpen_Images.setObjectName(_fromUtf8("actionOpen_Images")) 641 | self.actionSave_Images = QtGui.QAction(MainWindow) 642 | self.actionSave_Images.setObjectName(_fromUtf8("actionSave_Images")) 643 | self.actionApply_Filter = QtGui.QAction(MainWindow) 644 | self.actionApply_Filter.setObjectName(_fromUtf8("actionApply_Filter")) 645 | self.actionCrop_Image = QtGui.QAction(MainWindow) 646 | self.actionCrop_Image.setObjectName(_fromUtf8("actionCrop_Image")) 647 | self.actionWrite_Text_On_Imge = QtGui.QAction(MainWindow) 648 | self.actionWrite_Text_On_Imge.setObjectName(_fromUtf8("actionWrite_Text_On_Imge")) 649 | self.actionMappin_An_Image = QtGui.QAction(MainWindow) 650 | self.actionMappin_An_Image.setObjectName(_fromUtf8("actionMappin_An_Image")) 651 | self.menuFile.addAction(self.actionOpen_Images) 652 | self.menuFile.addAction(self.actionSave_Images) 653 | self.menuFilters.addAction(self.actionApply_Filter) 654 | self.menuFilters.addAction(self.actionCrop_Image) 655 | self.menuFilters.addAction(self.actionWrite_Text_On_Imge) 656 | self.menuFilters.addAction(self.actionMappin_An_Image) 657 | self.menubar.addAction(self.menuFile.menuAction()) 658 | self.menubar.addAction(self.menuFilters.menuAction()) 659 | 660 | self.retranslateUi(MainWindow) 661 | self.tabWidget.setCurrentIndex(0) 662 | self.tabWidget_2.setCurrentIndex(0) 663 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 664 | 665 | def retranslateUi(self, MainWindow): 666 | MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) 667 | self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_2), _translate("MainWindow", "Tab 1", None)) 668 | self.pushButton.setText(_translate("MainWindow", "Apply", None)) 669 | self.comboBox_2.setItemText(0, _translate("MainWindow", "BLUR", None)) 670 | self.comboBox_2.setItemText(1, _translate("MainWindow", "DETAIL", None)) 671 | self.comboBox_2.setItemText(2, _translate("MainWindow", "CONTOUR", None)) 672 | self.comboBox_2.setItemText(3, _translate("MainWindow", "EDGE_ENHANCE", None)) 673 | self.comboBox_2.setItemText(4, _translate("MainWindow", "EDGE_ENHANCE_MORE", None)) 674 | self.comboBox_2.setItemText(5, _translate("MainWindow", "SMOOTH_MORE", None)) 675 | self.comboBox_2.setItemText(6, _translate("MainWindow", "EMBOSS", None)) 676 | self.comboBox_2.setItemText(7, _translate("MainWindow", "FIND_EDGES", None)) 677 | self.comboBox_2.setItemText(8, _translate("MainWindow", "SMOOTH", None)) 678 | self.comboBox_2.setItemText(9, _translate("MainWindow", "SHARPEN", None)) 679 | self.label.setText(_translate("MainWindow", "Filters", None)) 680 | self.groupBox_2.setTitle(_translate("MainWindow", "Crop The Image", None)) 681 | self.label_2.setText(_translate("MainWindow", "Top", None)) 682 | self.label_3.setText(_translate("MainWindow", "Height", None)) 683 | self.label_4.setText(_translate("MainWindow", "Left", None)) 684 | self.label_5.setText(_translate("MainWindow", "Width", None)) 685 | self.pushButton_2.setText(_translate("MainWindow", "Crop", None)) 686 | self.groupBox_3.setTitle(_translate("MainWindow", "Write On Image", None)) 687 | self.pushButton_4.setText(_translate("MainWindow", "Apply", None)) 688 | self.label_6.setText(_translate("MainWindow", "Text", None)) 689 | self.label_10.setText(_translate("MainWindow", "Position-X", None)) 690 | self.label_11.setText(_translate("MainWindow", "Position-Y", None)) 691 | self.label_12.setText(_translate("MainWindow", "Font Size", None)) 692 | self.groupBox_4.setTitle(_translate("MainWindow", "Mapping", None)) 693 | self.pushButton_5.setText(_translate("MainWindow", "Apply", None)) 694 | self.label_13.setText(_translate("MainWindow", "Img-WIdth", None)) 695 | self.label_14.setText(_translate("MainWindow", "Img-Height", None)) 696 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Tab 1", None)) 697 | self.menuFile.setTitle(_translate("MainWindow", "File", None)) 698 | self.menuFilters.setTitle(_translate("MainWindow", "Tools", None)) 699 | self.actionOpen_Images.setText(_translate("MainWindow", "Open Images", None)) 700 | self.actionSave_Images.setText(_translate("MainWindow", "Save Image", None)) 701 | self.actionApply_Filter.setText(_translate("MainWindow", "Apply Filter", None)) 702 | self.actionCrop_Image.setText(_translate("MainWindow", "Crop Image", None)) 703 | self.actionWrite_Text_On_Imge.setText(_translate("MainWindow", "Write Text On Imge", None)) 704 | self.actionMappin_An_Image.setText(_translate("MainWindow", "Mappin An Image", None)) 705 | 706 | -------------------------------------------------------------------------------- /editing.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1045 10 | 522 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | QToolTip 18 | { 19 | border: 1px solid black; 20 | background-color: #ffa02f; 21 | padding: 1px; 22 | border-radius: 3px; 23 | opacity: 100; 24 | } 25 | 26 | QWidget 27 | { 28 | color: #b1b1b1; 29 | background-color: #323232; 30 | font-size: 14px; 31 | 32 | } 33 | 34 | QWidget:item:hover 35 | { 36 | background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #ca0619); 37 | color: #000000; 38 | } 39 | 40 | QWidget:item:selected 41 | { 42 | background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); 43 | } 44 | 45 | QMenuBar::item 46 | { 47 | background: transparent; 48 | } 49 | 50 | QMenuBar::item:selected 51 | { 52 | background: transparent; 53 | border: 1px solid #ffaa00; 54 | } 55 | 56 | QMenuBar::item:pressed 57 | { 58 | background: #444; 59 | border: 1px solid #000; 60 | background-color: QLinearGradient( 61 | x1:0, y1:0, 62 | x2:0, y2:1, 63 | stop:1 #212121, 64 | stop:0.4 #343434/*, 65 | stop:0.2 #343434, 66 | stop:0.1 #ffaa00*/ 67 | ); 68 | margin-bottom:-1px; 69 | padding-bottom:1px; 70 | } 71 | 72 | QMenu 73 | { 74 | border: 1px solid #000; 75 | } 76 | 77 | QMenu::item 78 | { 79 | padding: 2px 20px 2px 20px; 80 | } 81 | 82 | QMenu::item:selected 83 | { 84 | color: #000000; 85 | } 86 | 87 | QWidget:disabled 88 | { 89 | color: #404040; 90 | background-color: #323232; 91 | } 92 | 93 | QAbstractItemView 94 | { 95 | background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0.1 #646464, stop: 1 #5d5d5d); 96 | } 97 | 98 | QWidget:focus 99 | { 100 | /*border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);*/ 101 | } 102 | 103 | QLineEdit 104 | { 105 | background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0 #646464, stop: 1 #5d5d5d); 106 | padding: 1px; 107 | border-style: solid; 108 | border: 1px solid #1e1e1e; 109 | border-radius: 5; 110 | } 111 | 112 | QPushButton 113 | { 114 | color: #b1b1b1; 115 | background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646); 116 | border-width: 1px; 117 | border-color: #1e1e1e; 118 | border-style: solid; 119 | border-radius: 10; 120 | padding: 3px; 121 | font-size: 18px; 122 | padding-left: 5px; 123 | padding-right: 8px; 124 | } 125 | 126 | QPushButton:pressed 127 | { 128 | background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2d2d2d, stop: 0.1 #2b2b2b, stop: 0.5 #292929, stop: 0.9 #282828, stop: 1 #252525); 129 | } 130 | 131 | QComboBox 132 | { 133 | selection-background-color: #3D7848; 134 | background-color: #3D7848; 135 | border-style: solid; 136 | border: 1px solid #1e1e1e; 137 | border-radius: 5; 138 | font-size: 18px; 139 | 140 | } 141 | 142 | QComboBox:hover,QPushButton:hover 143 | { 144 | border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); 145 | } 146 | 147 | 148 | QComboBox:on 149 | { 150 | padding-top: 3px; 151 | padding-left: 4px; 152 | background-color: #3D7848 ; 153 | selection-background-color: #3D7848; 154 | } 155 | 156 | QComboBox QAbstractItemView 157 | { 158 | border: 2px solid darkgray; 159 | selection-background-color: #3D7848; 160 | } 161 | 162 | QComboBox::drop-down 163 | { 164 | subcontrol-origin: padding; 165 | subcontrol-position: top right; 166 | width: 15px; 167 | 168 | border-left-width: 0px; 169 | border-left-color: darkgray; 170 | border-left-style: solid; /* just a single line */ 171 | border-top-right-radius: 3px; /* same radius as the QComboBox */ 172 | border-bottom-right-radius: 3px; 173 | } 174 | 175 | QComboBox::down-arrow 176 | { 177 | image: url(:/down_arrow.png); 178 | } 179 | 180 | QGroupBox:focus 181 | { 182 | border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); 183 | } 184 | 185 | QTextEdit:focus 186 | { 187 | border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); 188 | } 189 | 190 | QScrollBar:horizontal { 191 | border: 1px solid #222222; 192 | background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848); 193 | height: 7px; 194 | margin: 0px 16px 0 16px; 195 | } 196 | 197 | QScrollBar::handle:horizontal 198 | { 199 | background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f); 200 | min-height: 20px; 201 | border-radius: 2px; 202 | } 203 | 204 | QScrollBar::add-line:horizontal { 205 | border: 1px solid #1b1b19; 206 | border-radius: 2px; 207 | background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a); 208 | width: 14px; 209 | subcontrol-position: right; 210 | subcontrol-origin: margin; 211 | } 212 | 213 | QScrollBar::sub-line:horizontal { 214 | border: 1px solid #1b1b19; 215 | border-radius: 2px; 216 | background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a); 217 | width: 14px; 218 | subcontrol-position: left; 219 | subcontrol-origin: margin; 220 | } 221 | 222 | QScrollBar::right-arrow:horizontal, QScrollBar::left-arrow:horizontal 223 | { 224 | border: 1px solid black; 225 | width: 1px; 226 | height: 1px; 227 | background: white; 228 | } 229 | 230 | QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal 231 | { 232 | background: none; 233 | } 234 | 235 | QScrollBar:vertical 236 | { 237 | background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848); 238 | width: 7px; 239 | margin: 16px 0 16px 0; 240 | border: 1px solid #222222; 241 | } 242 | 243 | QScrollBar::handle:vertical 244 | { 245 | background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f); 246 | min-height: 20px; 247 | border-radius: 2px; 248 | } 249 | 250 | QScrollBar::add-line:vertical 251 | { 252 | border: 1px solid #1b1b19; 253 | border-radius: 2px; 254 | background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a); 255 | height: 14px; 256 | subcontrol-position: bottom; 257 | subcontrol-origin: margin; 258 | } 259 | 260 | QScrollBar::sub-line:vertical 261 | { 262 | border: 1px solid #1b1b19; 263 | border-radius: 2px; 264 | background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d7801a, stop: 1 #ffa02f); 265 | height: 14px; 266 | subcontrol-position: top; 267 | subcontrol-origin: margin; 268 | } 269 | 270 | QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical 271 | { 272 | border: 1px solid black; 273 | width: 1px; 274 | height: 1px; 275 | background: white; 276 | } 277 | 278 | 279 | QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical 280 | { 281 | background: none; 282 | } 283 | 284 | QTextEdit 285 | { 286 | background-color: #242424; 287 | } 288 | 289 | QPlainTextEdit 290 | { 291 | background-color: #242424; 292 | } 293 | 294 | QHeaderView::section 295 | { 296 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #616161, stop: 0.5 #505050, stop: 0.6 #434343, stop:1 #656565); 297 | color: white; 298 | padding-left: 4px; 299 | border: 1px solid #6c6c6c; 300 | } 301 | 302 | QCheckBox:disabled 303 | { 304 | color: #3D7848; 305 | } 306 | 307 | QDockWidget::title 308 | { 309 | text-align: center; 310 | spacing: 3px; /* spacing between items in the tool bar */ 311 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232); 312 | } 313 | 314 | QDockWidget::close-button, QDockWidget::float-button 315 | { 316 | text-align: center; 317 | spacing: 1px; /* spacing between items in the tool bar */ 318 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232); 319 | } 320 | 321 | QDockWidget::close-button:hover, QDockWidget::float-button:hover 322 | { 323 | background: #242424; 324 | } 325 | 326 | QDockWidget::close-button:pressed, QDockWidget::float-button:pressed 327 | { 328 | padding: 1px -1px -1px 1px; 329 | } 330 | 331 | QMainWindow::separator 332 | { 333 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434); 334 | color: white; 335 | padding-left: 4px; 336 | border: 1px solid #4c4c4c; 337 | spacing: 3px; /* spacing between items in the tool bar */ 338 | } 339 | 340 | QMainWindow::separator:hover 341 | { 342 | 343 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #d7801a, stop:0.5 #b56c17 stop:1 #ffa02f); 344 | color: white; 345 | padding-left: 4px; 346 | border: 1px solid #6c6c6c; 347 | spacing: 3px; /* spacing between items in the tool bar */ 348 | } 349 | 350 | QToolBar::handle 351 | { 352 | spacing: 3px; /* spacing between items in the tool bar */ 353 | background: url(:/images/handle.png); 354 | } 355 | 356 | QMenu::separator 357 | { 358 | height: 2px; 359 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434); 360 | color: white; 361 | padding-left: 4px; 362 | margin-left: 10px; 363 | margin-right: 5px; 364 | } 365 | 366 | QProgressBar 367 | { 368 | border: 2px solid grey; 369 | border-radius: 5px; 370 | text-align: center; 371 | } 372 | 373 | QProgressBar::chunk 374 | { 375 | background-color: #d7801a; 376 | width: 2.15px; 377 | margin: 0.5px; 378 | } 379 | 380 | QTabBar::tab { 381 | color: #b1b1b1; 382 | border: 1px solid #444; 383 | border-bottom-style: none; 384 | background-color: #323232; 385 | padding-left: 10px; 386 | padding-right: 10px; 387 | padding-top: 3px; 388 | padding-bottom: 2px; 389 | margin-right: -1px; 390 | } 391 | 392 | QTabWidget::pane { 393 | border: 1px solid #444; 394 | top: 1px; 395 | } 396 | 397 | QTabBar::tab:last 398 | { 399 | margin-right: 0; /* the last selected tab has nothing to overlap with on the right */ 400 | border-top-right-radius: 3px; 401 | } 402 | 403 | QTabBar::tab:first:!selected 404 | { 405 | margin-left: 0px; /* the last selected tab has nothing to overlap with on the right */ 406 | 407 | 408 | border-top-left-radius: 3px; 409 | } 410 | 411 | QTabBar::tab:!selected 412 | { 413 | color: #b1b1b1; 414 | border-bottom-style: solid; 415 | margin-top: 3px; 416 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:.4 #343434); 417 | } 418 | 419 | QTabBar::tab:selected 420 | { 421 | border-top-left-radius: 3px; 422 | border-top-right-radius: 3px; 423 | margin-bottom: 0px; 424 | } 425 | 426 | QTabBar::tab:!selected:hover 427 | { 428 | /*border-top: 2px solid #ffaa00; 429 | padding-bottom: 3px;*/ 430 | border-top-left-radius: 3px; 431 | border-top-right-radius: 3px; 432 | background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:0.4 #343434, stop:0.2 #343434, stop:0.1 #ffaa00); 433 | } 434 | 435 | QRadioButton::indicator:checked, QRadioButton::indicator:unchecked{ 436 | color: #b1b1b1; 437 | background-color: #323232; 438 | border: 1px solid #b1b1b1; 439 | border-radius: 6px; 440 | } 441 | 442 | QRadioButton::indicator:checked 443 | { 444 | background-color: qradialgradient( 445 | cx: 0.5, cy: 0.5, 446 | fx: 0.5, fy: 0.5, 447 | radius: 1.0, 448 | stop: 0.25 #ffaa00, 449 | stop: 0.3 #323232 450 | ); 451 | } 452 | 453 | QCheckBox::indicator{ 454 | color: #b1b1b1; 455 | background-color: #323232; 456 | border: 1px solid #b1b1b1; 457 | width: 9px; 458 | height: 9px; 459 | } 460 | 461 | QRadioButton::indicator 462 | { 463 | border-radius: 6px; 464 | } 465 | 466 | QRadioButton::indicator:hover, QCheckBox::indicator:hover 467 | { 468 | border: 1px solid #ffaa00; 469 | } 470 | 471 | QCheckBox::indicator:checked 472 | { 473 | image:url(:/images/checkbox.png); 474 | background-color:#3D7848; 475 | } 476 | 477 | QCheckBox::indicator:disabled, QRadioButton::indicator:disabled 478 | { 479 | border: 1px solid #444; 480 | } 481 | QListWidget::item { 482 | color: #b1b1b1; 483 | border: 1px solid #444; 484 | border-bottom-style: none; 485 | background-color: #323232; 486 | padding-left: 10px; 487 | padding-right: 10px; 488 | padding-top: 3px; 489 | padding-bottom: 2px; 490 | margin-right: -1px; 491 | height: 28px; 492 | } 493 | 494 | 495 | 496 | 497 | 498 | 0 499 | 0 500 | 1041 501 | 461 502 | 503 | 504 | 505 | 0 506 | 507 | 508 | true 509 | 510 | 511 | true 512 | 513 | 514 | 515 | Tab 1 516 | 517 | 518 | 519 | 520 | 0 521 | 0 522 | 691 523 | 421 524 | 525 | 526 | 527 | 0 528 | 529 | 530 | true 531 | 532 | 533 | true 534 | 535 | 536 | 537 | Tab 1 538 | 539 | 540 | 541 | 542 | 543 | true 544 | 545 | 546 | 547 | 719 548 | 80 549 | 301 550 | 161 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 120 560 | 110 561 | 94 562 | 32 563 | 564 | 565 | 566 | Apply 567 | 568 | 569 | true 570 | 571 | 572 | 573 | 574 | 575 | 116 576 | 30 577 | 161 578 | 41 579 | 580 | 581 | 582 | 583 | BLUR 584 | 585 | 586 | 587 | 588 | DETAIL 589 | 590 | 591 | 592 | 593 | CONTOUR 594 | 595 | 596 | 597 | 598 | EDGE_ENHANCE 599 | 600 | 601 | 602 | 603 | EDGE_ENHANCE_MORE 604 | 605 | 606 | 607 | 608 | SMOOTH_MORE 609 | 610 | 611 | 612 | 613 | EMBOSS 614 | 615 | 616 | 617 | 618 | FIND_EDGES 619 | 620 | 621 | 622 | 623 | SMOOTH 624 | 625 | 626 | 627 | 628 | SHARPEN 629 | 630 | 631 | 632 | 633 | 634 | 635 | 22 636 | 29 637 | 71 638 | 31 639 | 640 | 641 | 642 | Filters 643 | 644 | 645 | 646 | 647 | 648 | 649 | 720 650 | 50 651 | 291 652 | 331 653 | 654 | 655 | 656 | Crop The Image 657 | 658 | 659 | 660 | 661 | 150 662 | 40 663 | 81 664 | 41 665 | 666 | 667 | 668 | 669 | 670 | 671 | 50 672 | 40 673 | 91 674 | 41 675 | 676 | 677 | 678 | Top 679 | 680 | 681 | 682 | 683 | 684 | 150 685 | 90 686 | 81 687 | 41 688 | 689 | 690 | 691 | 692 | 693 | 694 | 50 695 | 180 696 | 91 697 | 41 698 | 699 | 700 | 701 | Height 702 | 703 | 704 | 705 | 706 | 707 | 150 708 | 140 709 | 81 710 | 41 711 | 712 | 713 | 714 | 715 | 716 | 717 | 50 718 | 90 719 | 91 720 | 41 721 | 722 | 723 | 724 | Left 725 | 726 | 727 | 728 | 729 | 730 | 150 731 | 190 732 | 81 733 | 41 734 | 735 | 736 | 737 | 738 | 739 | 740 | 50 741 | 140 742 | 91 743 | 41 744 | 745 | 746 | 747 | Width 748 | 749 | 750 | 751 | 752 | 753 | 100 754 | 250 755 | 94 756 | 32 757 | 758 | 759 | 760 | Crop 761 | 762 | 763 | 764 | 765 | 766 | 767 | 709 768 | 60 769 | 301 770 | 361 771 | 772 | 773 | 774 | Write On Image 775 | 776 | 777 | 778 | 779 | 110 780 | 290 781 | 94 782 | 32 783 | 784 | 785 | 786 | Apply 787 | 788 | 789 | 790 | 791 | 792 | 30 793 | 70 794 | 63 795 | 20 796 | 797 | 798 | 799 | Text 800 | 801 | 802 | 803 | 804 | 805 | 10 806 | 170 807 | 63 808 | 20 809 | 810 | 811 | 812 | Position-X 813 | 814 | 815 | 816 | 817 | 818 | 10 819 | 210 820 | 63 821 | 20 822 | 823 | 824 | 825 | Position-Y 826 | 827 | 828 | 829 | 830 | 831 | 80 832 | 60 833 | 221 834 | 41 835 | 836 | 837 | 838 | 839 | 840 | 841 | 80 842 | 160 843 | 113 844 | 41 845 | 846 | 847 | 848 | 849 | 850 | 851 | 80 852 | 210 853 | 113 854 | 41 855 | 856 | 857 | 858 | 859 | 860 | 861 | 80 862 | 110 863 | 113 864 | 41 865 | 866 | 867 | 868 | 869 | 870 | 871 | 10 872 | 120 873 | 63 874 | 20 875 | 876 | 877 | 878 | Font Size 879 | 880 | 881 | 882 | 883 | 884 | 885 | 710 886 | 30 887 | 311 888 | 381 889 | 890 | 891 | 892 | Mapping 893 | 894 | 895 | 896 | 897 | 100 898 | 330 899 | 94 900 | 32 901 | 902 | 903 | 904 | Apply 905 | 906 | 907 | 908 | 909 | 910 | 10 911 | 70 912 | 71 913 | 20 914 | 915 | 916 | 917 | Img-WIdth 918 | 919 | 920 | 921 | 922 | 923 | 10 924 | 120 925 | 71 926 | 20 927 | 928 | 929 | 930 | Img-Height 931 | 932 | 933 | 934 | 935 | 936 | 130 937 | 60 938 | 113 939 | 32 940 | 941 | 942 | 943 | 944 | 945 | 946 | 130 947 | 110 948 | 113 949 | 32 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 0 961 | 0 962 | 1045 963 | 25 964 | 965 | 966 | 967 | 968 | File 969 | 970 | 971 | 972 | 973 | 974 | 975 | Tools 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | Open Images 989 | 990 | 991 | 992 | 993 | Save Image 994 | 995 | 996 | 997 | 998 | Apply Filter 999 | 1000 | 1001 | 1002 | 1003 | Crop Image 1004 | 1005 | 1006 | 1007 | 1008 | Write Text On Imge 1009 | 1010 | 1011 | 1012 | 1013 | Mappin An Image 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | 2 | ## PyQT4 3 | #from PyQt4.QtCore import * 4 | #from PyQt4.QtGui import * 5 | 6 | #PyQT 5 7 | from PyQt5.QtCore import * 8 | from PyQt5.QtWidgets import * 9 | from PyQt5.QtGui import * 10 | 11 | ####################### 12 | import sys 13 | import os 14 | from PyQt5.uic import loadUiType 15 | from os import path 16 | from datetime import datetime 17 | from PIL import Image 18 | from PIL import ImageFilter 19 | from PIL import ImageDraw , ImageFont 20 | 21 | 22 | ## Load UI FIle 23 | FORM_CLASS,_=loadUiType(path.join(path.dirname(__file__),"editing.ui")) 24 | 25 | ## Empty List Contains The Images Names 26 | Images = [] 27 | 28 | class App_Window(QMainWindow , FORM_CLASS): 29 | def __init__(self): 30 | QMainWindow. __init__(self) 31 | self.setupUi(self) 32 | self.InitUi() 33 | self.Handel_Buttons() 34 | self.Handel_file_Menu() 35 | 36 | 37 | ## Handel Changes In Run Time 38 | def InitUi(self): 39 | self.tabWidget.setCurrentIndex(0) 40 | self.tabWidget.tabBar().setVisible(False) 41 | self.tabWidget_2.tabBar().setVisible(False) 42 | self.tabWidget_2.tabCloseRequested.connect(self.Close_Tab) 43 | self.groupBox.hide() 44 | self.groupBox_2.hide() 45 | self.groupBox_3.hide() 46 | self.groupBox_4.hide() 47 | 48 | 49 | 50 | 51 | ## Handel All The Buttons In The App 52 | def Handel_Buttons(self): 53 | self.pushButton.clicked.connect(self.Apply_Filter) 54 | self.pushButton_2.clicked.connect(self.Crop) 55 | self.pushButton_4.clicked.connect(self.Write_Text) 56 | self.pushButton_5.clicked.connect(self.Apply_Maping) 57 | 58 | 59 | ## Handel Menus Method 60 | def Handel_file_Menu(self): 61 | self.actionOpen_Images.triggered.connect(self.Load_Images) 62 | self.actionApply_Filter.triggered.connect(self.Show_Filters) 63 | self.actionCrop_Image.triggered.connect(self.Show_Crop) 64 | self.actionWrite_Text_On_Imge.triggered.connect(self.Show_Write_Text) 65 | self.actionMappin_An_Image.triggered.connect(self.Show_Maping_Tools) 66 | 67 | 68 | ##Load The Images Method 69 | def Load_Images(self): 70 | global Images 71 | image = QFileDialog.getOpenFileNames(self, 'Upload Your Image ', '/',"Image files (*.jpg *.gif *.png)") 72 | images = list(image) 73 | images.pop() # delete last value 74 | self.tabWidget_2.tabBar().setVisible(True) 75 | names = [] 76 | print(images) 77 | print('ـــــــــــــــــــــــــــــــــ') 78 | for x in images : 79 | name = 1 80 | for y in x : 81 | print(y) 82 | Images.append(y) 83 | tab = QWidget() 84 | lb = QLabel(tab) 85 | lb.resize(800,400) 86 | self.tabWidget_2.addTab(tab ,'Image'+str(name)) 87 | name += 1 88 | 89 | pixmap = QPixmap(y) 90 | lb.setPixmap((pixmap).scaled(lb.size(), Qt.KeepAspectRatio ,Qt.SmoothTransformation)) 91 | self.tabWidget_2.removeTab(0) 92 | 93 | 94 | 95 | 96 | ## Show The Hidden Filters 97 | def Show_Filters(self): 98 | self.groupBox_2.hide() 99 | self.groupBox.show() 100 | 101 | 102 | 103 | 104 | ## Apply The Selected Filter To The Image Ans Save It 105 | def Apply_Filter(self): 106 | global Images 107 | tab = self.tabWidget_2.currentIndex() 108 | image = Images[tab] 109 | 110 | pr_image = Image.open(image) 111 | 112 | if self.comboBox_2.currentIndex() == 0 : 113 | new_image = pr_image.filter(ImageFilter.BLUR) 114 | new_image.save('BLUR.jpg') 115 | 116 | elif self.comboBox_2.currentIndex() == 1 : 117 | new_image = pr_image.filter(ImageFilter.DETAIL) 118 | new_image.save('DETAIL.jpg') 119 | 120 | elif self.comboBox_2.currentIndex() == 2 : 121 | new_image = pr_image.filter(ImageFilter.CONTOUR) 122 | new_image.save('CONTOUR.jpg') 123 | 124 | 125 | elif self.comboBox_2.currentIndex() == 3 : 126 | new_image = pr_image.filter(ImageFilter.EDGE_ENHANCE) 127 | new_image.save('EDGE_ENHANCE.jpg') 128 | 129 | elif self.comboBox_2.currentIndex() == 4 : 130 | new_image = pr_image.filter(ImageFilter.EDGE_ENHANCE_MORE) 131 | new_image.save('EDGE_ENHANCE_MORE.jpg') 132 | 133 | 134 | elif self.comboBox_2.currentIndex() == 5 : 135 | new_image = pr_image.filter(ImageFilter.SMOOTH_MORE) 136 | new_image.save('SMOOTH_MORE.jpg') 137 | 138 | 139 | elif self.comboBox_2.currentIndex() == 6 : 140 | new_image = pr_image.filter(ImageFilter.EMBOSS) 141 | new_image.save('EMBOSS.jpg') 142 | 143 | 144 | elif self.comboBox_2.currentIndex() == 7 : 145 | new_image = pr_image.filter(ImageFilter.FIND_EDGES) 146 | new_image.save('FIND_EDGES.jpg') 147 | 148 | 149 | elif self.comboBox_2.currentIndex() == 8 : 150 | new_image = pr_image.filter(ImageFilter.SMOOTH) 151 | new_image.save('SMOOTH.jpg') 152 | 153 | 154 | elif self.comboBox_2.currentIndex() == 9 : 155 | new_image = pr_image.filter(ImageFilter.SHARPEN) 156 | new_image.save('SHARPEN.jpg') 157 | 158 | 159 | 160 | 161 | 162 | ## Show Crop Tools 163 | def Show_Crop(self): 164 | self.groupBox.hide() 165 | self.groupBox_2.show() 166 | 167 | 168 | 169 | 170 | ## Crop The Image 171 | def Crop(self): 172 | tab = self.tabWidget_2.currentIndex() 173 | image = Images[tab] 174 | pr_image = Image.open(image) 175 | 176 | top = int(self.lineEdit.text()) 177 | left = int(self.lineEdit_2.text()) 178 | width = int(self.lineEdit_3.text()) 179 | height = int(self.lineEdit_4.text()) 180 | 181 | area = (left, top, left+width, top+height) 182 | cropped_img = pr_image.crop(area) 183 | cropped_img.save('croped.jpg') 184 | 185 | 186 | 187 | 188 | ## SHow Write Text Tools 189 | def Show_Write_Text(self): 190 | self.groupBox.hide() 191 | self.groupBox_2.hide() 192 | self.groupBox_3.show() 193 | print('Done') 194 | 195 | 196 | 197 | 198 | ## Write Text On Image 199 | def Write_Text(self): 200 | tab = self.tabWidget_2.currentIndex() 201 | image = Images[tab] 202 | pr_image = Image.open(image) 203 | 204 | text = self.lineEdit_8.text() 205 | x = int(self.lineEdit_9.text()) 206 | y = int(self.lineEdit_10.text()) 207 | f_size = int(self.lineEdit_11.text()) 208 | 209 | draw = ImageDraw.Draw(pr_image) 210 | 211 | ##Load The Default Font 212 | font = ImageFont.load_default() 213 | 214 | #font_path = '/usr/share/fonts/TTF/DejaVuSansCondensed-BoldOblique.ttf' 215 | #font = ImageFont.truetype ( font_path, f_size ) 216 | 217 | draw.text((x, y), text, (255, 255, 255), font=font) 218 | pr_image.save('Text-On-Image.jpg') 219 | 220 | 221 | 222 | 223 | ## Show Mapping Tools 224 | def Show_Maping_Tools(self): 225 | self.groupBox.hide() 226 | self.groupBox_2.hide() 227 | self.groupBox_3.hide() 228 | self.groupBox_4.show() 229 | 230 | 231 | 232 | 233 | ## Apply Maping 234 | def Apply_Maping(self): 235 | width = int(self.lineEdit_12.text()) 236 | height = int(self.lineEdit_13.text()) 237 | 238 | img = Image.new('RGB', (width, height), "black") # create a new black image 239 | pixels = img.load() # create the pixel map 240 | 241 | for i in range(img.size[0]): # for every pixel: 242 | for j in range(img.size[1]): 243 | pixels[i, j] = (i, j, 100) # set the colour accordingly 244 | 245 | img.save('mapping.jpg') 246 | 247 | #pr_image = Image.open('mapping.jpg') 248 | 249 | 250 | ## Close Any Tab Using The [x] Button 251 | def Close_Tab(self): 252 | index = self.tabWidget_2.currentIndex() # the tap i openning now 253 | self.tabWidget_2.removeTab(index) 254 | 255 | 256 | 257 | 258 | ## App Main Function 259 | def main(): 260 | app = QApplication(sys.argv) 261 | window = App_Window() 262 | window.show() 263 | app.exec_() 264 | 265 | 266 | # Start The Main 267 | if __name__ == "__main__": 268 | main() --------------------------------------------------------------------------------