OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Rotate image clip causes strange pixel effect

  • Thread starter Thread starter Linda Lawton - DaImTo
  • Start date Start date
L

Linda Lawton - DaImTo

Guest
I have an image clip which I am applying a rotate to

Code:
image_clp_rotated = image_clip.fx(mp.vfx.rotate, rotate_emoji, expand=False)

The method

Code:
def rotate_emoji(t):
    """Calculates the rotation angle for each frame."""
    if int(t) % 3 == 0:
        return -20
    elif int(t) % 2 == 0:
        return 20
    else:
        return 0

This is the image before rotate is applied

enter image description here

This is the image after it has been rotated.

enter image description here

Why is the circle effected like this?

Note:

Image clip is a CompositeVideoClip of the circle and the emoji clips.

Code:
image_clip= CompositeVideoClip([circle_image_clp, emoji_image_clp])
<p>I have an image clip which I am applying a rotate to</p>
<pre><code>image_clp_rotated = image_clip.fx(mp.vfx.rotate, rotate_emoji, expand=False)
</code></pre>
<p>The method</p>
<pre><code>def rotate_emoji(t):
"""Calculates the rotation angle for each frame."""
if int(t) % 3 == 0:
return -20
elif int(t) % 2 == 0:
return 20
else:
return 0
</code></pre>
<p>This is the image before rotate is applied</p>
<p><a href="https://i.sstatic.net/65azlyqB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/65azlyqB.png" alt="enter image description here" /></a></p>
<p>This is the image after it has been rotated.</p>
<p><a href="https://i.sstatic.net/AJ66DOS8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AJ66DOS8.png" alt="enter image description here" /></a></p>
<p>Why is the circle effected like this?</p>
<p>Note:</p>
<p>Image clip is a CompositeVideoClip of the circle and the emoji clips.</p>
<pre><code>image_clip= CompositeVideoClip([circle_image_clp, emoji_image_clp])
</code></pre>
 

Latest posts

J
Replies
0
Views
1
jbowerbir
J
Top