croptool icon indicating copy to clipboard operation
croptool copied to clipboard

Always use server side dimensions for client side cropper

Open bawolff opened this issue 1 year ago • 1 comments

SVG files can potentially have relative widths and heights where their size is relative to the browser size. This causes cropping to fail as the backend and frontend disagree on what size the image is.

This forces the js cropper code to always use the server side width & height, to ensure that everything is in agreement.

Most SVGs specify an absolute width & height so don't have this issue. An example of a file with this issue is https://commons.wikimedia.org/wiki/File:Eclampsia_svg_hariadhi.svg

bawolff avatar Jul 31 '24 21:07 bawolff

@danmichaelo Friendly ping on this pull request

bawolff avatar Aug 18 '24 19:08 bawolff

@danmichaelo just another ping

bawolff avatar Jan 28 '25 18:01 bawolff

Thanks and sorry I didn't notice this before! Deploying it now

danmichaelo avatar Feb 03 '25 22:02 danmichaelo

Hey Dan Can we at Wiki Project Med help support the Croptool? Ie can you make Brian a co maintainer? Best

WikiDocJames avatar Feb 04 '25 02:02 WikiDocJames

We are wanting to get it working on PDFs next.

WikiDocJames avatar Feb 04 '25 02:02 WikiDocJames