nhn / tui.image-editor

🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
http://ui.toast.com/tui-image-editor
MIT License
6.84k stars 1.26k forks source link

Image Metadata is lost after download modify image #805

Closed lambamahesh closed 1 year ago

lambamahesh commented 1 year ago

@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, });

RKTZ commented 1 year ago

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 commented 1 year ago

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