示例#1
0
 def open(cls, fp, mode="rb"):
     i = cls()
     _aware.j2k_set_input_image(i._j2k_object_p, fp.read())
     return i
示例#2
0
 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