Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/safrmo/data-uri-snippets

NPM package for commonly-used data URIs
https://github.com/safrmo/data-uri-snippets

Last synced: 6 days ago
JSON representation

NPM package for commonly-used data URIs

Awesome Lists containing this project

README

        

## What
Dictionary of commonly-used data URIs. Part of the [Phaser Component Library](https://github.com/SaFrMo/phaser-component-library).

## How

`npm install data-uri-snippets --save`

Then, in your JS:

```
import snippets from 'data-uri-snippets'

// white 1x1 pixel
var img = new Image()
img.src = snippets.white1x1png
```

## Values
* `white1x1` - 1x1 opaque white gif (35 bytes)
* `white1x1png` - 1x1 opaque white png (67 bytes)

## Sources
* [1x1 gif and png](http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html)