resizeImage(img, max_width, max_height) {
    const sizes = this.getImageNewAspectSizes(img, max_width, max_height);
    const width = sizes.width;
    const height = sizes.height;
    const canvas = this.imageToCanvas(img, width, height);
    return canvas;
    //return this.getImageByCanvas(canvas);
  }
Resize image
@param {Image} img
@param {Number} max_width
@param {Number} max_height
@returns {Promise} success(Image), fail(error)