Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

image-dimensionjs

1.0.4 • Public • Published

image-dimensionjs

Description

pure js module get image size, image dimensions.

Browser

<script src="./image-dimension.js" ></script>
<script>
    console.log(JSON.stringify(ReadJPG(bytes)))
    console.log(JSON.stringify(ReadPNG(bytes)))
    console.log(JSON.stringify(ReadGIF(bytes)))
    console.log(JSON.stringify(ReadBMP(bytes)))
 
    console.log(JSON.stringify(ReadPNGBase64(base64)))
    console.log(JSON.stringify(ReadJPGBase64(base64)))
    console.log(JSON.stringify(ReadGIFBase64(base64)))
    console.log(JSON.stringify(ReadBMPBase64(base64)))
    
</script> 

Module

import { ReadJPG, ReadPNG, ReadGIF, ReadBMP } from './image-dimension.js'
 
console.log(JSON.stringify(ReadJPG(bytes)))
console.log(JSON.stringify(ReadPNG(bytes)))
console.log(JSON.stringify(ReadGIF(bytes)))
console.log(JSON.stringify(ReadBMP(bytes)))
 
console.log(JSON.stringify(ReadPNGBase64(base64)))
console.log(JSON.stringify(ReadJPGBase64(base64)))
console.log(JSON.stringify(ReadGIFBase64(base64)))
console.log(JSON.stringify(ReadBMPBase64(base64)))

Install

npm i image-dimensionjs

DownloadsWeekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

7.84 kB

Total Files

4

Last publish

Collaborators

  • avatar