From 4f7dd1c4cdbee3c9d49416f89f2c98951e52e351 Mon Sep 17 00:00:00 2001 From: Voussoir Date: Tue, 16 Dec 2014 01:23:31 -0800 Subject: [PATCH] else else --- Dots/dots.py | 3 +++ Pixelify/pixelify.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dots/dots.py b/Dots/dots.py index ffd9d49..4f88024 100644 --- a/Dots/dots.py +++ b/Dots/dots.py @@ -58,6 +58,7 @@ class CanvasGame: self.canvas.coords(self.player, x-self.player_radius, y-self.player_radius, x+self.player_radius, y+self.player_radius) + self.label_coordinates.configure(text="%d, %d" % (self.player_x, self.player_y)) time.sleep(0.017) def numbercap(self, i, cap): @@ -106,6 +107,8 @@ class CanvasGame: self.velocity_speedup = 0.6 self.entities = [] + self.label_coordinates = tkinter.Label(self.canvas, text="0, 0") + self.label_coordinates.place(x=self.gamewidthcenter, y=self.gameheight-10, anchor="c") self.canvas.bind("", self.pushkey) self.canvas.bind("", self.releasekey) diff --git a/Pixelify/pixelify.py b/Pixelify/pixelify.py index 29a487f..9532cb9 100644 --- a/Pixelify/pixelify.py +++ b/Pixelify/pixelify.py @@ -1,5 +1,6 @@ from PIL import Image import os +import urllib.request def boot(): path = input("Path to image or directory\n> ") @@ -67,7 +68,8 @@ def pixelify(path, objectives=[32], subfolder="pixel", outpath=""): parts = name.split('.') newpath = outpath + parts[0] + '_' + str(objective) + '.' + parts[1] - nimage.save(newpath) + nimage.save(newpath, quality=100) + if __name__ == "__main__": while True: