Image

introprog.Image
See theImage companion object
class Image(val underlying: BufferedImage)

Image represents pixel arrays backed by underlying java.awtimage.BufferedImage

Attributes

Companion
object
Source
Image.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply(x: Int, y: Int): Color

Get color of pixel at (x, y).

Get color of pixel at (x, y).

Attributes

Source
Image.scala
def scaled(width: Int, height: Int): Image

Copy image and scale to (width, height).

Copy image and scale to (width, height).

Attributes

Source
Image.scala
def subsection(x: Int, y: Int, width: Int, height: Int): Image

Copy subsection of image defined by top left corner (x, y) and (width, height).

Copy subsection of image defined by top left corner (x, y) and (width, height).

Attributes

Source
Image.scala
def toMatrix: Array[Array[Color]]

Extract and return image pixels.

Extract and return image pixels.

Attributes

Source
Image.scala
def update(x: Int, y: Int, c: Color): Unit

Set color of pixel at (x, y).

Set color of pixel at (x, y).

Attributes

Source
Image.scala
def update(f: (Int, Int) => Color): Unit

Set color of pixels by passing f(x, y)

Set color of pixels by passing f(x, y)

Attributes

Source
Image.scala
def updated(f: (Int, Int) => Color): Image

Set color of pixels by passing f(x, y) and return self.

Set color of pixels by passing f(x, y) and return self.

Attributes

Source
Image.scala

Copy image and change image type to ARGB, including alpha channel

Copy image and change image type to ARGB, including alpha channel

Attributes

Source
Image.scala

Copy image and change image type to RGB, removing alpha channel

Copy image and change image type to RGB, removing alpha channel

Attributes

Source
Image.scala

Concrete fields

val hasAlpha: Boolean

Test if alpha channel is supperted.

Test if alpha channel is supperted.

Attributes

Source
Image.scala
val height: Int

The height of this image.

The height of this image.

Attributes

Source
Image.scala
val underlying: BufferedImage

Attributes

Source
Image.scala
val width: Int

The width of this image.

The width of this image.

Attributes

Source
Image.scala