Create a new Image that is the given width and height with no initialization.
Create a new Image that is the given width and height with no initialization. This will usually result in a default black background (all pixel data defaulting to zeroes) but that is not guaranteed.
the width of the new image
the height of the new image
the new Image with the given width and height
Create a new Image from an array of bytes.
Create a new Image from an array of bytes. This is intended to create an image from an image format eg PNG, not from a stream of pixels.
the bytes from the format stream
a new Image
Create a new Image from an array of pixels.
Create a new Image from an array of pixels. The specified width and height must match the number of pixels.
a new Image
Return a new Image with the given width and height, with all pixels set to the supplied colour.
Return a new Image with the given width and height, with all pixels set to the supplied colour.
the width of the new Image
the height of the new Image
the color to set all pixels to
the new Image
Create a new Image from a file.
Create a new Image from a file. This method will also attach metadata.
Creates a new Image from the resource on the classpath.
Create a new Image from an input stream.
Create a new Image from an input stream. This is intended to create an image from an image format eg PNG, not from a stream of pixels. This method will also attach metadata if available.
the stream to read the bytes from
a new Image
Create a new Scrimage Image from an AWT Image.
Create a new Scrimage Image from an AWT Image. This method will not copy the underlying image, so care should be taken that the image passed in is not mutated elsewhere.
the source AWT Image
the AWT image type to use. If the image is not in this format already it will be coped. specify -1 if you want to use the original
a new Scrimage Image
Create a new Scrimage Image from an AWT Image.
Create a new Scrimage Image from an AWT Image. This method will copy the given AWT image so that modifications to the original do not write forward to the scrimage Image
the source AWT Image
a new Scrimage Image
(Since version 2.0) use fromAwt
(Since version 2.0) use fromFile
(Since version 2.0) use fromStream