setup fixing
This commit is contained in:
parent
4d6631b03e
commit
12dc10e8c1
|
|
@ -2,7 +2,7 @@ from PyQt6.QtWidgets import QWidget, QVBoxLayout, QPushButton, QGroupBox
|
|||
from PyQt6.QtCore import pyqtSignal
|
||||
import numpy as np
|
||||
|
||||
from dialogs import DIALOGS
|
||||
from .dialogs import DIALOGS
|
||||
|
||||
DIALOG_PROPERTY = "dialog"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
from PyQt6.QtWidgets import QVBoxLayout, QHBoxLayout, QWidget, QApplication
|
||||
import sys
|
||||
from PyQt6.QtGui import QImage
|
||||
|
||||
from ImageCanvas import ImageCanvas
|
||||
from ImageManagePanel import ImageManagePanel
|
||||
from DialogsPanel import DialogsPanel
|
||||
from .ImageCanvas import ImageCanvas
|
||||
from .ImageManagePanel import ImageManagePanel
|
||||
from .DialogsPanel import DialogsPanel
|
||||
|
||||
class ImageEditor(QWidget):
|
||||
def __init__(self):
|
||||
|
|
@ -57,12 +57,3 @@ class ImageEditor(QWidget):
|
|||
self.canvas.updatePixmap(QImage(image.data, width, height, bytes_per_line, QImage.Format.Format_RGB888))
|
||||
|
||||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
editor = ImageEditor()
|
||||
editor.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from PyQt6.QtGui import QIcon
|
|||
from PyQt6.QtCore import pyqtSignal
|
||||
import numpy as np
|
||||
|
||||
from ImageManager import ImageManager
|
||||
from .ImageManager import ImageManager
|
||||
class ImageManagePanel(QWidget):
|
||||
on_update = pyqtSignal(np.ndarray)
|
||||
on_close = pyqtSignal()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from PyQt6.QtWidgets import QVBoxLayout, QLabel, QSlider
|
|||
from PyQt6.QtCore import Qt
|
||||
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
import ImageProcessingWorker
|
||||
from .. import ImageProcessingWorker
|
||||
|
||||
class BrightnessContrastDialog(ImageParameterDialog):
|
||||
def __init__(self, image):
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from PyQt6.QtWidgets import QVBoxLayout, QLabel, QSlider, QHBoxLayout, QGroupBox
|
|||
from PyQt6.QtCore import Qt
|
||||
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
import ImageProcessingWorker
|
||||
from .. import ImageProcessingWorker
|
||||
|
||||
class ColorBalanceDialog(ImageParameterDialog):
|
||||
def __init__(self, image):
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from PyQt6.QtWidgets import QVBoxLayout, QLabel, QCheckBox
|
|||
import cv2
|
||||
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
import ImageProcessingWorker
|
||||
from .. import ImageProcessingWorker
|
||||
|
||||
class FlipDialog(ImageParameterDialog):
|
||||
def __init__(self, image):
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import numpy as np
|
|||
from PyQt6.QtWidgets import QLabel, QVBoxLayout, QSlider
|
||||
from PyQt6.QtCore import Qt
|
||||
|
||||
import ImageProcessingWorker
|
||||
from .. import ImageProcessingWorker
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import cv2
|
|||
from PyQt6.QtWidgets import QLabel, QVBoxLayout, QHBoxLayout, QLineEdit, QCheckBox, QComboBox
|
||||
from PyQt6.QtGui import QIntValidator
|
||||
|
||||
import ImageProcessingWorker
|
||||
from .. import ImageProcessingWorker
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
from PyQt6.QtWidgets import QLabel, QVBoxLayout, QHBoxLayout, QLineEdit, QCheckBox, QSlider
|
||||
from PyQt6.QtGui import QIntValidator
|
||||
from PyQt6.QtCore import Qt
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
import ImageProcessingWorker
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
from .. import ImageProcessingWorker
|
||||
|
||||
class RotationDialog(ImageParameterDialog):
|
||||
def __init__(self, image):
|
||||
super().__init__(image, ImageProcessingWorker.ImageProcessingWorker)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import numpy as np
|
|||
from PyQt6.QtWidgets import QVBoxLayout, QLabel, QSlider
|
||||
from PyQt6.QtCore import Qt
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
import ImageProcessingWorker
|
||||
from .. import ImageProcessingWorker
|
||||
|
||||
class SaturationDialog(ImageParameterDialog):
|
||||
def __init__(self, image):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
from PyQt6.QtWidgets import QVBoxLayout, QLabel, QSlider
|
||||
from PyQt6.QtCore import Qt
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
import ImageProcessingWorker
|
||||
import numpy as np
|
||||
|
||||
from .ImageParameterDialog import ImageParameterDialog
|
||||
from .. import ImageProcessingWorker
|
||||
|
||||
class TemperatureAdjustmentDialog(ImageParameterDialog):
|
||||
def __init__(self, image):
|
||||
super().__init__(image, ImageProcessingWorker.RGBImageProcessingWorker)
|
||||
|
|
|
|||
12
jezyki-skryptowe/image-editor/editor/image_editor.py
Normal file
12
jezyki-skryptowe/image-editor/editor/image_editor.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import sys
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
from .ImageEditor import ImageEditor
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
editor = ImageEditor()
|
||||
editor.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -7,11 +7,11 @@ setup(
|
|||
install_requires=[
|
||||
"numpy",
|
||||
"opencv-python",
|
||||
"PyQt6"
|
||||
"PyQt6==6.4.2"
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'run-image-editor=editor.ImageEditor:main',
|
||||
'run-image-editor=editor.image_editor:main',
|
||||
],
|
||||
},
|
||||
classifiers=[
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user