SJP Posted May 4, 2017 Share Posted May 4, 2017 I am trying to draw an image with color thresholds in a canvas component using draw.image, but I can't seem to get the "colors" array passed in the correct format. What dimensions should the "colors" array be for passing RGB color codes? Thanks! Link to comment Share on other sites More sharing options...
AzeoTech Posted May 4, 2017 Share Posted May 4, 2017 It should be in the first dimension, so: private colors colors[0] = rgb(255,0,0) colors[1] = rgb(0,255,0) colors[2] = rgb(0,0,255) private thresholds thresholds[0] = 5 thresholds[1] = 12 thresholds[2] = 15 Draw.Image(..., colors, thresholds) Link to comment Share on other sites More sharing options...
SJP Posted May 4, 2017 Author Share Posted May 4, 2017 Works perfectly. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.