Skip to content

CODESIGN2/smart-object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smart-object

scripted image transform. PoC

Inspiration came from this UI. It's basically hotspots on an image that allow you to embed other images. Cool web-based dialogue, but closed source, slow

Inspiration came from this UI. It's basically hotspots on an image that allow you to embed other images. Cool web-based dialogue, but closed source, slow

Remit?

As nothing on the linked site uses curved sides or any complex features (which could be supported via masks), then it seems easy to just store two sets of four points. The second set are for top-left, top-right, bottom-left and bottom-right destinations for the passed in image. The first set can be derrived from the image, such that (0,0) will always be top-left, (width-1,height-1) will always be bottom-right (note in the initial test we overrun by 1px). top-right and bottom-left are (width-1,0) & (0,height-1) respectively.

Diagram attempting to visualise how the corners translate

Diagram attempting to visualise how the corners translate

How does this enable smart-objects?

Firstly it enables output of a scripted, repeatable image from an original source image. From that point anything done to the source can be translated to the output. From there it can be put into the regular compositing chain, either via CLI tools like imagemagick (used here), or in more complex GUI applications.

How this fits into the larger picture

How this fits into the larger picture

Work to be done

  • GUI's & non-CLI scripts to demo
  • Higher-order Structures
  • Flourishes (like adding a sheen layer, working with SVG, etc)