def open(cls, fp, mode="rb"): i = cls() _aware.j2k_set_input_image(i._j2k_object_p, fp.read()) return i
def open(cls, fp, mode="rb"): i = cls() if isinstance(fp, basestring): fp = open(fp, "rb") _aware.j2k_set_input_image(i._j2k_object_p, fp.read()) return i