UnstableDesign / AdaCAD

AdaCAD is an experimental workspace that applies parametric design to the domain of weave drafting. It supports algorithmic and playful approaches to developing woven structures and cloth, for shaft and jacquard looms.
https://adacad.org
GNU General Public License v3.0
41 stars 11 forks source link

Added Color Space Editing for Uploaded Images #187

Closed Devendork closed 3 weeks ago

Devendork commented 3 weeks ago

On the UI, the reconfiguring the Image Map and Upload Draft Operations.

When an image is uploaded, it is automatically parsed for colors:

Screenshot 2024-09-28 at 9 32 48 AM

If you want to change the color space (for example, when it somehow exported more colors than you expected...which can happen), you can click the "View/Edit image button"

Screenshot 2024-09-28 at 9 33 35 AM

This gives you the option to group colors together and reduce the color space that will be used when assigning drafts to colored regions.

When you close the window, the operation recomputes the color inlets according to the user preferences.

Screenshot 2024-09-28 at 9 33 41 AM

Behind the Scenes: Changed the way that media (images, etc) are stored in AdaCAD by replacing the images service with a "media" service that keeps a table that associates media instances (uses of a given image, etc) from the stored media (in Firebase storage). This allows you to set preferences as to how the media is rendered without changing the image source. Part of the change in this class is also to acknowledge future media formats, such as .CSV files or .WIF files.

This required a somewhat substantial reconfiguration and required that media objects are saved within the file loading and saving and handled on duplication and/or multi-selection.