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

@3846masa/bmp

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@3846masa/bmp - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

lib/convert.js

2

lib/polyfill.js

@@ -1,1 +0,1 @@

!function(){"use strict";const t=URL.createObjectURL(new Blob([`(${()=>{const t=Uint8Array.from(atob("Qk0AAAAAAAAAAHoAAABsAAAAAAAAAAAAAAABACAAAwAAAAAAAADDDgAAww4AAAAAAAAAAAAA/wAAAAD/AAAAAP8AAAAA/0JHUnM"),(t=>t.charCodeAt(0))),e=122,A="navigator"in globalThis&&/Trident|Edge/.test(navigator.userAgent);onmessage=({data:[n,a,s,o,r]})=>{try{const i=(({width:n,height:a,data:s},o)=>{const r=Object.assign({strict:!1},o),i=s.byteLength,g=e+i,h=new Uint8Array(g),c=new DataView(h.buffer),w=(t,e)=>c.setUint32(t,e,!0);if(h.set(t),w(2,g),w(18,n),w(22,-a),w(34,i),h.set(s,e),r.strict||A){w(54,16711680),w(62,255);for(let t=0;t<i;t+=4)h[e+t]=s[t+2],h[124+t]=s[t]}return h})({width:a,height:s,data:new Uint8Array(o)},r);postMessage([n,i.buffer],[i.buffer])}catch(t){postMessage([n,void 0,t])}}}})()`])),e=new Worker(t),A=new Map;e.onmessage=({data:[t,e,n]})=>{const[a,s]=A.get(t);A.delete(t),e?a(new Uint8Array(e)):s(Object.assign(new Error,n))};const n=HTMLCanvasElement.prototype,a=n.toBlob;n.toBlob=function(t,n,s){if("image/bmp"!==n.toLowerCase())return a.call(this,t,n,s);const{width:o,height:r}=this;let i=this.getContext("2d");if(!i){i=this.cloneNode(!1).getContext("2d"),i.drawImage(this,0,0)}(({width:t,height:n,data:a},s)=>new Promise(((o,r)=>{const i=""+Date.now()+Math.random();A.set(i,[o,r]),e.postMessage([i,t,n,a.buffer,s],[a.buffer])})))(i.getImageData(0,0,o,r)).then((e=>t(new Blob([e],{type:"image/bmp"}))))}}();
!function(){"use strict";const A=URL.createObjectURL(new Blob([`(${()=>{const A=Uint8Array.from(atob("Qk0AAAAAAAAAAHoAAABsAAAAAAAAAAAAAAABACAAAwAAAAAAAADDDgAAww4AAAAAAAAAAAAA/wAAAAD/AAAAAP8AAAAA/0JHUnM"),(A=>A.charCodeAt(0))),t=122,e="navigator"in globalThis&&/Trident|Edge/.test(navigator.userAgent);onmessage=({data:[n,a,r,s,i]})=>{try{const o=(({width:n,height:a,data:r},s)=>{const i=Object.assign({strict:!1},s),o=r.byteLength,c=t+o,g=new Uint8Array(c),w=new DataView(g.buffer),d=(A,t)=>w.setUint32(A,t,!0);if(g.set(A),d(2,c),d(18,n),d(22,-a),d(34,o),g.set(r,t),i.strict||e){d(54,16711680),d(62,255);for(let A=0;A<o;A+=4)g[t+A]=r[A+2],g[124+A]=r[A]}return g})({width:a,height:r,data:new Uint8Array(s)},i);postMessage([n,o.buffer],[o.buffer])}catch(A){postMessage([n,void 0,A])}}}})()`])),t=new Worker(A),e=new Map;t.onmessage=({data:[A,t,n]})=>{const[a,r]=e.get(A);e.delete(A),t?a(new Uint8Array(t)):r(Object.assign(new Error,n))}}();
{
"name": "@3846masa/bmp",
"version": "1.1.0",
"version": "1.1.1",
"description": "Create a BMP (w/ alpha channel) binary from RGBA raw bytes like ImageData.",

@@ -15,3 +15,3 @@ "license": "MIT",

},
"main": "lib/convert.cjs",
"main": "lib/convert.js",
"module": "lib/covert.mjs",

@@ -32,3 +32,3 @@ "files": [

"@size-limit/file": "^5.0.3",
"rollup": "2.40.0",
"rollup": "2.58.0",
"rollup-plugin-terser": "7.0.2",

@@ -48,3 +48,3 @@ "semantic-release": "17.4.7",

{
"path": "lib/convert.cjs",
"path": "lib/convert.js",
"limit": "500 B"

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