Skip to content

Error: VipsJpeg: out of order read at line xxxx with rotation #96

@aflc

Description

@aflc

I found an error when reading with access='sequential' mode and rotation.

I used this image.

I found some details:

  • If using 200px png, no error occurred.
  • access='random' also OK.
  • Both write_to_buffer() and write_to_file() failed.

And thanks for awesome lib :)

Version info:

$ vips --version
vips-8.7.4-Fri Jan 18 12:51:47 UTC 2019
$ pip freeze | grep pyvips
pyvips==2.1.5

Traceback:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions