# CleanEdge - rotate your images without blurring (my first extension)

**URL:** <https://forum.makecode.com/t/cleanedge-rotate-your-images-without-blurring-my-first-extension/38585>\
**Category:** Show & Tell\
**Tags:** graphics-and-math, extension\
**Created:** [August 10, 2025, 12:25am UTC](https://forum.makecode.com/t/cleanedge-rotate-your-images-without-blurring-my-first-extension/38585 "2025-08-10T00:25:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marupio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/marupio/32/19728_2.png) [@Marupio](https://forum.makecode.com/u/Marupio)\
**Post date:** [August 10, 2025, 12:25am UTC](https://forum.makecode.com/t/cleanedge-rotate-your-images-without-blurring-my-first-extension/38585/1 "2025-08-10T00:25:31Z")

</div>

Hey guys, after a few weekends, I’ve created my first extension. This one will rotate a sprite’s image by any degree, and doesn’t suffer from blurring.

I’m not too sure what to do about it, other than give it to my son, who was asking for this functionality.

It’s a port of [torcado’s cleanEdge](https://torcado.com/cleanEdge/) project. Here’s the github link to the extension:

[github.com/Marupio/arcade-cleanEdge](https://github.com/Marupio/arcade-cleanEdge)

This gives you a single block that takes the sprite image as an input, and returns the rotated image. It doesn’t work directly with Sprites at the moment.

It’s a bit laggy, so maybe next version should create a cache of images when first created, then summon the correct image as needed. It also could use some fine-tuning to make the images come out a bit better.

Here’s a demo app I created:

> **[Test Clean Edge](https://arcade.makecode.com/S25258-35965-30612-91616)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

The demo shows two sprites, one that rotates nicely, and the other with fine details that get muddled by the algorithm. It does have limitations, especially around fine details.  
Enjoy, all who care to try it!

All the best!

---

<div class="post-metadata">

**Author:** ![BotWarrior](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/botwarrior/32/25328_2.png) [@BotWarrior](https://forum.makecode.com/u/BotWarrior)\
**Post date:** [August 10, 2025, 8:27pm UTC](https://forum.makecode.com/t/cleanedge-rotate-your-images-without-blurring-my-first-extension/38585/2 "2025-08-10T20:27:33Z")

</div>

I always love to see more rotation algorithms. Great work on the extension, I am excited to see what you do with it. You could maybe take a look at sprite rot, which runs pretty well. [Having a Blast with MakeCode Arcade! - #6 by AlexK](https://forum.makecode.com/t/having-a-blast-with-makecode-arcade/59/6)  
@AlexK since it was your rotation extension, do you have any tips or thoughts?

---

<div class="post-metadata">

**Author:** ![Marupio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/marupio/32/19728_2.png) [@Marupio](https://forum.makecode.com/u/Marupio)\
**Post date:** [August 25, 2025, 3:18am UTC](https://forum.makecode.com/t/cleanedge-rotate-your-images-without-blurring-my-first-extension/38585/3 "2025-08-25T03:18:13Z")

</div>

Thanks, BotWarrior!

I did have a look at the other rotation / scaling extension. It does interpolation, so it’s not as fancy as torcado’s cleanEdge work, but it is much faster.

I’ve been slowly adding to it. There are 7 new blocks now. It now rotates around a point, it can precalculate all rotations to speed things up. It scales now too (torcado originally did a scaling algorithm as well). Other minor changes to the interface as well.

I will continue working on this… albeit slowly!

Thanks for the encouragement!

---

<div class="post-metadata">

**Author:** ![BotWarrior](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/botwarrior/32/25328_2.png) [@BotWarrior](https://forum.makecode.com/u/BotWarrior)\
**Post date:** [August 25, 2025, 4:42pm UTC](https://forum.makecode.com/t/cleanedge-rotate-your-images-without-blurring-my-first-extension/38585/4 "2025-08-25T16:42:00Z")

</div>

I might have to use your extension in the future! I often have a vast amount of projectiles sharing the same image, pre-calculating all images at the start could considerably speed up the process. Keep up the good work 🙂
