@mux/blurup
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -91,3 +91,3 @@ import { imageDimensionsFromData } from 'image-dimensions'; | ||
function svgBlurImage(tinyImageDataURL, width, height, stdDeviation) { | ||
const svg = /*html*/`<svg xmlns="http://www.w3.org/2000/svg" ${width ? `width="${width}"` : ''} ${height ? `height="${height}"` : ''}><filter id="b" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="${stdDeviation}"/><feComponentTransfer><feFuncA type="discrete" tableValues="1 1"/></feComponentTransfer></filter><g filter="url(#b)"><image width="100%" height="100%" href="${tinyImageDataURL}"/></g></svg>`; | ||
const svg = /*html*/`<svg xmlns="http://www.w3.org/2000/svg" ${width ? `width="${width}"` : ''} ${height ? `height="${height}"` : ''}><filter id="b" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="${stdDeviation}"/><feComponentTransfer><feFuncA type="discrete" tableValues="1 1"/></feComponentTransfer></filter><g filter="url(#b)"><image width="100%" height="100%" preserveAspectRatio="xMidYMid slice" href="${tinyImageDataURL}"/></g></svg>`; | ||
return svg.replace(/#/g, '%23'); | ||
@@ -94,0 +94,0 @@ } |
{ | ||
"name": "@mux/blurup", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Generate a blurry image placeholder for a Mux video.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9199