epam / ketcher

Web-based molecule sketcher
https://lifescience.opensource.epam.com/ketcher/demo.html
Apache License 2.0
441 stars 158 forks source link

Load image from KET file to canvas #4911

Open yauhen-karmyzau opened 5 days ago

yauhen-karmyzau commented 5 days ago

As a User, I want the ability to load images from a KET file so that I can retrieve my image-enhanced chemical structures in a consistent and reusable format.

Acceptance Criteria:

  1. A KET structure should be defined to save image data. This structure should accommodate all necessary image details:
    • Image in base64 format;
    • The X and Y positions of an image on the canvas;
    • Scaling is out of scope;
    • Z-order must be included to object properties, however, Z-positioning is out of scope.
  2. The application should be able to draw an image on the canvas if image data exists in the loaded KET file.
  3. The application should be able to handle multiple images in a single KET file, allowing for complex diagrams with multiple visual aids.
  4. If the same image is used multiple times in a diagram, each instance of the image should be saved separately in the KET file.
  5. Image scaling is out of scope for this user story. The application should preserve the original size of the image as it was at the time of saving.
  6. The X and Y positions of an image on the canvas should be saved in the KET file and used to position the image correctly when loading from the KET file.
  7. All images should be placed at the top layer on the canvas when loaded from a KET file.