Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Metadata is lost after download modify image #805

Closed
lambamahesh opened this issue Sep 3, 2022 · 2 comments
Closed

Image Metadata is lost after download modify image #805

lambamahesh opened this issue Sep 3, 2022 · 2 comments
Labels
Enhancement Enhance performance or improve usability of original features. Need Discussion Need discussion or investigation

Comments

@lambamahesh
Copy link

@Version 3.15.3

Development Environment

Core JavaScript

#Initialize Code

var imageEditor = new tui.ImageEditor('#tui-image-editor-container', {
includeUI: {
loadImage: {
path: "{{ $content }}", // base64 data
name: "{{ $type[0] ?? time() }}", // dynamic comming from server
},
theme: blackTheme,
menu: ['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'filter'],
menuBarPosition: 'bottom',
},
cssMaxWidth: 900,
cssMaxHeight: 700,
usageStatistics: false,
});

@lambamahesh lambamahesh added Enhancement Enhance performance or improve usability of original features. Need Discussion Need discussion or investigation labels Sep 3, 2022
@RKTZ
Copy link

RKTZ commented Sep 7, 2022

Your image is loaded into a canvas who does not preserve any metadata. The color profile and metadata will be lost. Be careful if your source image is not sRGB, the colors you will get back won't be the same.

You could use a lib like sharp js to extract and maybe inject again metadata.

I suggest that you read those SO answers :
https://stackoverflow.com/questions/34027592/does-canvas-imagedata-in-javascript-contain-exif-info
https://stackoverflow.com/questions/52495125/save-metadata-with-image-that-is-retrieved-from-html5-canvas

@lja1018
Copy link
Contributor

lja1018 commented Sep 14, 2022

@lambamahesh @RKTZ
A good proposal. I agree with your proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhance performance or improve usability of original features. Need Discussion Need discussion or investigation
Projects
None yet
Development

No branches or pull requests

3 participants