ProjectMirador / mirador

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
https://projectmirador.org
Apache License 2.0
557 stars 256 forks source link

Image manipulation in mirador3? #3214

Closed ydvelaitzky closed 4 years ago

ydvelaitzky commented 4 years ago

In mirador 2.7 there is a usefull feature named: "Image manipulation", included rotating ,adjust contrast and brightness, invert colors etc The question is if mirador3-rc has also that feature? I didn't see it in its demo (https://mirador-dev.netlify.app/__tests__/integration/mirador/)

Thank you!

mejackreed commented 4 years ago

In Mirador 3 this feature is in a plugin, mirador-image-tools.

You can see a demo of it here: https://mirador-image-tools.netlify.com/

ydvelaitzky commented 4 years ago

Tank you very much! The mirador-image-tools package doesn't contain the dist folder as shown in https://unpkg.com/browse/mirador-image-tools@0.8.0/ . Reference to the only https://unpkg.com/browse/mirador-image-tools@0.8.0/umd/mirador-image-tools.js file (or its "min" version) - can not be embedded correct in my html and javascript project (not react). Can you let me know how to embed that mirador-image-tools package in my app?

mejackreed commented 4 years ago

Yes thanks for mentioning this. It seems like we may need to provide a different option for users of plugins who are using the umd builds. Perhaps this is also related to #2260? I'll look into this.

ydvelaitzky commented 4 years ago

Trying to import from the mirador-image-tools: import {} from './node_modules/mirador-image-tools/umd/mirador-image-tools.js' makes me a javascript error, caused by : __webpack_require__(0) in the mirador-image-tools.js file - returns undefined Am I doing any mistake? Thank you!

mejackreed commented 4 years ago

Please checkout this repository: https://github.com/ProjectMirador/mirador-integration

It has a basic setup of mirador-image-tools here: https://github.com/ProjectMirador/mirador-integration/blob/master/src/index.js

And options to get up and going using webpack or parcel