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
Hi
Wand 0.5.4
In wand.image.Image.export_pixel(), the width and height variables are treated like they are right and top variables respectively. This the calculation for the rectangle to export in image.py export_pixels()@3651
total_pixels= (width-x) * (height-y)
Here is some code to test this claim and comments above each line are the errors I got:
from wand.image import Image
from wand.color import Color
withImage(width=50, height=50, background=Color("Green")) asimage:
x=10y=10width=20height=10# [1] 86502 segmentation fault# export = image.export_pixels(x=x, y=y, width=width, height=height)# No issue here# export = image.export_pixels(x=x, y=y, width=width + x, height=height + y)""" python3(86545,0x7fff6b0635c0) malloc: Incorrect checksum for freed object 0x10401ea00: probably modified after being freed. Corrupt value: 0xff008000ff008000 python3(86545,0x7fff6b0635c0) malloc: *** set a breakpoint in malloc_error_break to debug [1] 86545 abort python3 testing/wand_test.py """# export = image.export_pixels(x=10, y=10, width=30, height=30)# export = image.export_pixels(x=5, y=5, width=20, height=50)""" I can't remember how I got this one Assertion failed: (image->cache != (Cache) NULL), function DestroyImagePixels, file MagickCore/cache.c, line 907. [1] 86171 abort python3 testing/wand_test.py """
The text was updated successfully, but these errors were encountered:
I'll have this resolved & create some additional unit tests to cover this. Probably in the next few hours.
I can't remember how I got this one
No worries - just post a new Issue if you recreate it. Pretty sure the last one is an expected exception for authenticated pixels. The fix for the previous error should clean up the failed assertion.
Please verify the master branch -- if you can. The Image.import_pixels() method also suffered from the same bug, so that might be worth checking out too.
To run this issue's unit-test, just run the following statement...
Hi again,
I re-cloned the repo, ran git log and got:
commit ac5faa3 (HEAD -> master, origin/master, origin/HEAD)
Author: E. McConville
Date: Mon May 20 20:42:51 2019 -0500
Hi
Wand 0.5.4
In wand.image.Image.export_pixel(), the width and height variables are treated like they are right and top variables respectively.
This the calculation for the rectangle to export in image.py export_pixels()@3651
Here is some code to test this claim and comments above each line are the errors I got:
from wand.image import Image
from wand.color import Color
The text was updated successfully, but these errors were encountered: