Skip to content

Occasional image corruption with pseudo (and draw?) #617

@groucho86

Description

@groucho86

I'm sometimes getting "glitchy" imagery when my background uses "checkerboard" and I draw shapes. It happens about 40% of the time.

Code sample to (sometimes) reproduce the issue:

from wand.image import Image
from wand.color import Color
from wand.display import display
from wand.drawing import Drawing

for f in range(8):
    with Drawing() as fx_wand:
        
        with Image(width=640, height=360, background='white', pseudo='pattern:checkerboard') as img:
            img.metadata['colorspace:auto-grayscale'] = 'false' 
            img.metadata['PixelAspectRatio'] = str(1.0)
            img.colorspace='srgb'
            img.units = 'pixelsperinch'
            img.format='png'      
            img.resolution = 220       
            fx_wand.push_pattern('green_circle', 0, 0, 10, 10)
            fx_wand.fill_color = 'green'
            fx_wand.stroke_color = 'black'
            fx_wand.circle(origin=(5, 5), perimeter=(5, 0))
            fx_wand.pop_pattern()
            fx_wand.set_fill_pattern_url('#green_circle')
            fx_wand.rectangle(top=5, left=5, width=40, height=40)
            fx_wand.draw(img)
            display(img)

Out of the 8 rendered images, 3 exhibited glitches. Is this a bug or is there a proper method to avoid it?

glitchy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions