Installations
npm install react-native-buffer-image-size
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
9.6.1
NPM Version
5.6.0
Score
70.5
Supply Chain
88.6
Quality
74.8
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
naikipl
Download Statistics
Total Downloads
1,462
Last Day
1
Last Week
3
Last Month
10
Last Year
125
GitHub Statistics
247 Commits
3 Branches
1 Contributors
Package Meta Information
Latest Version
0.6.5
Package Id
react-native-buffer-image-size@0.6.5
Unpacked Size
16.29 kB
Size
5.89 kB
File Count
18
NPM Version
5.6.0
Node Version
9.6.1
Total Downloads
Cumulative downloads
Total Downloads
1,462
Last day
0%
1
Compared to previous day
Last week
200%
3
Compared to previous week
Last month
-41.2%
10
Compared to previous month
Last year
-2.3%
125
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
react-native-buffer-image-size
A Node module to get dimensions of any image file buffer
Fork of buffer-image-size
This fork ensures compatibility with Browsers & React Native.
Supported formats
- BMP
- CUR
- GIF
- ICO
- JPEG
- PNG
- PSD
TIFF(no buffer support)- WebP
- SVG
- DDS
Install
npm install react-native-buffer-image-size --save
Usage
1var sizeOf = require('react-native-buffer-image-size'); 2var dimensions = sizeOf(imageBuffer); 3console.log(dimensions.width, dimensions.height);
Multi-size
If the target file is an icon (.ico) or a cursor (.cur), an images
array is available and returns the dimensions of all the available images.
1var sizeOf = require('react-native-buffer-image-size'); 2var images = sizeOf(icoBuffer).images; 3for (const dimensions of images) { 4 console.log(dimensions.width, dimensions.height); 5}
URL
1var url = require('url'); 2var http = require('http'); 3 4var sizeOf = require('react-native-buffer-image-size'); 5 6var imageUrl = 'http://my-amazing-website.com/image.jpeg'; 7var options = url.parse(imageUrl); 8 9http.get(options, function (response) { 10 var chunks = []; 11 response.on('data', function (chunk) { 12 chunks.push(chunk); 13 }).on('end', function() { 14 var buffer = Buffer.concat(chunks); 15 console.log(sizeOf(buffer)); 16 }); 17});
You can optionally check the buffer lengths & stop downloading the image after a few kilobytes. You don't need to download the entire image.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
52 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-675m-85rw-j3w4
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3
- Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2024-12-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to react-native-buffer-image-size
@xdanangelxoqenpm/officiis-unde-iusto
[![npm version][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] [![build status][build-image]][build-url] [![minzipped size][bundlephobia-image]][bundlephobia-url] [![Dependency count][depcount-image]][npm-url]
@crabas0npm/aspernatur-facilis-cupiditate
[![Travis Build Status][travis-image]][travis-url] [![Test Coverage][codecov-image]][codecov-url] [![Bundle Size][bundlephobia-image]][bundlephobia-url]