From c02f4db3c5fa9bb114992771daa600c0bbf83388 Mon Sep 17 00:00:00 2001 From: Cory Kilger Date: Fri, 13 Oct 2017 00:32:30 -0600 Subject: [PATCH] Fix creating images in Sketch v47. --- CG.sketchplugin/Contents/Sketch/Images/Flickr Keywords.js | 2 +- CG.sketchplugin/Contents/Sketch/Images/IG Keywords.js | 2 +- CG.sketchplugin/Contents/Sketch/js/loadImage.js | 2 +- CG.sketchplugin/Contents/Sketch/js/utility.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CG.sketchplugin/Contents/Sketch/Images/Flickr Keywords.js b/CG.sketchplugin/Contents/Sketch/Images/Flickr Keywords.js index 3838c60..441e8c3 100644 --- a/CG.sketchplugin/Contents/Sketch/Images/Flickr Keywords.js +++ b/CG.sketchplugin/Contents/Sketch/Images/Flickr Keywords.js @@ -57,7 +57,7 @@ function onRun(context){ var fill = layer.style().fills().firstObject(); fill.setFillType(4); - fill.setImage(MSImageData.alloc().initWithImage_convertColorSpace(newImage, false)); + fill.setImage(MSImageData.alloc().initWithImageConvertingColorSpace(newImage)); fill.setPatternFillType(1); } diff --git a/CG.sketchplugin/Contents/Sketch/Images/IG Keywords.js b/CG.sketchplugin/Contents/Sketch/Images/IG Keywords.js index 0ab8f2a..b4ef310 100644 --- a/CG.sketchplugin/Contents/Sketch/Images/IG Keywords.js +++ b/CG.sketchplugin/Contents/Sketch/Images/IG Keywords.js @@ -105,7 +105,7 @@ function process(selection, data, doc) { var fill = layer.style().fills().firstObject(); fill.setFillType(4); - fill.setImage(MSImageData.alloc().initWithImage_convertColorSpace(newImage, false)); + fill.setImage(MSImageData.alloc().initWithImageConvertingColorSpace(newImage)); fill.setPatternFillType(1); } diff --git a/CG.sketchplugin/Contents/Sketch/js/loadImage.js b/CG.sketchplugin/Contents/Sketch/js/loadImage.js index 663999d..6898446 100755 --- a/CG.sketchplugin/Contents/Sketch/js/loadImage.js +++ b/CG.sketchplugin/Contents/Sketch/js/loadImage.js @@ -59,7 +59,7 @@ var loadImages = function(context, dataPath, groupName, pictureName){ log(image) var fill = layer.style().fills().firstObject(); fill.setFillType(4); - fill.setImage(MSImageData.alloc().initWithImage_convertColorSpace(image, false)); + fill.setImage(MSImageData.alloc().initWithImageConvertingColorSpace(image)); fill.setPatternFillType(1); } } diff --git a/CG.sketchplugin/Contents/Sketch/js/utility.js b/CG.sketchplugin/Contents/Sketch/js/utility.js index db98f0f..4254e70 100755 --- a/CG.sketchplugin/Contents/Sketch/js/utility.js +++ b/CG.sketchplugin/Contents/Sketch/js/utility.js @@ -102,7 +102,7 @@ function replaceWithImages(images, context) { if([layer class] == MSShapeGroup){ var fill = layer.style().fills().firstObject(); fill.setFillType(4); - fill.setImage(MSImageData.alloc().initWithImage_convertColorSpace(image, false)); + fill.setImage(MSImageData.alloc().initWithImageConvertingColorSpace(image)); fill.setPatternFillType(1); } }