{"id":2932,"date":"2026-10-30T02:14:20","date_gmt":"2026-10-30T02:14:20","guid":{"rendered":"https:\/\/hubiify.com\/?page_id=2932"},"modified":"2026-10-30T03:07:17","modified_gmt":"2026-10-30T03:07:17","slug":"logo-preparation-tool","status":"publish","type":"page","link":"https:\/\/hubiify.com\/en\/logo-preparation-tool\/","title":{"rendered":"Logo Preparation Tool"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2932\" class=\"elementor elementor-2932\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f44d289 e-flex e-con-boxed e-con e-parent\" data-id=\"f44d289\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9fd314f elementor-widget elementor-widget-html\" data-id=\"9fd314f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!-- Hubiify Logo Preparation Tool \u2014 paste this entire file into one Elementor HTML widget. -->\n<iframe class=\"wp-dark-mode-ignore\" id=\"hubiify-logo-tool-frame\" title=\"Logo Preparation Tool\" sandbox=\"allow-scripts allow-downloads\" style=\"display:block;width:100%;height:1500px;border:0;background:#f5f5f5;color-scheme:light\" srcdoc=\"&lt;!doctype html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;meta charset=&quot;utf-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1&quot;&gt;&lt;title&gt;Hubiify \u2022 Logo preparation&lt;\/title&gt;&lt;style&gt;*{box-sizing:border-box}body{margin:0;background:#f5f5f5;color:#191919;font:16px\/1.5 Arial,sans-serif}header{background:#000;color:white;padding:22px max(24px,calc((100vw - 1100px)\/2));display:flex;justify-content:flex-end;align-items:center;border-bottom:4px solid #ffd800}header strong{font-size:28px}main{max-width:1100px;margin:30px auto;padding:0 20px}h1{font-size:28px;margin:0 0 8px}h2{font-size:21px;margin:0 0 15px}.intro{color:#555;margin-bottom:25px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.panel{background:white;padding:24px;border-radius:12px;border:1px solid #ddd}label{display:block;font-weight:bold;margin:16px 0 6px}input[type=text],select{width:100%;padding:12px;border:1px solid #aaa;border-radius:6px;font:inherit}input[type=file]{max-width:100%}button{font:700 15px Arial;border:0;border-radius:6px;padding:12px 16px;cursor:pointer;background:#ffd800;color:#000;margin:8px 5px 0 0}button:hover{background:#1e4dbc;color:white}button:disabled{opacity:.45;cursor:not-allowed}.secondary{background:#eee}canvas{display:block;width:100%;height:auto;border:1px solid #ddd;border-radius:6px;margin-top:14px}#source{touch-action:none;cursor:crosshair;background:repeating-conic-gradient(#eee 0% 25%,white 0% 50%) 0\/20px 20px}small{display:block;color:#555;margin-top:8px}.note{background:#f5f5f5;padding:12px;border-radius:6px;margin-top:16px}#status{min-height:48px;color:#555}#status.warn{color:#8a3600}input[type=range]{width:100%}footer{font-size:13px;color:#555;margin:25px 0}@media(max-width:760px){.grid{grid-template-columns:1fr}header{padding:18px 20px}.panel{padding:18px}}\/* Rainbow hue track: retain colour controls alongside HEX\/RGB. *\/\n#hue{appearance:none;-webkit-appearance:none;display:block;width:100%;height:18px;margin:14px 0;border:1px solid #ccc;border-radius:999px;background:linear-gradient(to right,#ff0000 0%,#ffff00 16.667%,#00ff00 33.333%,#00ffff 50%,#0000ff 66.667%,#ff00ff 83.333%,#ff0000 100%);cursor:pointer;touch-action:pan-y}\n#hue::-webkit-slider-runnable-track{height:18px;border-radius:999px;background:transparent}\n#hue::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:26px;height:26px;margin-top:-4px;border-radius:50%;border:3px solid white;background:var(--hue-colour,#ff0000);box-shadow:0 0 0 1px #555,0 2px 5px #0005}\n#hue::-moz-range-track{height:18px;border-radius:999px;background:transparent}\n#hue::-moz-range-thumb{width:21px;height:21px;border-radius:50%;border:3px solid white;background:var(--hue-colour,#ff0000);box-shadow:0 0 0 1px #555}\n#hue:focus-visible{outline:3px solid #1e4dbc;outline-offset:6px}\n&lt;\/style&gt;&lt;div hidden aria-hidden=&quot;true&quot;&gt;&lt;select id=&quot;lang&quot; aria-label=&quot;Language&quot; style=&quot;width:auto&quot;&gt;&lt;option value=&quot;en&quot;&gt;English&lt;\/option&gt;&lt;option value=&quot;fr&quot;&gt;Fran\u00e7ais&lt;\/option&gt;&lt;\/select&gt;&lt;\/div&gt;&lt;main style=&quot;margin-top:0;padding-top:28px&quot;&gt;&lt;h1 data-i=&quot;title&quot;&gt;&lt;\/h1&gt;&lt;p class=&quot;intro&quot; data-i=&quot;intro&quot;&gt;&lt;\/p&gt;&lt;div class=&quot;grid&quot;&gt;&lt;section class=&quot;panel&quot;&gt;&lt;h2 data-i=&quot;one&quot;&gt;&lt;\/h2&gt;&lt;input id=&quot;file&quot; type=&quot;file&quot; accept=&quot;image\/png,image\/jpeg,image\/webp,image\/svg+xml,.svg&quot;&gt;&lt;small data-i=&quot;formats&quot;&gt;&lt;\/small&gt;&lt;canvas id=&quot;source&quot; width=&quot;600&quot; height=&quot;350&quot; aria-label=&quot;Crop selection&quot;&gt;&lt;\/canvas&gt;&lt;small data-i=&quot;crophelp&quot;&gt;&lt;\/small&gt;&lt;div&gt;&lt;button id=&quot;reset&quot; class=&quot;secondary&quot; disabled data-i=&quot;reset&quot;&gt;&lt;\/button&gt;&lt;button id=&quot;trim&quot; class=&quot;secondary&quot; disabled data-i=&quot;trim&quot;&gt;&lt;\/button&gt;&lt;\/div&gt;&lt;h2 style=&quot;margin-top:26px&quot; data-i=&quot;two&quot;&gt;&lt;\/h2&gt;&lt;label for=&quot;name&quot; data-i=&quot;name&quot;&gt;&lt;\/label&gt;&lt;input id=&quot;name&quot; type=&quot;text&quot; maxlength=&quot;80&quot; placeholder=&quot;example-saas&quot;&gt;&lt;label for=&quot;bg&quot; data-i=&quot;background&quot;&gt;&lt;\/label&gt;&lt;select id=&quot;bg&quot;&gt;&lt;option value=&quot;#ffffff&quot; data-i=&quot;white&quot;&gt;&lt;\/option&gt;&lt;option value=&quot;#000000&quot; data-i=&quot;black&quot;&gt;&lt;\/option&gt;&lt;option value=&quot;custom&quot; data-i=&quot;custom&quot;&gt;&lt;\/option&gt;&lt;\/select&gt;&lt;label for=&quot;custom&quot; data-i=&quot;custom&quot;&gt;&lt;\/label&gt;&lt;div style=&quot;display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start&quot;&gt;&lt;div&gt;&lt;canvas id=&quot;palette&quot; width=&quot;280&quot; height=&quot;180&quot; style=&quot;margin:0;touch-action:none;cursor:crosshair&quot; aria-label=&quot;Colour palette&quot;&gt;&lt;\/canvas&gt;&lt;label for=&quot;hue&quot;&gt;Hue \/ Teinte&lt;\/label&gt;&lt;input id=&quot;hue&quot; type=&quot;range&quot; min=&quot;0&quot; max=&quot;359&quot; value=&quot;0&quot;&gt;&lt;\/div&gt;&lt;div&gt;&lt;label for=&quot;hex&quot; style=&quot;margin-top:0&quot;&gt;HEX&lt;\/label&gt;&lt;input id=&quot;hex&quot; type=&quot;text&quot; value=&quot;#FFFFFF&quot; maxlength=&quot;7&quot; spellcheck=&quot;false&quot; aria-describedby=&quot;hexerror&quot;&gt;&lt;small id=&quot;hexerror&quot; style=&quot;color:#a00&quot; role=&quot;status&quot;&gt;&lt;\/small&gt;&lt;div style=&quot;display:flex;gap:6px&quot;&gt;&lt;div&gt;&lt;label for=&quot;red&quot;&gt;R&lt;\/label&gt;&lt;input id=&quot;red&quot; type=&quot;number&quot; min=&quot;0&quot; max=&quot;255&quot; value=&quot;255&quot; style=&quot;width:100%;padding:9px&quot;&gt;&lt;\/div&gt;&lt;div&gt;&lt;label for=&quot;green&quot;&gt;G&lt;\/label&gt;&lt;input id=&quot;green&quot; type=&quot;number&quot; min=&quot;0&quot; max=&quot;255&quot; value=&quot;255&quot; style=&quot;width:100%;padding:9px&quot;&gt;&lt;\/div&gt;&lt;div&gt;&lt;label for=&quot;blue&quot;&gt;B&lt;\/label&gt;&lt;input id=&quot;blue&quot; type=&quot;number&quot; min=&quot;0&quot; max=&quot;255&quot; value=&quot;255&quot; style=&quot;width:100%;padding:9px&quot;&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;div id=&quot;swatch&quot; style=&quot;background:#fff;height:40px;border:1px solid #aaa;border-radius:5px;margin-top:12px&quot;&gt;&lt;\/div&gt;&lt;small&gt;Opacity \/ Opacit\u00e9 : 100 %&lt;\/small&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;input id=&quot;custom&quot; type=&quot;hidden&quot; value=&quot;#ffffff&quot;&gt;&lt;label for=&quot;size&quot; data-i=&quot;size&quot;&gt;&lt;\/label&gt;&lt;input id=&quot;size&quot; type=&quot;range&quot; min=&quot;300&quot; max=&quot;750&quot; step=&quot;10&quot; value=&quot;750&quot;&gt;&lt;small id=&quot;sizeval&quot;&gt;&lt;\/small&gt;&lt;\/section&gt;&lt;section class=&quot;panel&quot;&gt;&lt;h2 data-i=&quot;preview&quot;&gt;&lt;\/h2&gt;&lt;canvas id=&quot;out&quot; width=&quot;900&quot; height=&quot;900&quot; aria-label=&quot;900 by 900 pixel output preview&quot;&gt;&lt;\/canvas&gt;&lt;p id=&quot;status&quot; role=&quot;status&quot; aria-live=&quot;polite&quot;&gt;&lt;\/p&gt;&lt;button id=&quot;download&quot; disabled data-i=&quot;download&quot;&gt;&lt;\/button&gt;&lt;div class=&quot;note&quot; data-i=&quot;privacy&quot;&gt;&lt;\/div&gt;&lt;\/section&gt;&lt;\/div&gt;&lt;footer data-i=&quot;footer&quot;&gt;&lt;\/footer&gt;&lt;\/main&gt;&lt;script&gt;\n(()=&gt;{&#x27;use strict&#x27;;const $=id=&gt;document.getElementById(id),src=$(&#x27;source&#x27;),out=$(&#x27;out&#x27;),sc=src.getContext(&#x27;2d&#x27;),oc=out.getContext(&#x27;2d&#x27;);let img=null,crop=null,drag=null,view=null,vector=false,token=0;const texts={en:{title:&#x27;Prepare your software logo&#x27;,intro:&#x27;A centred logo, an opaque background and a ready-to-use 900 \u00d7 900 px PNG.&#x27;,one:&#x27;1. Import &amp; crop&#x27;,formats:&#x27;SVG, PNG, JPG or WebP \u00b7 Maximum 15 MB. SVG is preferred. EPS must first be converted to SVG or PNG. SVG must be self-contained, with text converted to paths.&#x27;,crophelp:&#x27;Drag over the image to select the logo. The highlighted area will be exported. Use Reset to keep the entire image.&#x27;,reset:&#x27;Reset crop&#x27;,trim:&#x27;Trim transparent margins&#x27;,two:&#x27;2. Adjust the result&#x27;,name:&#x27;Software name&#x27;,background:&#x27;Background&#x27;,white:&#x27;White&#x27;,black:&#x27;Black&#x27;,custom:&#x27;Custom colour&#x27;,size:&#x27;Maximum logo width \/ height&#x27;,preview:&#x27;3. Preview &amp; download&#x27;,download:&#x27;Download PNG&#x27;,privacy:&#x27;Local processing only. Your image is not uploaded, stored or sent to Hubiify. No account needed.&#x27;,footer:&#x27; Resizing does not restore missing detail or sharpen a blurry original.&#x27;,empty:&#x27;Import a logo to begin.&#x27;,ready:&#x27;Ready. Output: 900 \u00d7 900 px with an opaque background.&#x27;,warn:&#x27;The selected logo is smaller than the requested output size. It will be enlarged; its sharpness may be insufficient. Prefer a larger original.&#x27;,invalid:&#x27;Use a SVG, PNG, JPG or WebP file smaller than 15 MB.&#x27;,error:&#x27;This image could not be read. Try a different file.&#x27;,large:&#x27;Image exceeds the 24-megapixel limit. Use a smaller original.&#x27;,noalpha:&#x27;No transparent margins detected. Use manual cropping for white or coloured margins.&#x27;,loading:&#x27;Reading image\u2026&#x27;},fr:{title:&#x27;Pr\u00e9parez le logo de votre logiciel&#x27;,intro:&#x27;Un logo centr\u00e9, un fond opaque et un fichier PNG de 900 \u00d7 900 px pr\u00eat \u00e0 utiliser.&#x27;,one:&#x27;1. Importer et recadrer&#x27;,formats:&#x27;SVG, PNG, JPG ou WebP \u00b7 Maximum 15 Mo. SVG recommand\u00e9. Convertissez d\u2019abord les EPS en SVG ou PNG. Le SVG doit \u00eatre autonome, avec le texte vectoris\u00e9.&#x27;,crophelp:&#x27;Tracez un rectangle sur l\u2019image pour s\u00e9lectionner le logo. La zone en surbrillance sera export\u00e9e. R\u00e9initialiser permet de conserver toute l\u2019image.&#x27;,reset:&#x27;R\u00e9initialiser le cadrage&#x27;,trim:&#x27;Retirer les marges transparentes&#x27;,two:&#x27;2. Ajuster le r\u00e9sultat&#x27;,name:&#x27;Nom du logiciel&#x27;,background:&#x27;Fond&#x27;,white:&#x27;Blanc&#x27;,black:&#x27;Noir&#x27;,custom:&#x27;Couleur personnalis\u00e9e&#x27;,size:&#x27;Largeur \/ hauteur maximale du logo&#x27;,preview:&#x27;3. Aper\u00e7u et t\u00e9l\u00e9chargement&#x27;,download:&#x27;T\u00e9l\u00e9charger le PNG&#x27;,privacy:&#x27;Traitement local uniquement. Votre image n\u2019est ni t\u00e9l\u00e9vers\u00e9e, ni conserv\u00e9e, ni transmise \u00e0 Hubiify. Aucun compte requis.&#x27;,footer:&#x27; Redimensionner ne recr\u00e9e pas les d\u00e9tails et ne rend pas un original flou plus net.&#x27;,empty:&#x27;Importez un logo pour commencer.&#x27;,ready:&#x27;Pr\u00eat. Image finale : 900 \u00d7 900 px, fond opaque.&#x27;,warn:&#x27;Le logo s\u00e9lectionn\u00e9 est plus petit que la taille demand\u00e9e. Il sera agrandi et pourrait manquer de nettet\u00e9. Privil\u00e9giez un original plus grand.&#x27;,invalid:&#x27;Choisissez un SVG, PNG, JPG ou WebP de moins de 15 Mo.&#x27;,error:&#x27;Impossible de lire cette image. Essayez un autre fichier.&#x27;,large:&#x27;L\u2019image d\u00e9passe la limite de 24 m\u00e9gapixels. Utilisez un original plus petit.&#x27;,noalpha:&#x27;Aucune marge transparente d\u00e9tect\u00e9e. Utilisez le cadrage manuel pour les marges blanches ou color\u00e9es.&#x27;,loading:&#x27;Lecture de l\u2019image\u2026&#x27;}};let message=&#x27;empty&#x27;;function status(k){message=k;$(&#x27;status&#x27;).textContent=texts[$(&#x27;lang&#x27;).value][k];$(&#x27;status&#x27;).className=[&#x27;warn&#x27;,&#x27;error&#x27;,&#x27;invalid&#x27;,&#x27;large&#x27;].includes(k)?&#x27;warn&#x27;:&#x27;&#x27;}function language(){document.documentElement.lang=$(&#x27;lang&#x27;).value;document.querySelectorAll(&#x27;[data-i]&#x27;).forEach(e=&gt;e.textContent=texts[$(&#x27;lang&#x27;).value][e.dataset.i]);status(message);render(false)}function drawSource(){sc.clearRect(0,0,src.width,src.height);if(!img)return;const s=Math.min(600\/img.width,350\/img.height);view={s,x:(600-img.width*s)\/2,y:(350-img.height*s)\/2};sc.drawImage(img,view.x,view.y,img.width*s,img.height*s);sc.fillStyle=&#x27;rgba(0,0,0,.35)&#x27;;sc.beginPath();sc.rect(0,0,600,350);sc.rect(view.x+crop.x*s,view.y+crop.y*s,crop.w*s,crop.h*s);sc.fill(&#x27;evenodd&#x27;);sc.strokeStyle=&#x27;#1e4dbc&#x27;;sc.lineWidth=2;sc.strokeRect(view.x+crop.x*s,view.y+crop.y*s,crop.w*s,crop.h*s)}function render(update=true){oc.fillStyle=$(&#x27;bg&#x27;).value===&#x27;custom&#x27;?$(&#x27;custom&#x27;).value:$(&#x27;bg&#x27;).value;oc.fillRect(0,0,900,900);$(&#x27;sizeval&#x27;).textContent=$(&#x27;size&#x27;).value+&#x27; \u00d7 &#x27;+$(&#x27;size&#x27;).value+&#x27; px max.&#x27;;if(!img)return;const max=+$(&#x27;size&#x27;).value,scale=Math.min(max\/crop.w,max\/crop.h),w=crop.w*scale,h=crop.h*scale;oc.imageSmoothingEnabled=true;oc.imageSmoothingQuality=&#x27;high&#x27;;oc.drawImage(img,crop.x,crop.y,crop.w,crop.h,(900-w)\/2,(900-h)\/2,w,h);drawSource();if(update)status(!vector&amp;&amp;scale&gt;1.01?&#x27;warn&#x27;:&#x27;ready&#x27;)}\n$(&#x27;file&#x27;).addEventListener(&#x27;change&#x27;,async e=&gt;{const n=++token;img=null;crop=null;view=null;vector=false;[&#x27;download&#x27;,&#x27;reset&#x27;,&#x27;trim&#x27;].forEach(id=&gt;$(id).disabled=true);sc.clearRect(0,0,600,350);render(false);const f=e.target.files[0];if(!f){status(&#x27;empty&#x27;);return}const isSVG=f.type===&#x27;image\/svg+xml&#x27;||\/\\.svg$\/i.test(f.name);if((!isSVG&amp;&amp;![&#x27;image\/png&#x27;,&#x27;image\/jpeg&#x27;,&#x27;image\/webp&#x27;].includes(f.type))||f.size&gt;15*1024*1024){status(&#x27;invalid&#x27;);return}status(&#x27;loading&#x27;);let url;try{let input=f;if(isSVG){const doc=new DOMParser().parseFromString(await f.text(),&#x27;image\/svg+xml&#x27;),root=doc.documentElement;if(doc.querySelector(&#x27;parsererror&#x27;)||root.localName!==&#x27;svg&#x27;)throw Error(&#x27;Invalid SVG&#x27;);if(doc.doctype)throw Error(&#x27;SVG doctype unsupported&#x27;);const forbidden=&#x27;script,foreignObject,iframe,object,embed,audio,video,animate,animateMotion,animateTransform,set&#x27;;root.querySelectorAll(forbidden).forEach(el=&gt;el.remove());for(const el of [root,...root.querySelectorAll(&#x27;*&#x27;)])for(const attr of [...el.attributes]){const k=attr.localName.toLowerCase(),v=attr.value.trim();if(k.startsWith(&#x27;on&#x27;)||k===&#x27;base&#x27;||((k===&#x27;href&#x27;||k===&#x27;src&#x27;)&amp;&amp;!v.startsWith(&#x27;#&#x27;)))el.removeAttributeNode(attr);else if(\/url\\s*\\(\/i.test(v)&amp;&amp;!\/^(?:[^u]|u(?!rl))*$\/i.test(v)){if([...v.matchAll(\/url\\s*\\(([^)]*)\\)\/gi)].some(m=&gt;!m[1].replace(\/[&quot;&#x27;]\/g,&#x27;&#x27;).trim().startsWith(&#x27;#&#x27;)))el.removeAttributeNode(attr)}}root.querySelectorAll(&#x27;style&#x27;).forEach(el=&gt;{if(\/@import|(?:https?:|data:|file:|javascript:|\\\/\\\/)\/i.test(el.textContent))el.remove()});let vb=(root.getAttribute(&#x27;viewBox&#x27;)||&#x27;&#x27;).trim().split(\/[ ,]+\/).map(Number);let w=parseFloat(root.getAttribute(&#x27;width&#x27;)),h=parseFloat(root.getAttribute(&#x27;height&#x27;));if(vb.length===4&amp;&amp;vb.every(Number.isFinite)&amp;&amp;vb[2]&gt;0&amp;&amp;vb[3]&gt;0){w=vb[2];h=vb[3]}if(!(w&gt;0&amp;&amp;h&gt;0)){w=900;h=900}const scale=4096\/Math.max(w,h);root.setAttribute(&#x27;width&#x27;,Math.max(1,Math.round(w*scale)));root.setAttribute(&#x27;height&#x27;,Math.max(1,Math.round(h*scale)));root.setAttribute(&#x27;xmlns&#x27;,&#x27;http:\/\/www.w3.org\/2000\/svg&#x27;);input=new Blob([new XMLSerializer().serializeToString(root)],{type:&#x27;image\/svg+xml&#x27;});vector=true}url=URL.createObjectURL(input);const im=new Image();im.src=url;await im.decode();if(n!==token)return;if(im.width*im.height&gt;24000000){status(&#x27;large&#x27;);return}img=im;crop={x:0,y:0,w:im.width,h:im.height};$(&#x27;name&#x27;).value=f.name.replace(\/\\.[^.]+$\/,&#x27;&#x27;).replace(\/[-_]?logo.*$\/i,&#x27;&#x27;)||&#x27;software&#x27;;[&#x27;download&#x27;,&#x27;reset&#x27;,&#x27;trim&#x27;].forEach(id=&gt;$(id).disabled=false);render()}catch{if(n===token)status(&#x27;error&#x27;)}finally{URL.revokeObjectURL(url)}});\nfunction point(e){const b=src.getBoundingClientRect();return{x:Math.max(0,Math.min(img.width,((e.clientX-b.left)*600\/b.width-view.x)\/view.s)),y:Math.max(0,Math.min(img.height,((e.clientY-b.top)*350\/b.height-view.y)\/view.s))}}src.onpointerdown=e=&gt;{if(!img)return;drag={start:point(e),old:{...crop}};src.setPointerCapture(e.pointerId)};src.onpointermove=e=&gt;{if(!drag)return;const p=point(e),a=drag.start;crop={x:Math.min(a.x,p.x),y:Math.min(a.y,p.y),w:Math.max(1,Math.abs(p.x-a.x)),h:Math.max(1,Math.abs(p.y-a.y))};render()};src.onpointerup=()=&gt;{if(!drag)return;if(crop.w&lt;3||crop.h&lt;3)crop=drag.old;drag=null;render()};src.onpointercancel=()=&gt;{if(drag){crop=drag.old;drag=null;render()}};$(&#x27;reset&#x27;).onclick=()=&gt;{crop={x:0,y:0,w:img.width,h:img.height};render()};$(&#x27;trim&#x27;).onclick=()=&gt;{const c=document.createElement(&#x27;canvas&#x27;);c.width=img.width;c.height=img.height;const ctx=c.getContext(&#x27;2d&#x27;,{willReadFrequently:true});ctx.drawImage(img,0,0);const d=ctx.getImageData(0,0,c.width,c.height).data;let l=c.width,t=c.height,r=-1,b=-1;for(let y=0;y&lt;c.height;y++)for(let x=0;x&lt;c.width;x++)if(d[(y*c.width+x)*4+3]&gt;10){l=Math.min(l,x);r=Math.max(r,x);t=Math.min(t,y);b=Math.max(b,y)}if(r&lt;0||l===0&amp;&amp;t===0&amp;&amp;r===c.width-1&amp;&amp;b===c.height-1){status(&#x27;noalpha&#x27;);return}crop={x:l,y:t,w:r-l+1,h:b-t+1};render()};const pc=$(&#x27;palette&#x27;).getContext(&#x27;2d&#x27;);let sat=0,val=1;function drawPalette(){$(&#x27;hue&#x27;).style.setProperty(&#x27;--hue-colour&#x27;,&#x27;hsl(&#x27;+$(&#x27;hue&#x27;).value+&#x27;,100%,50%)&#x27;);pc.fillStyle=&#x27;hsl(&#x27;+$(&#x27;hue&#x27;).value+&#x27;,100%,50%)&#x27;;pc.fillRect(0,0,280,180);let w=pc.createLinearGradient(0,0,280,0);w.addColorStop(0,&#x27;white&#x27;);w.addColorStop(1,&#x27;rgba(255,255,255,0)&#x27;);pc.fillStyle=w;pc.fillRect(0,0,280,180);let k=pc.createLinearGradient(0,0,0,180);k.addColorStop(0,&#x27;transparent&#x27;);k.addColorStop(1,&#x27;black&#x27;);pc.fillStyle=k;pc.fillRect(0,0,280,180);pc.beginPath();pc.arc(Math.max(4,Math.min(276,sat*280)),Math.max(4,Math.min(176,(1-val)*180)),5,0,Math.PI*2);pc.strokeStyle=&#x27;white&#x27;;pc.lineWidth=2;pc.stroke();pc.strokeStyle=&#x27;#222&#x27;;pc.lineWidth=1;pc.stroke()}function setColour(hex,custom=true,updateHue=true){$(&#x27;custom&#x27;).value=hex.toLowerCase();$(&#x27;hex&#x27;).value=hex.toUpperCase();$(&#x27;hexerror&#x27;).textContent=&#x27;&#x27;;$(&#x27;hex&#x27;).removeAttribute(&#x27;aria-invalid&#x27;);const rgb=[1,3,5].map(i=&gt;parseInt(hex.slice(i,i+2),16));[&#x27;red&#x27;,&#x27;green&#x27;,&#x27;blue&#x27;].forEach((id,i)=&gt;$(id).value=rgb[i]);$(&#x27;swatch&#x27;).style.background=hex;const [r,g,b]=rgb.map(x=&gt;x\/255),mx=Math.max(r,g,b),mn=Math.min(r,g,b),d=mx-mn;val=mx;sat=mx?d\/mx:0;if(updateHue&amp;&amp;d){let h=mx===r?((g-b)\/d)%6:mx===g?(b-r)\/d+2:(r-g)\/d+4;$(&#x27;hue&#x27;).value=Math.round((h*60+360)%360)}if(custom)$(&#x27;bg&#x27;).value=&#x27;custom&#x27;;drawPalette();render()}$(&#x27;hex&#x27;).addEventListener(&#x27;input&#x27;,()=&gt;{let v=$(&#x27;hex&#x27;).value.trim();if(!v.startsWith(&#x27;#&#x27;))v=&#x27;#&#x27;+v;if(\/^#[a-f0-9]{6}$\/i.test(v))setColour(v);else{$(&#x27;hex&#x27;).setAttribute(&#x27;aria-invalid&#x27;,&#x27;true&#x27;);$(&#x27;hexerror&#x27;).textContent=$(&#x27;lang&#x27;).value===&#x27;fr&#x27;?&#x27;Format : #RRGGBB&#x27;:&#x27;Format: #RRGGBB&#x27;}});$(&#x27;hex&#x27;).addEventListener(&#x27;blur&#x27;,()=&gt;{let v=$(&#x27;hex&#x27;).value.trim().replace(\/^#\/,&#x27;&#x27;);if(\/^[a-f0-9]{3}$\/i.test(v))setColour(&#x27;#&#x27;+[...v].map(c=&gt;c+c).join(&#x27;&#x27;))});[&#x27;red&#x27;,&#x27;green&#x27;,&#x27;blue&#x27;].forEach(id=&gt;$(id).addEventListener(&#x27;input&#x27;,()=&gt;{const vs=[&#x27;red&#x27;,&#x27;green&#x27;,&#x27;blue&#x27;].map(n=&gt;$(n).value);if(vs.every(v=&gt;v!==&#x27;&#x27;&amp;&amp;Number.isInteger(+v)&amp;&amp;+v&gt;=0&amp;&amp;+v&lt;=255))setColour(&#x27;#&#x27;+vs.map(v=&gt;(+v).toString(16).padStart(2,&#x27;0&#x27;)).join(&#x27;&#x27;))}));function paletteColour(){let h=+$(&#x27;hue&#x27;).value\/60,c=val*sat,x=c*(1-Math.abs(h%2-1)),m=val-c,a=h&lt;1?[c,x,0]:h&lt;2?[x,c,0]:h&lt;3?[0,c,x]:h&lt;4?[0,x,c]:h&lt;5?[x,0,c]:[c,0,x];setColour(&#x27;#&#x27;+a.map(v=&gt;Math.round((v+m)*255).toString(16).padStart(2,&#x27;0&#x27;)).join(&#x27;&#x27;),true,false)}$(&#x27;hue&#x27;).oninput=paletteColour;let picking=false;function pick(e){const r=$(&#x27;palette&#x27;).getBoundingClientRect();sat=Math.max(0,Math.min(1,(e.clientX-r.left)\/r.width));val=1-Math.max(0,Math.min(1,(e.clientY-r.top)\/r.height));paletteColour()}$(&#x27;palette&#x27;).onpointerdown=e=&gt;{picking=true;$(&#x27;palette&#x27;).setPointerCapture(e.pointerId);pick(e)};$(&#x27;palette&#x27;).onpointermove=e=&gt;{if(picking)pick(e)};$(&#x27;palette&#x27;).onpointerup=()=&gt;picking=false;$(&#x27;palette&#x27;).onpointercancel=()=&gt;picking=false;$(&#x27;bg&#x27;).onchange=()=&gt;{if($(&#x27;bg&#x27;).value!==&#x27;custom&#x27;)setColour($(&#x27;bg&#x27;).value,false);else render()};drawPalette();$(&#x27;size&#x27;).oninput=()=&gt;render();$(&#x27;lang&#x27;).onchange=language;$(&#x27;download&#x27;).onclick=()=&gt;{if(!img)return;out.toBlob(blob=&gt;{if(!blob)return;const u=URL.createObjectURL(blob),a=document.createElement(&#x27;a&#x27;);a.href=u;a.download=($(&#x27;name&#x27;).value.normalize(&#x27;NFD&#x27;).replace(\/[\\u0300-\\u036f]\/g,&#x27;&#x27;).toLowerCase().replace(\/[^a-z0-9]+\/g,&#x27;-&#x27;).replace(\/^-|-$\/g,&#x27;&#x27;).slice(0,70)||&#x27;software&#x27;)+&#x27;-logo.png&#x27;;a.click();setTimeout(()=&gt;URL.revokeObjectURL(u),30000)},&#x27;image\/png&#x27;)};language();})();\n&lt;\/script&gt;&lt;script&gt;(()=&gt;{let last=0;function notify(){const h=Math.ceil(document.body.getBoundingClientRect().height+32);if(h!==last){last=h;parent.postMessage({type:&#x27;hubiify-logo-height&#x27;,height:h},&#x27;*&#x27;)}}new ResizeObserver(notify).observe(document.documentElement);window.addEventListener(&#x27;load&#x27;,notify);notify()})();&lt;\/script&gt;&lt;\/html&gt;\n&lt;script&gt;window.addEventListener(&#x27;message&#x27;,event=&gt;{if(event.source!==parent||!event.data||event.data.type!==&#x27;hubiify-logo-language&#x27;)return;const lang=event.data.language===&#x27;fr&#x27;?&#x27;fr&#x27;:&#x27;en&#x27;,select=document.getElementById(&#x27;lang&#x27;);if(select&amp;&amp;select.value!==lang){select.value=lang;select.dispatchEvent(new Event(&#x27;change&#x27;))}});&lt;\/script&gt;\"><\/iframe>\n<script>\n(()=>{const frame=document.getElementById('hubiify-logo-tool-frame');if(!frame)return;\nfunction syncLanguage(){const language=\/^\\\/fr(?:\\\/|$)\/i.test(location.pathname)||document.documentElement.lang.toLowerCase().startsWith('fr')?'fr':'en';frame.contentWindow.postMessage({type:'hubiify-logo-language',language},'*')}\nframe.addEventListener('load',syncLanguage);\nnew MutationObserver(syncLanguage).observe(document.documentElement,{attributes:true,attributeFilter:['lang']});\nwindow.addEventListener('message',event=>{if(event.source!==frame.contentWindow||!event.data||event.data.type!=='hubiify-logo-height')return;const height=Number(event.data.height);if(Number.isFinite(height)&&height>=100&&height<=12000)frame.style.height=(height+8)+'px';syncLanguage()});\nsyncLanguage();})();\n<\/script>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-2932","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/pages\/2932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/comments?post=2932"}],"version-history":[{"count":7,"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/pages\/2932\/revisions"}],"predecessor-version":[{"id":2947,"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/pages\/2932\/revisions\/2947"}],"wp:attachment":[{"href":"https:\/\/hubiify.com\/en\/wp-json\/wp\/v2\/media?parent=2932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}