StylMorph logoStylMorph.

Image Converter for MakeCode Arcade

Convert a PNG, JPG or WebP into a MakeCode Arcade sprite. Preview its 15-color palette, preserve transparency and copy img code or download PNG and TypeScript.

Open the tool
The same mountain-lake image shown at full size and as a coarse MakeCode Arcade image
Choose a photo or drawing

PNG, JPG or WebP · up to 10 MiB and 24 megapixels

Free · processed in your browser · no generation credits

Choose an image or try the sample.

Sample landscape converted to a 32 by 21 MakeCode image

Sample result. Choose an image or use the sample to create your download.

From a full-size image to a usable Arcade sprite

Make a photo or drawing small enough to become game art. This image converter for MakeCode Arcade resizes the whole image and maps it to the default palette. The preview, PNG and TypeScript all use the same indexed pixels, so you can inspect the result before pasting it into a project.

From source image to finished file

  1. Choose a PNG, JPG or WebP. A simple subject with a clear silhouette works best at sprite size.
  2. Choose a longest edge of 16, 32 or 64 pixels. Keep the default Arcade palette in your project when checking the result.
  3. Copy the img code, or download the TypeScript. Paste it into a MakeCode Arcade JavaScript project and inspect the sprite in the simulator.

Convert the landscape sample at 32 pixels

Choose the landscape sample and a longest edge of 32 pixels. It becomes a 32 × 21 image using the default Arcade palette. The PNG and TypeScript below contain the same pixels. At this size the broad landscape works better as a background than as a detailed character. The TypeScript example creates a player sprite. To use the image as a game background, use the exported image expression in your project’s background setup.

Download this PNGDownload the matching TypeScript
Actual 32 by 21 landscape mapped to the MakeCode Arcade default colors
32 × 21 pixels · default palette

Choose a size before judging the colors

A 16-pixel sprite favors a bold silhouette: a fruit, icon or small prop. A 32-pixel sprite gives a character more room. At 64 pixels you can retain larger features, but a photo still loses fine texture. The chosen value is the longest edge; the other edge follows the original aspect ratio, with no crop or stretched pixels.

The preview is deliberately enlarged with crisp edges. Judge whether the subject is recognizable when it is small. If the eyes or outline disappear, try a tighter source crop before increasing the output size.

Understand 15 colors and transparent index 0

MakeCode Arcade stores image pixels as palette indices. Index 0 is transparent; the default palette has 15 visible color entries. This converter maps opaque pixels to those visible entries, including opaque black at index f. It uses a transparent dot only where the source alpha is below 128.

A white photograph background remains visible white. If you need a cut-out character, prepare a transparent PNG first. Changing your project palette later changes how the same indices appear, so a custom-palette project should be checked against the default palette or converted with a matching palette tool.

Move the exported image into your project

Copy img code for an image expression you can place inside your own sprite call. Download TypeScript for a small example that creates mySprite as SpriteKind.Player. Paste into MakeCode Arcade’s JavaScript editor, keeping only one declaration with that variable name.

Open the sprite image editor or simulator and check the width, height, transparency and colors. A background image has a different role from a player sprite; use the image expression with the appropriate API for your project. The downloadable PNG is useful for reviewing the same indexed result outside the editor.

Fix an unrecognizable sprite

Reduce background clutter, crop to the subject and favor a clear outline. Flat lighting and distinct large color regions usually survive palette reduction better than small highlights or patterned clothing. Dark colors can merge; try a brighter source with more separation around the subject.

This workflow targets the default MakeCode Arcade palette and img syntax. For monochrome Arduino or ESP displays, use Image to C Array instead. For an existing pixel-art image that needs larger square pixels, use an editor with nearest-neighbor scaling. These are different output formats and should be chosen by the receiving project.

The official MakeCode Arcade image reference explains palette indices, transparent color 0 and custom-palette imports.

Questions about MakeCode images

Does it work with MakeCode Arcade?

The exported expression uses Arcade img syntax and its default 15 visible colors plus transparent index 0. Paste it into an Arcade JavaScript project and check it in the simulator.

Can I use JPG, PNG or WebP?

Yes, up to 10 MiB and 24 megapixels. Use PNG for source transparency. Each export contains one static image.

Can it make a sprite sheet?

Each export represents one image. For sheets with multiple frames, use the official Arcade asset-import workflow linked below.

Why are the colors different?

The source is reduced to the default Arcade palette. A project with a custom palette can display different colors for those indices.

How is transparency handled?

Pixels with alpha below 128 become index 0. Other pixels become opaque palette colors. JPG has no transparent pixels.

Will it crop my photo?

The whole image is fitted to the selected longest edge. The aspect ratio is retained, with rounding to whole pixels. Crop the source first when you want a tighter subject.

What is inside the TypeScript file?

An img expression assigned to picture and a sprites.create call that makes mySprite. Rename variables when your project already uses those names.

Does this use AI credits?

No. Resize, palette mapping, code generation and PNG export run locally in your browser.