Convert bitmap images to seeds for Tiny-83 NFT project.

Overview

What is this?

This tool allows you to convert any 14p high and 22p wide Bitmap (.bmp) to the seed needed for the Tiny-83 NFT project.

Project Twitter: https://twitter.com/TINY83_nft

Project Open Sea: https://opensea.io/collection/tiny-83

Minting Page: https://tiny-83.github.io/tiny-83/

My Twitter: https://twitter.com/shib_maximalist

My Open Sea: https://opensea.io/shib_maximalist

Usage

Create an image with 22x14 pixels and save it as bitmap (.bmp). When you save it, set the coloer depth to 1-Bit. This way pixels will eithe rbe switched on or off (0|1). I used paint.net

Windows

git clone https://github.com/shib-maximalist/tiny_83_image_converter
cd tiny_83_image_converter
py -m pip install -r requirements.txt
py main.py

Linux

git clone https://github.com/shib-maximalist/tiny_83_image_converter
cd tiny_83_image_converter
pip install -r requirements.txt
python main.py

How does it work?

When I played arround with the minting page
I noticed that the two seed value had a very distinctive influence on the outcome on the screen:


(1,1)


(2,2)


(3,3)

Notice something? Thats binary! Both panes (left and right) are composed of 11x14 pixels. Thats 154 pixels per pane and 308 for the whole image. What we need is a way to address the pixels individually.

Let's start with our Image:

I took the OHM logo, resized it and edited it to be a 14x22 bitmap. The Image is displayed blury because it's upscaled by a factor of 10 and your browser tries to fill in the gaps with filtering techniques that do not apply to pixel art. The original size pixture is below the big one.



Ohm (3,3)

We use these two lines to open the image and turn it into a matrix

image = im.open(img_path)
image_array = np.array(image)

This matrix ist just a two-dimensional array that represents where a pixel is black (0) and where a pixel is white (1). We can use an IDE to visualize how it looks:


Matrix representation of our image

This matrix gives us a mask which we can apply to the canvas (panes). Imagine it like a sieve. If we pour color on it the canvas will only get painted where the sieve permits it. But what is the canvas? The canvas consists of two panes called left and right. We currently have only one matrix so we have to split it in the middle:

left_split, right_split = np.split(image_array, 2, axis=1)


Left and Right Matrix

We did not answer the question what the canvas is. The canvas is this:

slot_map_left = np.array([2 ** x for x in range(h*w)])
slot_map_right = np.array([2 ** x for x in range(h*w)])

This is the magic trick. Each pixel on the canvas (on both individual panes) can be addressed binary via a 2 ** x address. The pixel in the top left corner has the address 2 ** 0 The pixel in the bottom right corner has the address 2 ** 153

The above commands generate two 1-dimensional arrays representing each pixel address per pane. All we have to do now is to multiply these address arrays with their masks:

zip_left_slots = slot_map_left * left_split
zip_right_slots = slot_map_right * right_split

The resulting arrays only contain addresses for pixels that we ant to colour (actually it's the pixels we don't want to color but in the end it's the same). The last step is to generate the single number seed from it:

left = zip_left_slots.sum()
right = zip_right_slots.sum()

Why do we sum up the whole array? Because it's binary! Summing the binary addresses is the same as a binary AND. Awesome! We end up with:

Left:	21764133429535165757682873043452904982125215743 
Right:	22835963083295327415964576320725097856141869054

Let's enter them into the :


Minting preview

SUCCESS!

I am the original creator of the OHM(3,3) Tiny Calculator. Every other one copied my seed. If you want the original you can get it here: https://opensea.io/assets/0x7deb38a22694608a58b28970320d39ee50e7bc0f/652


The original OHM(3,3) calculator.

Owner
shib_maximalist
shib_maximalist
Image-Viewer is a Windows image viewer based on Python 3.

Image-Viewer Hi! Image-Viewer is a Windows image viewer based on Python 3. Using You must download Image-Viewer.exe from the root of the repository. T

2 Apr 18, 2022
This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.

Freedom to build what you want FreeCAD is an open-source parametric 3D modeler made primarily to design real-life objects of any size. Parametric modeling allows you to easily modify your design by g

FreeCAD 12.9k Jan 07, 2023
Photini - A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS.

A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS. "Metadata" is said to mea

Jim Easterbrook 120 Dec 20, 2022
A warping based image translation model focusing on upper body synthesis.

Pose2Img Upper body image synthesis from skeleton(Keypoints). Sub module in the ICCV-2021 paper "Speech Drives Templates: Co-Speech Gesture Synthesis

zhiyh 15 Nov 10, 2022
Maze generator with most popular shapes - hexagon, triangle, square

Maze-Generator Maze generator with most popular shapes - hexagon, triangle, square (sqaure not implemented yet): Theory: Planar Graph https://en.wikip

Kacper Plesiak 2 Dec 28, 2021
【萝莉图片算法】高损图像压缩算法!?

【萝莉图片算法】高损图像压缩算法!? 我又发明出新算法了! 这次我发明的是新型高损图像压缩算法——萝莉图片算法!为什么是萝莉图片,这是因为它是使动用法,让图片变小所以是萝莉图片,大家一定要学好语文哦! 压缩效果 太神奇了!压缩率竟然高达99.97%! 与常见压缩算法对比 在图片最终大小为1KB的情况

黄巍 49 Oct 17, 2022
A simple image-level annotation tool supporting multi-channel images for napari.

napari-labelimg4classification A simple image-level annotation tool supporting multi-channel images for napari. This napari plugin was generated with

4 May 16, 2022
Me cleaner - Tool for partial deblobbing of Intel ME/TXE firmware images

me_cleaner me_cleaner is a Python script able to modify an Intel ME firmware image with the final purpose of reducing its ability to interact with the

Nicola Corna 4.1k Jan 08, 2023
python app to turn a photograph into a cartoon

Draw This. Draw This is a polaroid camera that draws cartoons. You point, and shoot - and out pops a cartoon; the camera's best interpretation of what

Dan Macnish 2k Dec 19, 2022
A script to generate a profile picture and a banner that show the same image on Discord.

Discord profile picture & banner generator A script to generate a profile picture and a banner that show the same image on Discord. Installation / Upd

Victor B. 9 Nov 27, 2022
💯 Watermark your images with one line of command

Watermarker 💯 Watermark your images with one line of command 🧐 $ pip3 install

Orhan Emre Dikicigil 3 May 01, 2022
Paper backup of files using QR codes

Generate paper backups for Linux. Currently command-linux Linux only. Takes any file, and outputs a "paper backup": a printable black-and-white pdf fu

Zachary Vance 27 Dec 28, 2022
QR Generator using GUI with Tinker

BinCat Token System Very simple python script with GUI that generates QR codes. It don't include a QR "decription" tool. It only generate-it and thats

Hipotesi 1 Nov 06, 2021
Hide sensitive information in images

Data-Preserved Script allowing to blur the most sensitive information on images. Prerequisites Before you begin, ensure you have met the following req

2 Dec 01, 2021
Sombra is simple Raytracer written in pure Python.

Sombra Sombra is simple Raytracer written in pure Python. It's main purpose is to help understand how raytracing works with a clean code. If you are l

Hernaldo Jesus Henriquez Nuñez 10 Jul 16, 2022
Black-white image converter - Black-white photo colorization

Black-white image converter - Black-white photo colorization

1 Jan 02, 2022
Script for the creation of metadatas and the randomization of images of MekaVerse

MekaVerse-random Script for the creation of metadata and the randomization of images of MekaVerse Step to replay the random : Create a folder : output

Miinded 8 Sep 07, 2022
This Github Action automatically creates a GIF from a given web page to display on your project README

This Github Action automatically creates a GIF from a given web page to display on your project README

Pablo Lecolinet 28 Dec 15, 2022
Forza painter app with python

forza-painter Discord: A-Dawg#0001 (AE) Supports: Forza Horizon 5 Offically (OTHER v1.405.2.0, MS STORE v3.414.967.0, STEAM v1.414.967.0) Unofficially

320 Dec 31, 2022
Utilities for SteamVR on Linux

This project contains scripts to improve the functionally of SteamVR on Linux:

86 Dec 29, 2022