# f2i

> Converts text to image

Latest version **1.0.0** (published 2020-09-30) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install f2i
pnpm add f2i
yarn add f2i
bun add f2i
```

Provides the command `f2i`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-09-30 |
| First published | 2020-09-27 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 3.5 MB |
| Known vulnerabilities | 0 (+47 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Diego Ling |
| Maintainers | diegoling33 |

## Links

- npm: https://www.npmjs.com/package/f2i
- Repository: https://github.com/DiegoLing33/f2i
- Homepage: https://github.com/DiegoLing33/f2i#readme
- Issues: https://github.com/DiegoLing33/f2i/issues
- npm.io page: https://npm.io/package/f2i

## Dependencies (5)

- [jimp](https://npm.io/package/jimp.md) ^0.16.1
- [utf8](https://npm.io/package/utf8.md) ^3.0.0
- [electron](https://npm.io/package/electron.md) ^10.1.2
- [f2i.core](https://npm.io/package/f2i.core.md) ^1.0.0
- [typescript](https://npm.io/package/typescript.md) ^4.0.3

## Recent versions

- 1.0.0 (latest) — 2020-09-30
- 0.1.14 — 2020-09-30
- 0.1.13 — 2020-09-30
- 0.1.12 — 2020-09-30
- 0.1.11 — 2020-09-30
- 0.1.10 — 2020-09-30
- 0.1.9 — 2020-09-27
- 0.1.8 — 2020-09-27
- 0.1.7 — 2020-09-27
- 0.1.6 — 2020-09-27
- 0.1.5 — 2020-09-27
- 0.1.4 — 2020-09-27
- 0.1.3 — 2020-09-27
- 0.1.2 — 2020-09-27
- 0.1.1 — 2020-09-27
- … 1 more at https://npm.io/package/f2i/versions

## README

# F2I 1.0.0 &middot; [![GitHub license](https://img.shields.io/badge/license-Apache_2.0-green.svg)](https://github.com/DiegoLing33/f2i/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/f2i.svg?style=flat)](https://www.npmjs.com/package/f2i)
<img style="height: 100px" src="https://github.com/DiegoLing33/f2i/blob/master/resources/logo.png?raw=true" alt="logo" />

File to image utility

---
## Idea
Right now (version 0.1.0) you can only converts text to image and back again, but application contains the very simple algorithm
that allows encoding files in the future. I want to realize the system like "Path to Image", what about store and share your 
projects in images? Sounds interesting. Ok go...

## How to use?
### Installation:
Do installation **only** global
 
`yarn global add f2i`

### Encode and decode
Run `f2i` in the terminal and use UI application. Cli version right now in progress.

---

## API
*Recommended to use [f2i.core](https://github.com/DiegoLing33/f2i-core) package*

You can import library to create your own projects. Just import f2i.core
```javascript
import F2I from "f2i.core";
```
(*You should install it manually with `yarn add f2i.core`*)

### Text -> Image
```javascript
F2I.textToImage( text ).then( image => image.write( path ));
```

- Param `text` - this is the text to encode
- Param `path` - this is the path where image will be saved

### Image -> Text
```javascript
F2I.imagePathToText( path ).then(text => console.log(text));
```

- Param `path` - this is the path to your `png` image file

This function returns the `Promis<string>`.

---
UI Screen

<img style="width: 100%" src="https://github.com/DiegoLing33/f2i/blob/master/resources/image.png?raw=true" alt="screen" />

- Save image - Saves image as file (with your  text)
- Load image - Loads image and decode the text from it

(*PS: Image seems not good in the application, it's cuz of the small size of the image*)

---
_Source: https://npm.io/package/f2i · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
