I found an error when reading with access='sequential' mode and rotation.
$ vips --version
vips-8.7.4-Fri Jan 18 12:51:47 UTC 2019
$ pip freeze | grep pyvips
pyvips==2.1.5
n [1]: import pyvips
In [2]: pyvips.cache_set_trace(True)
In [3]: img = pyvips.Image.new_from_file('./500px-Wikipedia-logo-v2.svg.png', access='sequential')
vips cache : pngload filename="./500px-Wikipedia-logo-v2.svg.png" out=((VipsImage*) 0x254f1b0) flags=((VipsForeignFlags) VIPS_FOREIGN_SEQUENTIAL) access=((Vi
psAccess) VIPS_ACCESS_SEQUENTIAL) -
In [4]: img_rot = img.rot90()
vips cache+: rot in=((VipsImage*) 0x254f1b0) out=((VipsImage*) 0x254f340) angle=((VipsAngle) VIPS_ANGLE_D90) -
In [5]: buf = img_rot.write_to_buffer('.jpg')
vips cache+: colourspace in=((VipsImage*) 0x254f340) out=((VipsImage*) 0x254f4d0) space=((VipsInterpretation) VIPS_INTERPRETATION_sRGB) -
vips cache : copy in=((VipsImage*) 0x254f4d0) out=((VipsImage*) 0x254f660) -
vips cache+: flatten in=((VipsImage*) 0x254f4d0) background=0 out=((VipsImage*) 0x254f020) -
vips cache+: cast in=((VipsImage*) 0x254f020) out=((VipsImage*) 0x254f7f0) format=((VipsBandFormat) VIPS_FORMAT_UCHAR) -
vips cache+: linecache in=((VipsImage*) 0x254fe30) out=((VipsImage*) 0x7f28740511a0) tile-height=8 access=((VipsAccess) VIPS_ACCESS_SEQUENTIAL) -
vips cache+: sequential in=((VipsImage*) 0x254fe30) out=((VipsImage*) 0x7f2874051010) tile-height=8 -
---------------------------------------------------------------------------
Error Traceback (most recent call last)
<ipython-input-5-2de37a5d6b3e> in <module>
----> 1 buf = img_rot.write_to_buffer('.jpg')
~/xxx/lib/python3.6/site-packages/pyvips/vimage.py in write_to_buffer(self, format_string, **kwargs)
546
547 return pyvips.Operation.call(name, self,
--> 548 string_options=options, **kwargs)
549
550 def write_to_memory(self):
~/xxx/lib/python3.6/site-packages/pyvips/voperation.py in call(operation_name, *args, **kwargs)
187 vop = vips_lib.vips_cache_operation_build(op.pointer)
188 if vop == ffi.NULL:
--> 189 raise Error('unable to call {0}'.format(operation_name))
190 op = Operation(vop)
191
Error: unable to call VipsForeignSaveJpegBuffer
vipspng: out of order read at line 456
vipspng: out of order read at line 456
vipspng: out of order read at line 456
vipspng: out of order read at line 456
vipspng: out of order read at line 456
vipspng: out of order read at line 456
vipspng: out of order read at line 456
vipspng: out of order read at line 456
vipspng: out of order read at line 456
I found an error when reading with access='sequential' mode and rotation.
I used this image.
I found some details:
And thanks for awesome lib :)
Version info:
Traceback: