You are probably looking for this: https://aware.dev/tools/img2brs
- Convert .jpg and .png to Brickadia save files.
- (Advanced) Create vertical and horizontal
- (Advanced) Customize brick size
- (Advanced) Customize brick type
- (Advanced) Customize brick materials
Install the latest version of img2brs:
Drag and drop the image you want to convert onto img2brs
Advanced usage for customizing the save requires modifying shortcut target or using the command line.
Usage: img2brs [options] [filepath]
Options:
-v, --vertical false
-s, --size "5 5 2"
-b, --brick_type 0
-m, --material 0
-ra, --remove_alpha false
-o, --offset "0 0 0"
If vertical recieves anything other than "true" it will be false.
- Must be in the format "x y z" (with quotes).
- x and y must be a multiple of 5.
- z must be a multiple of 2.
- DefaultBrick
- DefaultTile
- Plastic
- Glow
- Metallic
- Hologram
If an image has a pixel with its alpha value < 255, a brick will not be made for it.
- Must be in the format "x y z" (with quotes).
- Uses microshift units.
- A 1x1 plate is 10 units wide and 4 units tall.
- A 1x1 brick is 10 units wide and 12 units tall.
To create an image vertically.
C:\path\to\img2brs> img2brs --vertical true ./path/to/image.png
To create an image with glowing material.
C:\path\to\img2brs> img2brs --material 1 true ./path/to/image.png
To create an image vertically, made out of 2x2x2 tile cubes with a metallic material.
C:\path\to\img2brs> img2brs --vertical true --size "10 10 10" -b 1 -m 2 ./path/to/image.png
This fails to load bricks because the size is incorrect. The first 2 values must be multiples of 5 and the last a multiple of 2.
C:\path\to\img2brs> img2brs --size "1 1 1" ./path/to/image.png
- Right click img2brs.exe
- Click "Create shortcut"
- Right click the new shortcut
- Under "Target" you should see something along the lines of
C:\path\to\img2brs.exe
- Add the options so it looks something like:
C:\path\to\img2brs.exe --vertical true --size "10 10 10" --brick_type 1 --material 2
- Now you can drag and drop images onto the shortcut and it will use these options
- Run
wasm-pack build
to generate a JavaScript package