PageSourceSearch

https://www.slidebitch.ai/assets/imageAnalysisUtils-Fgtc8Eqr.js

js slidebitch.ai collected 2026-10-05 15:05:03 UTC 1,175 bytes, 1 lines download raw bytes

1const g=n=>{const i=n.data;let e=0;const a=i.length/4;for(let t=0;t<i.length;t+=4){const s=i[t],c=i[t+1],m=i[t+2];i[t+3]===255&&s===255&&c===255&&m===255&&e++}return{isBlank:e===a,whitePixelCount:e,totalPixels:a}},h=async(n,i=!0)=>new Promise(e=>{if(!n||n.trim()===""){e(!1);return}const a=new Image;a.crossOrigin="anonymous";let l=n;i&&!n.includes("images.weserv.nl")&&(l=`https://images.weserv.nl/?url=${encodeURIComponent(n)}&n=-1`);const t=setTimeout(()=>{e(!1)},1e4);a.onload=()=>{clearTimeout(t);try{const s=document.createElement("canvas");s.width=a.width,s.height=a.height;const c=s.getContext("2d");if(!c){e(!1);return}c.drawImage(a,0,0);const m=c.getImageData(0,0,s.width,s.height),o=g(m);e(o.isBlank)}catch(s){console.warn("Error analyzing image for blank detection:",s),e(!1)}},a.onerror=()=>{clearTimeout(t),e(!1)},a.src=l}),f=async(n,i,e=3,a=100)=>{const l=[];for(let t=0;t<n.length;t+=e){const s=n.slice(t,t+e),c=s.map(async o=>{i&&i(t+s.indexOf(o)+1,n.length,o);const r=await h(o);return{url:o,isBlank:r}}),m=await Promise.all(c);l.push(...m),t+e<n.length&&await new Promise(o=>setTimeout(o,a))}return l};export{f as batchCheckBlankImages,h as isBlankImage};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.