I added the ability to duplicate ImBuf object as request by ideasman in
Devtalk Python Image API thread
also see Manifest
Example code
py >>> import imbuf >>> import copy >>> i1 = imbuf.new([12,12]) >>> i2 = i1.copy() >>> i3 = i1.deepcopy() >>> i4 = copy.copy(i1) >>> i5 = copy.deepcopy(i1) >>> i1 <imbuf: address=0x00000131224890B8, filename='', size=(12, 12)> >>> i2 <imbuf: address=0x00000131224890B8, filename='', size=(12, 12)> >>> i3 <imbuf: address=0x0000013122489AC8, filename='', size=(12, 12)> >>> i4 <imbuf: address=0x00000131224890B8, filename='', size=(12, 12)> >>> i5 <imbuf: address=0x000001312248A4D8, filename='', size=(12, 12)> >>> i1.resize([24,24]) >>> i1 <imbuf: address=0x00000131224890B8, filename='', size=(24, 24)> >>> i2 <imbuf: address=0x00000131224890B8, filename='', size=(24, 24)> >>> i3 <imbuf: address=0x0000013122489AC8, filename='', size=(12, 12)> >>> i4 <imbuf: address=0x00000131224890B8, filename='', size=(24, 24)> >>> i5 <imbuf: address=0x000001312248A4D8, filename='', size=(12, 12)>