Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zoom-image-data

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zoom-image-data - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

2

package.json
{
"name": "zoom-image-data",
"version": "2.0.4",
"version": "2.0.5",
"description": "zoom-image-data",

@@ -5,0 +5,0 @@ "exports": {

@@ -102,3 +102,3 @@ # zoom-image-data

### 5. 使用
以下为将一个原宽高为10*10的图像按宽高比为2绘制到指定宽高canvas元素
以下为将一个原宽高为64*64的图像按宽高比为2绘制到指定宽高canvas元素。[示例网站](https://fengqing1101.github.io/zoom-image-data/)
##### html

@@ -125,4 +125,4 @@ ```html

const canvas = document.getElementById('canvas');
const inw = 10;
const inh = 10;
const inw = 64;
const inh = 64;
const inData = new ArrayBuffer(inw * inh * 4);

@@ -143,5 +143,5 @@ const outw = document.body.clientWidth;

cellRatio: 2,
cellWH: 8,
cellWH: 4,
splitCell: true,
splitCellSize: 8,
splitCellSize: 10,
})

@@ -167,3 +167,9 @@

function fillInData() {
transferImageData.inData.fill(4291611705);
const { inw, inh, inData } = transferImageData;
for (let y = 0; y < inh; y++) {
const s = 4291611705 - y * 512;
for (let x = 0; x < inw; x++) {
inData[y * inw + x] = s + x * 3;
}
}
}

@@ -170,0 +176,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc