bassvorti.blogg.se

Wxpython imageviewer
Wxpython imageviewer







wxpython imageviewer
  1. WXPYTHON IMAGEVIEWER UPDATE
  2. WXPYTHON IMAGEVIEWER CODE

# Feeding the panel with an image when starting the program works # create the static box with the panel description.ĬomPageStatBox = wx.StaticBox(self, wx.ID_ANY, "Comic Page")ĬomPageStatBoxSizer = wx.StaticBoxSizer(comPageStatBox, wx.VERTICAL) Sizer.Add(speeBubImg, wx.ID_ANY, flag=wx.EXPAND|wx.ALL)

wxpython imageviewer

SpeeBubImg = wx.StaticBox(self, wx.ID_ANY, "Text Editor") I appreciate any constructive help and feedback you can give me. It also reproduces the faulty result which you can see on the screenshot.

wxpython imageviewer

WXPYTHON IMAGEVIEWER CODE

I also had a look at this photo viewer tutorial at Mouse vs Python, but I could't get it to work in my program.īelow is the code I have so far.

WXPYTHON IMAGEVIEWER UPDATE

However, when I try to update the panel with another image via the open file- or open directory-dialog it does not display correctly (see screenshot).įrom what I read so far about updating panels ( wxpython refresh window on button press, wxPython - change panel by button, How do you force refresh of a wx.Panel?) it is not enough to just recall the function responsible for creating the sub panel, but I seem to oversee or miss something elementary because I cannot get any of the proposed solutions to work in my code. When I feed an image to the panel at the start of the program, it shows correctly. Make a decent python package: add a license, packaging, setup etc.I'm a beginner at python and programming for that matter and trying to implement a rudimentary image viewer and having trouble to update the sub panel, in which the image should be shown.Since this is a first try, there are many things to improve, for example: You need to change some code in image_viewer.py TODO With the same label, there will be several keys that will perform the same action: move an image to the same folder.įor now, the action will be bound to the keys 1-9 so you can not add more then 9 actions. Note that a subdirectory will be made for each label, with exactly the name of the label. By default 1 = delete and 2 = good, but you can useĪny label you want by changing in settings.pyĭEFAULT_ACTION_NAMES = The DEFAULT_ACTION_NAMES will be bound to the keys. SOURCE_DIRECTORY = '/home/user/Pictures/categorize_this/' You can also skip this step by specifying the SOURCE_DIRECTORY in the settings. You can select a directory in a dialog when you launch the program. Only image files in one directory will be considered. Jpeg is the default, if you want other extensions, you canĭEFAULT_ALLOWED_EXTENSIONS = Only images with a specific extension are considered. $ python image_viewer.py Configuration and settings will copy the current image name without the extension to the clipboard will undo the last action: put the image back in the main folder Only move the file to a folder called 'delete') keys will move the current image to the corresponding folder. So when I browse through my images, I can launch an action based on the current filename parameters on every image that I approve. For example, at some point I will write a few lines to parse the parameters from the filename to trigger an action. These kind of actions can easily be adjusted in the code. 'Ctrl-c' will put the current image name (without extension) to the clipboard, so you can paste it elsewhere. I also want to copy the filename in some cases, since I encode parameters in the filename of my images. This means: put images in a subdirectory by pressing one key (and immediately navigate to the next one). This ImageViewer is made to organize images as fast as possible. It does work already for me, I use small images (~400kb).

wxpython imageviewer

To check it out, but don't expect a robust well tested program at this point. Note: this is the first TKinter program I ever made. Image Viewer - organize images as fast as possible









Wxpython imageviewer