Skip to content

Transforms images πŸ–Ό into assembly variables πŸ‘¨β€πŸ’» which can be used for graphic applications and simple games written in assembly.

License

Notifications You must be signed in to change notification settings

AdorianM/Assembly-From-Image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

83 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Assembly From Image

Getting started

Transform an image into an assembly variable.

Just drag & drop your PNG file to Serve.exe (or manually run the .py script with the png location as an argument) and you'll get a file containing the declaration of an assembly compatible variable.

image

Customization can be added if you run the application. A small interface with features like: selecting input/output location, selecting a variable name.

Additionally, an 8-bit image will result in an .inc file containing a byte array (values from 0 to 255), while any other image will result in a .inc file containing a dword array, with the values being the color values of the pixels.

If you want an 8-bit image to be converted to a dword array, make sure to check the 'forceRGB' checkbox, or to use the third argument for the script with any non-falsy value.

An input directory can be selected to convert all the images inside it. The directory input has priority over the file input in the case both are selected. Additionally, the directory should only contain image files.

image

Example project

The generated output is an .inc file which can be imported in any Assembly x86 code. For example, this could be used by a library with the capability to draw a canvas to show an image:

example output

Attention

Because of the limitation of the statement definition length, the generated .inc file will split the variable in multiple ones in case an image exceeds the horizontal length of 48px.

✨ More features on the way ✨

Hall of Projects

This is a list of wonderful projects that used this library. If you want yours added, let me know!

About

Transforms images πŸ–Ό into assembly variables πŸ‘¨β€πŸ’» which can be used for graphic applications and simple games written in assembly.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •