Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

html2canvas reduce image size

  await html2canvas(el,{
    scale:0.7,
    useCORS:true,
   // foreignObjectRendering:true,
    windowWidth: el.scrollWidth,
    windowHeight: el.scrollHeight,
    onclone:()=>{
      alert();
    }
    }).then((canvas) =>{
    const base64image = canvas.toDataURL("image/jpeg", 1.0);
    this.engine.catimg.img = base64image;
    this.engine.catimg.screenshot = true;
    //document.body.appendChild(canvas);
    });
    }
Comment

PREVIOUS NEXT
Code Example
Javascript :: reverse array without using another array js 
Javascript :: how can when click buton scrool to another elemtn 
Javascript :: fetching data with react 
Javascript :: javascript empty array 
Javascript :: onchange value in hidden input 
Javascript :: async javascript 
Javascript :: image react native 
Javascript :: how to set visibility in javascript of html title 
Javascript :: js create p element with text 
Javascript :: javascript default parameters 
Javascript :: grayscale image in canvas 
Javascript :: axios httponly cookie 
Javascript :: Visible, non-interactive elements with click handlers must have at least one keyboard listener jsx-a11y/click-events-have-key-events 
Javascript :: how to convert seconds in hours minutes and seconds js 
Javascript :: react focus 
Javascript :: ace editor set theme 
Javascript :: javascript reload page without refresh 
Javascript :: user icon discord js 
Javascript :: javascript combine two index elements 
Javascript :: i want to redirect to main page from iframe javascript 
Javascript :: how to convert an object to a list in js 
Javascript :: javascript object 
Javascript :: ternary operator javascript 
Javascript :: angular input type text character limit 
Javascript :: javascript hello 
Javascript :: js day monday tuesday wednesday 
Javascript :: regex for a, e, i , o , u 
Javascript :: useeffect 
Javascript :: react native pm ERR! code EINTEGRITY 
Javascript :: ternary function javascript 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =