mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
commit
10d88db4ab
@ -1,5 +1,5 @@
|
|||||||
# Requirements: numpy, scipy, Pillow,
|
# Requirements: numpy, scipy, Pillow,
|
||||||
|
from __future__ import print_function
|
||||||
import sys
|
import sys
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from scipy import ndimage
|
from scipy import ndimage
|
||||||
@ -59,7 +59,7 @@ def save_image(data, outfilename, src_image):
|
|||||||
|
|
||||||
|
|
||||||
def roberts_cross(infilename, outfilename):
|
def roberts_cross(infilename, outfilename):
|
||||||
print "Processing", infilename
|
print("Processing", infilename)
|
||||||
img = Image.open(infilename)
|
img = Image.open(infilename)
|
||||||
img.load()
|
img.load()
|
||||||
img = img.filter(ImageFilter.GaussianBlur(0.5))
|
img = img.filter(ImageFilter.GaussianBlur(0.5))
|
||||||
@ -72,7 +72,7 @@ def roberts_cross(infilename, outfilename):
|
|||||||
|
|
||||||
|
|
||||||
def generateUiPreview(srcPath, buildingId):
|
def generateUiPreview(srcPath, buildingId):
|
||||||
print srcPath, buildingId
|
print(srcPath, buildingId)
|
||||||
img = Image.open(srcPath)
|
img = Image.open(srcPath)
|
||||||
img.load()
|
img.load()
|
||||||
img.thumbnail((110, 110), Image.ANTIALIAS)
|
img.thumbnail((110, 110), Image.ANTIALIAS)
|
||||||
|
Loading…
Reference in New Issue
Block a user