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

Respect background parameter in Image constructor #410

Closed
emcconville opened this issue May 2, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@emcconville
Copy link
Owner

commented May 2, 2019

This is a long & outstanding issue. Introduced with #184, wand defaults read operations with a transparent background.

# wand.image.Image.__init__
with Color('transparent') as bg:  # FIXME: parameterize this
     result = library.MagickSetBackgroundColor(self.wand, bg.resource)

This can conflicts with a few decoder delegates, and has some odd behavior with ImageMagick-7 that results in "blank" images.

Ideally, the background=... parameter should be respected, rather than a hard coded value. This allows users of vector formats to set canvas colors -- like #360.

Leaving the background unset, by default, also prevents corruption issues with newer versions PDF/TIFF libraries -- like #384, and #352.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.