An open API service indexing awesome lists of open source software.

https://github.com/shirommakkad/imagetoprime

Turns an Image into a Prime Number
https://github.com/shirommakkad/imagetoprime

Last synced: 3 months ago
JSON representation

Turns an Image into a Prime Number

Awesome Lists containing this project

README

        

# ImageToPrime
Turns an Image into a Prime Number

## Inspiration

I was inspired by a numberphile video on the Trinity Hall Prime which I've linked to below.

### The Trinity Hall Prime - Numberphile
[![The Trinity Hall Prime - Numberphile](https://img.youtube.com/vi/fQQ8IiTWHhg/0.jpg)](https://www.youtube.com/watch?v=fQQ8IiTWHhg)

The prime shown is an image of the crest of Trinity Hall, the college that it is displayed at. The prime number shown has 1350 digits corresponding with the founding of the college. This program will take in any image and output a prime that looks like it.

## Results
### My Name
#### Input
![Shirom Raw Image](https://i.imgur.com/cl6Kntg.png)

#### Output
![Shirom Output Image](https://i.imgur.com/bzcjWsV.png)

This image has 2000 digits, which corresponds to my birth year.
### School Logo
#### Input
![School Raw Image](https://i.imgur.com/rV5THMg.png)

#### Output
![School Output Image](https://i.imgur.com/GvxTDoI.png)

This image has 1910 digits, corresponding with the founding date of my school.
### New Trinity Hall Prime
#### Input
![New Trinity Hall Raw Image](https://i.imgur.com/Lx5Lf9H.png)

#### Output
![New Trinity Hall Raw Image](https://i.imgur.com/62DRvFW.png)

## Usage
There are three options when creating a prime:
#### Option 1: Integrate Prime Into Image
This will create a Prime number out of the image you gave. When finding a prime number, not all the digits at the end will perfectly match with the image. Sometimes that overlaps into the image and you lose some of the content.
#### Option 2: Appened Prime Under Image
This appends a line under the image and all of the modifications on the number happen on that line
#### Option 3: Exact Area
This creates a prime with the exact number of digits you specify in the area box. This may leave a partial line at the end.

## Installation
Just download the executable jar from the repository, and you're all set!