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
First of all, I'd just like to thank you so much for this incredible tool!
In the README it is stated that the to_image() method takes conversion_kwargs and links to this which has parameters such as background, yet the only parameter it actually seems to take is resolution. This leads to errors such as to_image() got an unexpected keyword argument 'background' when attempting to change the default background. Am I doing something wrong or does the documentation not quite match up with the functionality? If so is there a work-around or if not I'd be more than happy to contribute to try and add this functionality.
README
Method
Description
.to_image(**conversion_kwargs)
Returns an instance of the PageImage class. For more details, see "Visual debugging" below. For conversion_kwargs, see here.
Function
defto_image(self, resolution=None):
""" For conversion_kwargs, see http://docs.wand-py.org/en/latest/wand/image.html#wand.image.Image """from .displayimportPageImage, DEFAULT_RESOLUTIONres=resolutionorDEFAULT_RESOLUTIONreturnPageImage(self, resolution=res)
The text was updated successfully, but these errors were encountered:
Hi @OisinMoran, and thank you for flagging this! That does seem to be a bug. I'll aim to fix it in a future release. In the meantime, I think you should be able fix it locally by changing that function to the following:
defto_image(self, **conversion_kwargs):
""" For conversion_kwargs, see http://docs.wand-py.org/en/latest/wand/image.html#wand.image.Image """from .displayimportPageImage, DEFAULT_RESOLUTIONkwargs=dict(conversion_kwargs)
if"resolution"notinconversion_kwargs:
kwargs["resolution"] =DEFAULT_RESOLUTIONreturnPageImage(self, **kwargs)
First of all, I'd just like to thank you so much for this incredible tool!
In the
README
it is stated that theto_image()
method takesconversion_kwargs
and links to this which has parameters such asbackground
, yet the only parameter it actually seems to take isresolution
. This leads to errors such asto_image() got an unexpected keyword argument 'background'
when attempting to change the default background. Am I doing something wrong or does the documentation not quite match up with the functionality? If so is there a work-around or if not I'd be more than happy to contribute to try and add this functionality.README
.to_image(**conversion_kwargs)
PageImage
class. For more details, see "Visual debugging" below. For conversion_kwargs, see here.Function
The text was updated successfully, but these errors were encountered: