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
MikuMikuRig是一款集生成控制器,自动导入动画,自动布料为一体的blender插件

Miku_Miku_Rig MikuMikuRig是一款集生成控制器,自动导入动画,自动布料为一体的blender插件。 MikumiKurig is a Blender plugin that can generates rig, automatically imports animations

小威廉伯爵 342 Dec 29, 2022
This script is for photographers to do timeslice with one click.

One Click TimeSlice Tool What is this for This is for photographers who want to create TimeSlice pictures without installing PS plugins. Before using

Xi Zhao 13 Sep 23, 2022
reversable image censoring tool

StupidCensor a REVERSABLE image censoring tool to reversably mosiac censor jpeg files to temporarily remove image details not allowed on most websites

2 Jan 28, 2022
Collection of SVG diagrams about how UTF-8 works

Diagrams Repository of diagrams made for articles on my blog. All diagrams are created using diagrams.net. UTF-8 Licenses Copyright 2022 Seth Michael

Seth Michael Larson 24 Aug 13, 2022
View images in the terminal using ansi escape codes and python

terminal-photo-viewer view images in the terminal using ansi escape codes and python !! Only tested on Ubuntu 20.04.3 LTS with python version 3.8.10 D

1 Nov 30, 2021
Python pygame project that turns your images to matrix rain

Matrix-Rain-An-Image This project implements the classic Matrix digital rain effect in python with pygame to build up an image provided with multiple

7 Dec 11, 2022
Simple Python image processing & automatization project for a simple web based game

What is this? Simple Python image processing & automatization project for a simple web based game Made using only Github Copilot (except the color and

SGeri 2 Aug 15, 2022
This is an app that allows users to upload photos and display and store the photos in a file until the user deletes them.

Qt Photo App This is an app that allows users to upload photos and display and store the photos in a file until the user deletes them. Setup python3 -

Kathy Yang 5 Jan 22, 2022
Fast Image Retrieval (FIRe) is an open source image retrieval project

Fast Image Retrieval (FIRe) is an open source image retrieval project release by Center of Image and Signal Processing Lab (CISiP Lab), Universiti Malaya. This project implements most of the major bi

CISiP Lab 39 Nov 25, 2022
Tweet2Image - Convert tweets to Instagram-friendly images.

Convert tweets to Instagram-friendly images. How to use If you want to use this repository as a submodule, don't forget to put the fonts d

Janu Lingeswaran 1 Mar 11, 2022
Simple utility to tinker with OPlus images

OPlus image utilities Prerequisites Linux running kernel 5.4 or up (check with uname -r) Image rebuilding Used to rebuild read-only erofs images into

Wiley Lau 15 Dec 28, 2022
QR-code Generator with a basic GUI.

Qr_generator_python Qr code generator with a basic GUI. ❔ About the QR-Code-Generator This project Generates QR codes to sites, e-mails and plain text

Tecixck 2 Oct 11, 2021
impy is an all-in-one image analysis library, equipped with parallel processing, GPU support, GUI based tools and so on.

impy is All You Need in Image Analysis impy is an all-in-one image analysis library, equipped with parallel processing, GPU support, GUI based tools a

24 Dec 20, 2022
Python avatar generator for absolute nerds

pagan Welcome to the Python Avatar Generator for Absolute Nerds. Current version: 0.4.3 View the change history here. Remember those good old days whe

David Bothe 280 Dec 16, 2022
Quickly 'anonymize' all people in an image. This script will put a black bar over all eye-pairs in an image

Face-Detacher Quickly 'anonymize' all people in an image. This script will put a black bar over all eye-pairs in an image This is a small python scrip

Don Cato 1 Oct 29, 2021
A suite of useful tools based on 3D interactivity in napari

napari-threedee A suite of useful tools based on 3D interactivity in napari This napari plugin was generated with Cookiecutter using @napari's cookiec

11 Dec 14, 2022
Group of interfaces interesting for users

Project: Interface to create GIF animation based on Fourier Series.

5 Aug 17, 2021
python binding for libvips using cffi

README PyPI package: https://pypi.python.org/pypi/pyvips conda package: https://anaconda.org/conda-forge/pyvips We have formatted docs online here: ht

libvips 467 Dec 30, 2022
Image comparison slider component for Streamlit

Streamlit Image Comparison Component A simple Streamlit Component to compare images with a slider in Streamlit apps using Knightlab's JuxtaposeJS. It

fatih 109 Dec 23, 2022