SketchAPI icon indicating copy to clipboard operation
SketchAPI copied to clipboard

APIs missing: insert images in Fills

Open matteogratton opened this issue 2 years ago • 1 comments

It is currently a pain to handle images with APIs.

All the images must be converted or read into an NSImage object. It would be nice to have automatic converters from the same formats we have in our exports:

  • png
  • jpeg
  • webp
  • svg
  • pdf
  • eps
  • (possibly also base64?)

I'd love to have something like this to add an image to a fill pattern:

fillType: Style.FillType.Pattern,
pattern: {
    patternType: "Tile",
    image: {
        png: path/image.png,
    },
    tyleScale: 0.4,
},

that image would be automatically imported.

matteogratton avatar Jun 23 '22 14:06 matteogratton

Ideally supporting also URLs (not only paths) 🙏

fbmore avatar Jun 23 '22 16:06 fbmore