com.sksamuel.scrimage

Image

object Image

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Image
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val CANONICAL_DATA_TYPE: Int

  7. def apply(width: Int, height: Int, type: Int): Image

  8. def apply(width: Int, height: Int): Image

    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.

    width

    the width of the new image

    height

    the height of the new image

    returns

    the new Image with the given width and height

  9. def apply(bytes: Array[Byte], type: Int): Image

  10. def apply(bytes: Array[Byte]): Image

    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.

    bytes

    the bytes from the format stream

    returns

    a new Image

  11. def apply(w: Int, h: Int, pixels: Array[Pixel], type: Int): Image

  12. def apply(w: Int, h: Int, pixels: Array[Pixel]): 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.

    returns

    a new Image

  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def filled(width: Int, height: Int, color: Color = Color.White, type: Int = CANONICAL_DATA_TYPE): 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.

    width

    the width of the new Image

    height

    the height of the new Image

    color

    the color to set all pixels to

    returns

    the new Image

  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def fromAwt(awt: java.awt.Image, type: Int = CANONICAL_DATA_TYPE): Image

  20. def fromFile(file: File): Image

    Create a new Image from a file.

    Create a new Image from a file. This method will also attach metadata.

  21. def fromResource(path: String, type: Int = CANONICAL_DATA_TYPE): Image

    Creates a new Image from the resource on the classpath.

  22. def fromStream(in: InputStream, type: Int = CANONICAL_DATA_TYPE): Image

    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.

    in

    the stream to read the bytes from

    returns

    a new Image

  23. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def wrapAwt(awt: BufferedImage, type: Int = 1): 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.

    awt

    the source AWT Image

    type

    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

    returns

    a new Scrimage Image

Deprecated Value Members

  1. def apply(awt: java.awt.Image): 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

    awt

    the source AWT Image

    returns

    a new Scrimage Image

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0) use fromAwt

  2. def apply(file: File): Image

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0) use fromFile

  3. def apply(in: InputStream): Image

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0) use fromStream

Inherited from AnyRef

Inherited from Any

Ungrouped