Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
szou28 committed Nov 21, 2017
1 parent a20fce8 commit 1085cb1
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def EnsureIntArray(arr):
a = np.around(a)
if np.all(np.array(arr) == a):
return a
raise ValueError("Invalid integer in array!")


@staticmethod
def Max(output):
Expand Down Expand Up @@ -221,21 +223,3 @@ def LossyJPGAndBack(imagePixels, numRows, numCols, isColor, photoquality, isRowO
newImage = cv2.imread(tmpImage)
newImagePixels = UDraw.FromBitmap(newImage, *newImage.shape, isColor, isRowOrder)
return newImagePixels

class Cmd(object):
def RunOptionSet(opt, args):
show_help = False
p = opt.append("help", "Show this message and exit", )
try:
extra = p.Parse(args)
except OptionException, e:
print e.Message
print "Try `--help' for more information."
Environment.Exit(0)
finally:
if show_help:
print "Options:"
p.WriteOptionDescriptions(Console.Out)
Environment.Exit(0)

RunOptionSet = staticmethod(RunOptionSet)

0 comments on commit 1085cb1

Please sign in to comment.