File tree Expand file tree Collapse file tree 6 files changed +53
-0
lines changed
content/examples/Basic Examples/Image Expand file tree Collapse file tree 6 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Alpha Mask.
3
+ *
4
+ * Loads a "mask" for an image to specify the transparency
5
+ * in different parts of the image. The two images are blended
6
+ * together using the mask() method of PImage.
7
+ */
8
+
1
9
PImage img;
2
10
PImage imgMask;
3
11
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Background Image.
3
+ *
4
+ * This example presents the fastest way to load a background image
5
+ * into Processing. To load an image as the background, it must be
6
+ * the same width and height as the program.
7
+ */
8
+
1
9
PImage bg;
2
10
int y;
3
11
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Create Image.
3
+ *
4
+ * The createImage() function provides a fresh buffer of pixels to play with.
5
+ * This example creates an image gradient.
6
+ */
7
+
1
8
PImage img;
2
9
3
10
void setup () {
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Pointillism
3
+ * by Daniel Shiffman.
4
+ *
5
+ * Mouse horizontal location controls size of dots.
6
+ * Creates a simple pointillist effect using ellipses colored
7
+ * according to pixels in an image.
8
+ */
9
+
1
10
PImage img;
2
11
int smallPoint, largePoint;
3
12
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Request Image
3
+ * by Ira Greenberg ( From Processing for Flash Developers).
4
+ *
5
+ * Shows how to use the requestImage() function with preloader animation.
6
+ * The requestImage() function loads images on a separate thread so that
7
+ * the sketch does not freeze while they load. It's very useful when you are
8
+ * loading large images.
9
+ *
10
+ * These images are small for a quick download, but try it with your own huge
11
+ * images to get the full effect.
12
+ */
13
+
1
14
int imgCount = 12 ;
2
15
PImage [] imgs = new PImage [imgCount];
3
16
float imgW;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Transparency.
3
+ *
4
+ * Move the pointer left and right across the image to change
5
+ * its position. This program overlays one image over another
6
+ * by modifying the alpha value of the image with the tint() function.
7
+ */
8
+
1
9
PImage img;
2
10
float offset = 0 ;
3
11
float easing = 0.05 ;
You can’t perform that action at this time.
0 commit comments