Creates an empty Image with the same dimensions of this image.
Creates an empty Image with the same dimensions of this image.
a new Image that is a clone of this image but with uninitialized data
Sets all pixels on this image to be the given color.
Sets all pixels on this image to be the given color.
The result of the pixels set to the given color.
Creates a copy of this image with the given filter applied.
Creates a copy of this image with the given filter applied. The original (this) image is unchanged.
the filter to apply. See com.sksamuel.scrimage.Filter.
A new image with the given filter applied.
Maps the pixels of this image into another image by applying the given function to each pixel.
Maps the pixels of this image into another image by applying the given function to each pixel.
The function accepts three parameters: x,y,p where x and y are the coordinates of the pixel being transformed and p is the pixel at that location.
the function to transform pixel x,y with existing value p into new pixel value p' (p prime)
Returns the ARGB components for all pixels in this image
Returns the ARGB components for all pixels in this image
an array containing ARGB components in that order.
Returns the ARGB components for the pixel at the given coordinates
Returns the ARGB components for the pixel at the given coordinates
the x coordinate of the pixel component to grab
the y coordinate of the pixel component to grab
an array containing ARGB components in that order.
Returns the centre coordinates for the image.
Returns the centre coordinates for the image.
Returns the color at the given coordinates.
Returns the color at the given coordinates.
the RGBColor value at the coords
Returns a set of the distinct colours used in this image.
Returns a set of the distinct colours used in this image.
the set of distinct Colors
Returns true if a pixel with the given color exists.
Returns true if a pixel with the given color exists.
the pixel colour to look for.
true if there exists at least one pixel that has the given pixels color
Create a new Image which is a copy of this image.
Counts the number of pixels that are true for the given predicate
Counts the number of pixels that are true for the given predicate
a predicate
the number of pixels that evaluated true
Counts the number of pixels with the given colour.
Counts the number of pixels with the given colour.
the colour to detect.
the number of pixels that matched the colour of the given pixel
Returns the number of pixels in the image.
Returns true if the predicate holds on the image
Returns true if the predicate holds on the image
a predicate
true if p holds for at least one pixel
Flips this image horizontally.
Flips this image horizontally.
The result of flipping this image horizontally.
Flips this image vertically.
Flips this image vertically.
The result of flipping this image vertically.
Returns the pixels of the image as an iterator.
Maps the pixels of this image into another image by applying the given function to each pixel.
Maps the pixels of this image into another image by applying the given function to each pixel.
The function accepts three parameters: x,y,p where x and y are the coordinates of the pixel being transformed and p is the pixel at that location.
the function to transform pixel x,y with existing value p into new pixel value p' (p prime)
Returns the pixel at the given coordinates.
Returns the pixel at the given coordinate.
Returns the pixel at the given coordinate.
the pixel as an integer tuple
the pixel
Returns a rectangular region within the given boundaries as a single dimensional array of integers.
Returns a rectangular region within the given boundaries as a single dimensional array of integers.
Eg, pixels(10, 10, 30, 20) would result in an array of size 600 with the first row of the region in indexes 0,..,29, second row 30,..,59 etc.
the start x coordinate
the start y coordinate
the width of the region
the height of the region
an Array of pixels for the region
Returns all the pixels for the image
Returns all the pixels for the image
an array of pixels for this image
Returns the aspect ratio for this image.
Returns a new AWT BufferedImage from this image using the same AWT type.
Returns a new AWT BufferedImage from this image using the same AWT type.
a new, non-shared, BufferedImage with the same data as this Image.
A skeleton implementation of read only operations based on a backing AWT image.