public class AdvancedManipulations
extends java.lang.Object
Constructor and Description |
---|
AdvancedManipulations() |
Modifier and Type | Method and Description |
---|---|
static PixelPicture |
adjustContrast(PixelPicture pic,
double multiplier)
Change the contrast of a picture.
|
static PixelPicture |
blur(PixelPicture pic,
int radius)
Blur an image.
|
static PixelPicture |
flood(PixelPicture pic,
Pixel c,
int x,
int y)
Challenge Problem (this problem is worth 0 points):
Flood pixels of the same color with a different color.
|
static PixelPicture |
reducePalette(PixelPicture pic,
int numColors)
Reduce a picture to its most common colors.
|
public static PixelPicture adjustContrast(PixelPicture pic, double multiplier)
public static PixelPicture reducePalette(PixelPicture pic, int numColors)
pic
- The Pixel for which the closest match should be found.public static PixelPicture blur(PixelPicture pic, int radius)
pic
- The picture to be blurred.radius
- The radius of the blurring box.public static PixelPicture flood(PixelPicture pic, Pixel c, int x, int y)
pic
- The original picture to be flooded.c
- The pixel the user "clicked" (representing the color that should be flooded).x
- The x-coordinate of the point on which the user "clicked."y
- The y-coordinate of the point on which the user "clicked."