docstr: Will resize the image proportionately based on maxwidth and maxheight.
  NOTE: This may effect the result of the detection algorithm.
  
  Return value is 0 if no change was made, 1 if the image was changed
  based on width, 2 if the image was changed based on height, 3 if it
  was changed on both
  
  maxwidth - The max size for the width of the picture
  maxheight - The max size for the height of the picture
  Both can be set to False to ignore
docstr_tok: ["Will","resize","the","image","proportionately","based","on","maxwidth","and","maxheight",".","NOTE",":","This","may","effect","the","result","of","the","detection","algorithm",".","Return","value","is","0","if","no","change","was","made",",","1","if","the","image","was","changed","based","on","width",",","2","if","the","image","was","changed","based","on","height",",","3","if","it","was","changed","on","both","maxwidth","-","The","max","size","for","the","width","of","the","picture","maxheight","-","The","max","size","for","the","height","of","the","picture","Both","can","be","set","to","False","to","ignore"]
code: def resize(self, maxwidth=1000, maxheight=1000):
      """
      Will resize the image proportionately based on maxwidth and maxheight.
      NOTE: This may effect the result of the detection algorithm.
  
      Return value is 0 if no change was made, 1 if the image was changed
      based on width, 2 if the image was changed based on height, 3 if it
      was changed on both
  
      maxwidth - The max size for the width of the picture
      maxheight - The max size for the height of the picture
      Both can be set to False to ignore
      """
      ret = 0
      if maxwidth:
          if self.width > maxwidth:
              wpercent = maxwidth / float(self.width)
              hsize = int((float(self.height) * float(wpercent)))
              fname = self.image.filename
              self.image = self.image.resize(
                  (maxwidth, hsize), Image.ANTIALIAS
              )
              self.image.filename = fname
              self.width, self.height = self.image.size
              self.total_pixels = self.width * self.height
              ret += 1
      if maxheight:
          if self.height > maxheight:
              hpercent = maxheight / float(self.height)
              wsize = int((float(self.width) * float(hpercent)))
              fname = self.image.filename
              self.image = self.image.resize(
                  (wsize, maxheight), Image.ANTIALIAS
              )
              self.image.filename = fname
              self.width, self.height = self.image.size
              self.total_pixels = self.width * self.height
              ret += 2
      return ret
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import copy
  import math
  import time
  from io import IOBase
  from PIL import Image
  from skin_classifier import skin_classifier, Skin
label_desc: Use image node_id 2 for calling the Nude obj's underlying member method code with example usage: obj.resize(maxwidth, maxheight) and returns: ret