Class MutableImage
java.lang.Object
ch.nolix.system.element.mutableelement.AbstractMutableElementWithProperties
ch.nolix.system.graphic.image.MutableImage
- All Implemented Interfaces:
Copyable<MutableImage>, Resettable, AttributesRepresentable, Element, SpecificationRepresentable, MutableElement, Image, IMutableImage<MutableImage>
public final class MutableImage
extends AbstractMutableElementWithProperties
implements IMutableImage<MutableImage>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionstatic MutableImagefromAnyImage(Image image) static MutableImagefromBufferedImage(BufferedImage bufferedImage) static MutableImagefromBytes(byte[] bytes) static MutableImagestatic MutableImagefromResource(String path) static MutableImagefromSpecification(Node<?> specification) static MutableImagefromString(String string) getCopy()intgetPixel(int xPosition, int yPosition) intgetSection(int xPosition, int yPosition, int width, int height) intgetWidth()voidreset()Resets the currentResettable.voidsetPixelArray(ExtendedIterable<IColor> pixelArray) voidsetPixelArray(Node<?> pixelArray) byte[]toJpg()byte[]toPng()toRepeatedImage(int width, int height) toScaledImage(double factor) toScaledImage(double widthFactor, double heightFactor) withAlphaValue(double alphaValue) static MutableImagewithPixels(IMatrix<IColor> pixels) withWidthAndHeight(int width, int height) static MutableImagewithWidthAndHeightAndColor(int width, int height, IColor color) static MutableImagewithWidthAndHeightAndWhiteColor(int width, int height) Methods inherited from class AbstractMutableElementWithProperties
addOrChangeAttribute, addOrChangeAttribute, equals, getAttributes, getSpecification, hashCode, toStringMethods inherited from interface AttributesRepresentable
getAttributesMethods inherited from interface MutableElement
addOrChangeAttributes, resetFromAttributes, resetFromSpecificationMethods inherited from interface SpecificationRepresentable
getSpecification, hasEqualSpecificationAsElement, toFormatedString
-
Method Details
-
fromAnyImage
-
fromBytes
-
fromBufferedImage
-
fromFile
-
fromResource
-
fromSpecification
-
fromString
-
withPixels
-
withWidthAndHeightAndColor
-
withWidthAndHeightAndWhiteColor
-
getBottomLeftPixel
- Specified by:
getBottomLeftPixelin interfaceImage
-
getBottomRightPixel
- Specified by:
getBottomRightPixelin interfaceImage
-
getCopy
- Specified by:
getCopyin interfaceCopyable<MutableImage>- Returns:
- a new copy of the current
Copyable.
-
getHeight
-
getPixel
-
getPixelCount
public int getPixelCount()- Specified by:
getPixelCountin interfaceImage
-
getPixels
-
getSection
- Specified by:
getSectionin interfaceImage
-
getTopLeftPixel
- Specified by:
getTopLeftPixelin interfaceImage
-
getTopRightPixel
- Specified by:
getTopRightPixelin interfaceImage
-
getWidth
-
reset
-
setPixel
- Specified by:
setPixelin interfaceIMutableImage<MutableImage>
-
setPixelArray
-
setPixelArray
-
toBase64Jpg
- Specified by:
toBase64Jpgin interfaceImage
-
toBase64Png
- Specified by:
toBase64Pngin interfaceImage
-
toBufferedImage
- Specified by:
toBufferedImagein interfaceImage
-
toImmutableImage
- Specified by:
toImmutableImagein interfaceImage
-
toJpg
-
toLeftRotatedImage
- Specified by:
toLeftRotatedImagein interfaceImage
-
toPng
-
toRepeatedImage
- Specified by:
toRepeatedImagein interfaceImage
-
toRightRotatedImage
- Specified by:
toRightRotatedImagein interfaceImage
-
toScaledImage
- Specified by:
toScaledImagein interfaceImage
-
toScaledImage
- Specified by:
toScaledImagein interfaceImage
-
withAlphaValue
- Specified by:
withAlphaValuein interfaceImage
-
withWidthAndHeight
- Specified by:
withWidthAndHeightin interfaceImage
-