Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GimpDocument raises Exception: Parasites=0 Strokes=1 for files with vectors #7

Open
ismaelharunid opened this issue Apr 2, 2021 · 0 comments

Comments

@ismaelharunid
Copy link

ismaelharunid commented Apr 2, 2021

GimpDocument raises Exception: Parasites=0 Strokes=1 for files with vectors (or in my case, maybe it's not any and all vectors)

For:

doc = GimpDocument(imagepath)
```

Full Exceptuion dump:

bytearray(b'\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x08\x00\x00\x00\x1bSelection #1 stroke 1 copy\x00\x00\x00\x00\x9b\x00\x00\x00')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ismael/miniconda3/lib/python3.7/site-packages/gimpFormats/gimpXcfDocument.py", line 394, in __init__
    self.load(filename)
  File "/home/ismael/miniconda3/lib/python3.7/site-packages/gimpFormats/gimpXcfDocument.py", line 410, in load
    self._decode_(data)
  File "/home/ismael/miniconda3/lib/python3.7/site-packages/gimpFormats/gimpXcfDocument.py", line 432, in _decode_
    self._propertiesDecode_(io)
  File "/home/ismael/miniconda3/lib/python3.7/site-packages/gimpFormats/gimpIOBase.py", line 641, in _propertiesDecode_
    self._propertyDecode_(propertyType,io.getBytes(dataLength))
  File "/home/ismael/miniconda3/lib/python3.7/site-packages/gimpFormats/gimpIOBase.py", line 417, in _propertyDecode_
    self._vectorsDecode_(data)
  File "/home/ismael/miniconda3/lib/python3.7/site-packages/gimpFormats/gimpIOBase.py", line 284, in _vectorsDecode_
    index=gv.fromBytes(data,index)
  File "/home/ismael/miniconda3/lib/python3.7/site-packages/gimpFormats/gimpVectors.py", line 55, in fromBytes
    raise Exception('Parasites=%d Strokes=%d'%(numParasites,numStrokes))
Exception: Parasites=0 Strokes=1

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant