/RandomPixelImage

generate a Pixel image

Primary LanguageJavaScript

RandomPixelToImage

  • Usage:

import { RandomPixel2CompressedBitmap, CompressedBitmap2URL } from './util'

var cp = RandomPixel2CompressedBitmap();//generate the random picel array

var image = CompressedBitmap2URL(cp)//create the src.url with the blob

  • In your Html:

< img width="40" height="40" src=image>

  • Display:

e1

e2

e3