# python ShuffleClassify.py samples/WVW69ig4O90367uQIN.jpg from PIL import Image # PIL module. Only if you use the PIL library. from ShuffleClassifier import ShuffleClassifier import sys import config filepath = sys.argv[1] image = Image.open(filepath) image = image.crop(config.varBox) # Load Classifier mac = ShuffleClassifier() # ======================================== from dataNationalDex import list as listNationDex import os def try_support(nameIcon, namePokemon, typeIced="false"): pathIcon = "icons/" + nameIcon + ".png" if os.path.isfile(pathIcon): varSupportList.append((nameIcon, namePokemon, typeIced)) print("Loaded " + namePokemon + ": " + nameIcon) else: print("No icon found for path: " + pathIcon) # Try to Load Additional Icons
# end wxGlade from PIL import Image import pyscreenshot as ImageGrab import time, os, glob import ConfigParser from ShuffleClassifier import ShuffleClassifier import dataNationalDex, dataStageID import libImgConverter import libListWindowsX11 as libListWindows import config mac = ShuffleClassifier() # Frames from dialogSelectIcons import dialogSelectIcons from dialogNewIcon import dialogNewIcon from dialogListWindows import dialogListWindows class frameShuffleNew(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: frameShuffleNew.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.combo_StageID = wx.ComboBox(self, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN) self.sizer_2_staticbox = wx.StaticBox(self, wx.ID_ANY, _("Stage ID")) self.label_2 = wx.StaticText(self, wx.ID_ANY, _("Icons on board"), style=wx.ALIGN_LEFT) self.list_box_1 = wx.ListBox(self, wx.ID_ANY, choices=[], style=wx.LB_NEEDED_SB | wx.LB_SINGLE)
# -*- coding: utf-8 -*- # python ShuffleMakeIcons.py samples/WVW69ig4HC0o1_nAXC.jpg # python ShuffleMakeIcons.py samples/WVW69ig4LfQzEn6wy-.jpg from PIL import Image # PIL module. Only if you use the PIL library. from ShuffleClassifier import ShuffleClassifier import sys import config filepath = sys.argv[1] image = Image.open(filepath) image = image.crop(config.varBox) image.save('outputs/crop.png', 'PNG') # Load Classifier mac = ShuffleClassifier() # Import Image to Classifer mac.load_image2(image) # Save Blocks mac.save_blocks() quit()
# python ShuffleClassify.py samples/WVW69ig4O90367uQIN.jpg from PIL import Image # PIL module. Only if you use the PIL library. from ShuffleClassifier import ShuffleClassifier import sys import config filepath = sys.argv[1] image = Image.open(filepath) image = image.crop(config.varBox) # Load Classifier mac = ShuffleClassifier() #======================================== from dataNationalDex import list as listNationDex import os def try_support(nameIcon, namePokemon, typeIced='false'): pathIcon = 'icons/' + nameIcon + '.png' if os.path.isfile(pathIcon): varSupportList.append((nameIcon, namePokemon, typeIced)) print("Loaded " + namePokemon + ": " + nameIcon) else: print("No icon found for path: " + pathIcon) # Try to Load Additional Icons
# -*- coding: utf-8 -*- # python ShuffleMakeIcons.py samples/WVW69ig4HC0o1_nAXC.jpg # python ShuffleMakeIcons.py samples/WVW69ig4LfQzEn6wy-.jpg from PIL import Image # PIL module. Only if you use the PIL library. from ShuffleClassifier import ShuffleClassifier import sys import config filepath = sys.argv[1] image = Image.open(filepath) image = image.crop(config.varBox) image.save('outputs/crop.png','PNG') # Load Classifier mac = ShuffleClassifier() # Import Image to Classifer mac.load_image2(image) # Save Blocks mac.save_blocks() quit()