Jump to content

Color separation: Difference between revisions

m
m (→‎{{header|Wren}}: Minor tidy)
Line 344:
{{libheader|DOME}}
First the script for the RGB model with the original image shown first.
<syntaxhighlight lang="ecmascriptwren">import "dome" for Window
import "graphics" for Canvas, Color, ImageData
 
Line 351:
Window.title = "Color separation, RGB model"
var fileName = "Lenna50.jpg"
var image = ImageData.loadFromFileload(fileName)
var w = image.width
var h = image.height
Line 387:
 
Next the script for the CMY model with the original image shown first.
<syntaxhighlight lang="ecmascriptwren">import "dome" for Window
import "graphics" for Canvas, Color, ImageData
 
Line 394:
Window.title = "Color separation, CMY model"
var fileName = "Lenna50.jpg"
var image = ImageData.loadFromFileload(fileName)
var w = image.width
var h = image.height
Line 432:
 
I've had to borrow the Fōrmulæ image for this one as the red component of the pixels in the previous image is such that the 'C' image seems to come out completely white.
<syntaxhighlight lang="ecmascriptwren">import "dome" for Window
import "graphics" for Canvas, Color, ImageData
import "math" for Math
Line 440:
Window.title = "Color separation, CMYK model"
var fileName = "lady.png"
var image = ImageData.loadFromFileload(fileName)
var w = image.width
var h = image.height
9,485

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.