New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

image-wasm-for-war3

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-wasm-for-war3 - npm Package Compare versions

Comparing version 2.0.0-alpha.2 to 2.0.0

2

package.json
{
"name": "image-wasm-for-war3",
"version": "2.0.0-alpha.2",
"version": "2.0.0",
"description": "image process by wasm",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -55,3 +55,3 @@ "use strict";

const jpegHeaderSize = view.getUint32(this.blpHeader.size, true);
const jpegHeader = new Uint8Array(buffer, this.blpHeader.size + 4, jpegHeaderSize);
const jpegHeader = this.buffer.slice(this.blpHeader.size + 4, this.blpHeader.size + 4 + jpegHeaderSize);
this.jpegHeader = {

@@ -72,3 +72,3 @@ size: jpegHeaderSize,

}
getMimapData(index = 0) {
async getMimapData(index = 0) {
if (index >= this.mipmapsCount) {

@@ -97,7 +97,7 @@ throw new Error(`index [${index}] out of range ${this.mipmapsCount}`);

// bgra
const palette = new Uint8Array(this.buffer, this.blpHeader.size, 256 * 4); // 调色板
const palette = this.buffer.slice(this.blpHeader.size, this.blpHeader.size + 256 * 4); // 调色板
const size = width * height;
const sourcePixels = new Uint8Array(buffer, 0, size); // 原始像素
const sourcePixels = buffer.slice(0, size); // 原始像素
const out = new Uint8Array(size * 4);
const alpha = new Uint8Array(buffer, size); // alpha通道
const alpha = buffer.slice(size); // alpha通道
switch (this.headerValue.alphaBits) {

@@ -104,0 +104,0 @@ case 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