GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing processing-r.github.io — createImage \ Language (API)

Cover
Reference
Tutorials
Bugs
Name

createImage

Examples
img = createImage(66, 66, RGB)
img$loadPixels()
for (i in 0:65) {
    for (j in 0:65) {
        img$set(i, j, color(0, 9, 102))
    }
}
img$updatePixels()
image(img, 17, 17)
img = createImage(66, 66, ARGB)
img$loadPixels()
for (i in 0:65) {
    for (j in 0:65) {
        img$set(i, j, color(0, 90, 102, i * 2))
    }
}
img$updatePixels()
image(img, 17, 17)
image(img, 34, 34)
Description Creates a new PImage (the datatype for storing images). This provides a fresh buffer of pixels to play with. Set the size of the buffer with the width and height parameters. The format parameter defines how the pixels are stored. See the PImage reference for more information.

Be sure to include all three parameters, specifying only the width and height (but no format) will produce a strange error.

Advanced users please note that createImage() should be used instead of the syntax new PImage().
Syntax
createImage(w, h, format)
Parameters
wint: width in pixels
hint: height in pixels
formatint: Either RGB, ARGB, ALPHA (grayscale alpha channel)
Related PImage
PGraphics
Creative Commons License
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.