Clears all image data to the given color
Clears all image data to the given color
Creates a new image with the same data as this image.
Creates a new image with the same data as this image. Any operations to the copied image will not write back to the original. Images can be copied multiple times as well as copies copied etc.
A copy of this image.
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
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
the pixel colour to look for.
true if there exists at least one pixel that has the given pixels 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 point.
Maps the pixels of this image into another image by applying the given function to each point.
The function accepts three parameters: x,y,p where x and y are the coordinates of the pixel being transformed and p is the current pixel value in ABGR format.
the function to transform pixel x,y with existing value p into new pixel value p' (p prime)
Returns the aspect ratio for this image.
Resize will resize the canvas, it will not scale the image.
Resize will resize the canvas, it will not scale the image. This is like a "canvas resize" in Photoshop.
the scaleFactor. 1 retains original size. 0.5 is half. 2 double. etc
where to position the original image after the canvas size change. Defaults to centre.
the color to use for expande background areas. Defaults to White.
a new Image that is the result of resizing the canvas.
Resize will resize the canvas, it will not scale the image.
Resize will resize the canvas, it will not scale the image. This is like a "canvas resize" in Photoshop.
where to position the original image after the canvas size change
a new Image that is the result of resizing the canvas.
Resize will resize the canvas, it will not scale the image.
Resize will resize the canvas, it will not scale the image. This is like a "canvas resize" in Photoshop.
where to position the original image after the canvas size change
a new Image that is the result of resizing the canvas.
Scale will resize the canvas and the image.
Scale will resize the canvas and the image. This is like a "image resize" in Photoshop.
the target increase or decrease. 1 is the same as original.
the type of scaling method to use.
a new Image that is the result of scaling this image
Scale will resize the canvas and scale the image to match.
Scale will resize the canvas and scale the image to match. This is like a "image resize" in Photoshop.
the target width
the target width
the type of scaling method to use.
a new Image that is the result of scaling this image
Scale will resize the canvas and scale the image to match.
Scale will resize the canvas and scale the image to match. This is like a "image resize" in Photoshop.
This overloaded version of scale will scale the image so that the new image has a height that matches the given targetHeight and the same aspect ratio as the original.
Eg, an image of 200,300 with a scaleToHeight of 450 will result in a scaled image of 300,450
the target height
the type of scaling method to use.
a new Image that is the result of scaling this image
Scale will resize the canvas and scale the image to match.
Scale will resize the canvas and scale the image to match. This is like a "image resize" in Photoshop.
This overloaded version of scale will scale the image so that the new image has a width that matches the given targetWidth and the same aspect ratio as the original.
Eg, an image of 200,300 with a scaleToWidth of 400 will result in a scaled image of 400,600
the target width
the type of scaling method to use.
a new Image that is the result of scaling this image
Returns the underlying image.
Returns the underlying image.
the image that was wrapped when creating this async.