You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with the new Region.fetch functionality, and I encountered an unexpected result. When I operate from a pipeline, it behaves as expected, but when operating from a .v file opened directly, it gives nonsensical buffer lengths:
importpyvips# version 2.1.6b=pyvips.Image.black(1000, 1000)
reg=pyvips.Region.new(b)
print('buffer len from pipeline: ', len(reg.fetch(0, 0, 100, 100)))
b.write_to_file('black.v')
v_file=pyvips.Image.new_from_file('black.v')
reg2=pyvips.Region.new(v_file)
print('buffer len from v file: ', len(reg2.fetch(0, 0, 100, 100)))
print('v_file:', v_file)
reg3=pyvips.Region.new(v_file.cast('uchar'))
print('buffer len from v file in a do-nothing pipeline: ', len(reg3.fetch(0, 0, 100, 100)))
The result is as follows:
buffer len from pipeline: 10000 # expected
buffer len from v file: 356000 # unexpected
v_file: <pyvips.Image 1000x1000 uchar, 1 bands, multiband>
buffer len from v file in a do-nothing pipeline: 10000 # expected
Many thanks in advance for taking a look.
The text was updated successfully, but these errors were encountered:
Hi John,
I'm experimenting with the new Region.fetch functionality, and I encountered an unexpected result. When I operate from a pipeline, it behaves as expected, but when operating from a .v file opened directly, it gives nonsensical buffer lengths:
The result is as follows:
Many thanks in advance for taking a look.
The text was updated successfully, but these errors were encountered: