def resize_async(image_data, width=0, height=0, output_encoding=PNG, quality=None, correct_orientation=UNCHANGED_ORIENTATION, crop_to_fit=False, crop_offset_x=0.5, crop_offset_y=0.5, allow_stretch=False, rpc=None, transparent_substitution_rgb=None):
 image = Image(image_data)
 image.resize(width, height, crop_to_fit=crop_to_fit, crop_offset_x=crop_offset_x, crop_offset_y=crop_offset_y, allow_stretch=allow_stretch)
 image.set_correct_orientation(correct_orientation)
 return image.execute_transforms_async(output_encoding=output_encoding, quality=quality, rpc=rpc, transparent_substitution_rgb=transparent_substitution_rgb)

def resize_async ( image_data , width = 0 , height = 0 , output_encoding = PNG , quality = None , correct_orientation = UNCHANGED_ORIENTATION , crop_to_fit = False , crop_offset_x = 0.5 , crop_offset_y = 0.5 , allow_stretch = False , rpc = None , transparent_substitution_rgb = None ) : image = Image ( image_data ) image . resize ( width , height , crop_to_fit = crop_to_fit , crop_offset_x = crop_offset_x , crop_offset_y = crop_offset_y , allow_stretch = allow_stretch ) image . set_correct_orientation ( correct_orientation ) return image . execute_transforms_async ( output_encoding = output_encoding , quality = quality , rpc = rpc , transparent_substitution_rgb = transparent_substitution_rgb )
resize a given image file maintaining the aspect ratio - async version .