mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
Reference changes for 2.0
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
* Convolution
|
||||
* by Daniel Shiffman.
|
||||
*
|
||||
* Applies a convolution matrix to a portion of an image.
|
||||
* Move mouse to apply filter to different parts of the image.
|
||||
* Applies a convolution matrix to a portion of an image. Move mouse to
|
||||
* apply filter to different parts of the image. This example is currently
|
||||
* not accurate in JavaScript mode.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* A high-pass filter sharpens an image. This program analyzes every
|
||||
* pixel in an image in relation to the neighboring pixels to sharpen
|
||||
* the image.
|
||||
* the image. This example is currently not accurate in JavaScript mode.
|
||||
*/
|
||||
|
||||
// The next line is needed if running in JavaScript Mode with Processing.js
|
||||
@@ -42,7 +42,7 @@ void draw() {
|
||||
}
|
||||
// For this pixel in the new image, set the gray value
|
||||
// based on the sum from the kernel
|
||||
edgeImg.pixels[y*img.width + x] = color(sum);
|
||||
edgeImg.pixels[y*img.width + x] = color(sum, sum, sum);
|
||||
}
|
||||
}
|
||||
// State that there are changes to edgeImg.pixels[]
|
||||
|
||||
Reference in New Issue
Block a user