PImage alpha





PImage::alpha() \ Language (API) \ Processing 1.0






























Language (A-Z) \ Libraries \ Tools \ Environment






Reference for Processing version 1.2. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Class PImage Name alpha() Examples PImage img = loadImage("test.jpg"); PImage alphaImg = loadImage("mask.jpg"); img.alpha(alphaImg); image(img, 0, 0); image(img, 25, 0); Description Set the alpha channel of an image. Because Processing can only load GIF and JPEG bitmaps, which do not support variable degrees of transparency, an image's alpha channel needs to be loaded as a separate image. This alpha image should only contain grayscale data. Only the blue color channel is used, which corresponds to values between 0 and 255. The image passed in an alpha channel needs to be of exactly the same size as the image it will be applied to.Instead of an alpha image, an integer array containing the alpha channel data can be specified directly. Again, this array must be of the same length as the target image's pixels array and should, as with the other version of the function, only contain grayscale data or values between 0-255. Using this array method is useful for using dynamic, generated alpha masks. Syntax img.alpha(alphaImg) img.alpha(alphaArray) Parameters img any variable of type PImage alphaImg PImage: any PImage object used as the alpha channel for "img", needs to be same size as "img" alphaArray int[]: any array of Integer numbers used as the alpha channel, needs to be same length as the image's pixel array Usage Web & Application

Updated on June 14, 2010 12:05:29pm EDT












Processing was initiated by Ben Fry and Casey Reas. It is developed by a small team of volunteers.


© Info \

Site hosted by Media Temple!









Wyszukiwarka

Podobne podstrony:
PImage alpha
Alpha Options
Alpha Rising
Claimed by the Alpha (a BBW Wer Nieznany
PImage loadPixels
Wolfram Alpha pogromca Google
INFINITY ALPHA 10
alpha
Alpha Floating Point
Alpha HOWTO pl
PImage filter
alpha howto 4
1276410 re alpha insight
1549484 re alpha insight

więcej podobnych podstron