Leaflet.DistortableImage icon indicating copy to clipboard operation
Leaflet.DistortableImage copied to clipboard

Script to export all images at full resolution, and create an SVG containing them

Open jywarren opened this issue 5 years ago • 6 comments

Building on the full-resolution export completed in https://github.com/publiclab/Leaflet.DistortableImage/pull/100, we should think of a way to export all images (it might need to be one at a time or it'd overload the system?) and then combine them all into a single document in SVG format.

This would actually save space and processing power vs. combining them into a giant raster image.

We could use this library:

https://svgjs.com/docs/2.7/elements/#svg-image

The syntax looks pretty simple;

var draw = SVG('drawing').size(300, 300)
var image = draw.image('/path/to/image.jpg', 200, 300)

We'd love help with this and it could be an interim solution in parallel to the exporter work going on in https://github.com/publiclab/Leaflet.DistortableImage/issues/126! @sashadev-sky, what do you think of this?

jywarren avatar Mar 08 '19 19:03 jywarren

@jywarren yeah I would love to work on this one! Should I get started here (client-side export) instead of mapknitter?

sashadev-sky avatar Mar 27 '19 12:03 sashadev-sky

sure!!

On Wed, Mar 27, 2019 at 8:12 AM Sasha Boginsky [email protected] wrote:

@jywarren https://github.com/jywarren yeah I would love to work on this one! Should I get started here (serverless export) instead of mapknitter?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/Leaflet.DistortableImage/issues/164#issuecomment-477123226, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ_acy_nbjGELJ4MEO30Xp1pxdfgIks5va2AWgaJpZM4bmBTq .

jywarren avatar Mar 30 '19 01:03 jywarren

@sashadev-sky Are you working on this (or have plans to)?

rexagod avatar Apr 11 '19 20:04 rexagod

Plan to in the future! Working on the exporter from the mapknitter side first here: #413. If you end up wanting to work on it before I get to it that's totally fine, just mention me here to notify me

sashadev-sky avatar Apr 16 '19 04:04 sashadev-sky

Also connecting to PDF generation idea here: https://github.com/publiclab/mapknitter/issues/219

jywarren avatar May 09 '19 19:05 jywarren

So, also noting this would be a great function of DistortableCollection - PDF or SVG.

jywarren avatar May 09 '19 19:05 jywarren