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
White artifacts around the image when rotating an ImageClip with a mask or just a png with transparency in angles that are not 0, 90, 180, 270 ( Added Examples to reproduce it )
#216
Closed
hgonzalezsgn opened this issue
Oct 7, 2015
· 4 comments
I just download the master and I have white artifacts around the image when rotating an ImageClip with a mask in angles that are not 0, 90, 180, 270 for example I used 60 and have the issue
hgonzalezsgn
changed the title
White artifacts around the image when rotating an ImageClip with a mask in angles that are not 0, 90, 180, 270
White artifacts around the image when rotating an ImageClip with a mask or just a png with transparency in angles that are not 0, 90, 180, 270 ( Added Examples to reproduce it )
Oct 7, 2015
It is not a bug just a parameter that need to be change.
You need to change the resample param which defaults to "bicubic" to "nearest" or "bilinear"
rotate(clip, angle, unit='deg', resample="bicubic", expand=True)
For example
imageWithRotation = image.rotate(60 , "deg", "nearest")
It is not a bug just a parameter that need to be change.
You need to change the resample param which defaults to "bicubic" to "nearest" or "bilinear" rotate(clip, angle, unit='deg', resample="bicubic", expand=True)
For example imageWithRotation = image.rotate(60 , "deg", "nearest")
Hi Zulko,
I just download the master and I have white artifacts around the image when rotating an ImageClip with a mask in angles that are not 0, 90, 180, 270 for example I used 60 and have the issue
The following is the code:
from moviepy.editor import *
mask = ImageClip("mask.png", ismask=True)
image = ImageClip("imageToTest.png", False)
imageWithRotation = image.set_mask(mask)
imageWithRotationAndMask = imageWithRotation.rotate(60)
imageWithRotationAndMask.save_frame("result.png")
This are the images used in the script and the result:
Thanks!
Hernan
The text was updated successfully, but these errors were encountered: