tiff.js icon indicating copy to clipboard operation
tiff.js copied to clipboard

How to change the tiff.toCanvas()?

Open HeWei-imagineer opened this issue 4 years ago • 1 comments

When I use tiff.toCanvas(), I hope I can change the canvas's width and height. Is there a API to change it?

HeWei-imagineer avatar Aug 24 '20 10:08 HeWei-imagineer

Hi HeWei, I had an issue like this for an earlier project.

My solution was to wrap the canvas in a div and to apply the following CSS to the div, or to apply the following CSS directly onto the canvas that the image is being placed in:

::ng-deep .Your-Div-Or-Canvas-Id > img {
    max-height: 1340px !important; <---- adjusts the size
    padding: 6px;
}

rendlp avatar Sep 02 '20 18:09 rendlp