com.sksamuel.scrimage

PixelOps

Related Doc: package scrimage

trait PixelOps[R] extends AnyRef

Operations that can be implemented using only an array of pixels

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

Abstract Value Members

  1. abstract def blank: Image

    Creates an empty Image with the same dimensions of this image.

    Creates an empty Image with the same dimensions of this image.

    returns

    a new Image that is a clone of this image but with uninitialized data

  2. abstract def copy: Image

    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.

    returns

    A copy of this image.

  3. abstract def height: Int

    returns

    the height of the image

  4. abstract def iterator: Iterator[Pixel]

    Returns the pixels of the image as an iterator.

    Returns the pixels of the image as an iterator. The iterator is the most efficient way to lazily iterator over the pixels as the pixels will only be fetched from the raster as needed.

    returns

    the iterator

  5. abstract def pixel(x: Int, y: Int): Pixel

    Returns the pixel at the given coordinates.

    Returns the pixel at the given coordinates.

    x

    the x coordinate of the pixel to grab

    y

    the y coordinate of the pixel to grab

    returns

    the Pixel at the location

  6. abstract def width: Int

    returns

    the width of the image

Concrete Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. def argb: Array[Array[Int]]

    Returns the ARGB components for all pixels in this image

    Returns the ARGB components for all pixels in this image

    returns

    an array containing ARGB components in that order.

  5. def argb(x: Int, y: Int): Array[Int]

    Returns the ARGB components for the pixel at the given coordinates

    Returns the ARGB components for the pixel at the given coordinates

    x

    the x coordinate of the pixel component to grab

    y

    the y coordinate of the pixel component to grab

    returns

    an array containing ARGB components in that order.

  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. lazy val center: (Int, Int)

    Returns the centre coordinates for the image.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def col(x: Int): Array[Pixel]

  10. def color(x: Int, y: Int): RGBColor

    Returns the color at the given coordinates.

    Returns the color at the given coordinates.

    returns

    the RGBColor value at the coords

  11. def colours: Set[RGBColor]

    Returns a set of the distinct colours used in this image.

    Returns a set of the distinct colours used in this image.

    returns

    the set of distinct Colors

  12. def contains(color: Color): Boolean

    Returns true if a pixel with the given color exists.

    Returns true if a pixel with the given color exists.

    color

    the pixel colour to look for.

    returns

    true if there exists at least one pixel that has the given pixels color

  13. def count(p: (Pixel) ⇒ Boolean): Int

    Counts the number of pixels that are true for the given predicate

    Counts the number of pixels that are true for the given predicate

    p

    a predicate

    returns

    the number of pixels that evaluated true

  14. def count(color: Color): Int

    Counts the number of pixels with the given colour.

    Counts the number of pixels with the given colour.

    color

    the colour to detect.

    returns

    the number of pixels that matched the colour of the given pixel

  15. lazy val count: Int

    Returns the number of pixels in the image.

    Returns the number of pixels in the image.

    returns

    the number of pixels

  16. lazy val dimensions: (Int, Int)

  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(other: Any): Boolean

    Definition Classes
    PixelOps → AnyRef → Any
  19. def exists(p: (Pixel) ⇒ Boolean): Boolean

    Returns true if the predicate holds on the image

    Returns true if the predicate holds on the image

    p

    a predicate

    returns

    true if p holds for at least one pixel

  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def forall(f: (Int, Int, Pixel) ⇒ Boolean): Boolean

  22. def foreach(f: (Int, Int, Pixel) ⇒ Unit): Unit

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

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

    Definition Classes
    PixelOps → 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. def pixel(p: (Int, Int)): Pixel

    Returns the pixel at the given coordinate.

    Returns the pixel at the given coordinate.

    p

    the pixel as an integer tuple

    returns

    the pixel

  30. def pixels(x: Int, y: Int, w: Int, h: Int): Array[Pixel]

    Returns a rectangular region within the given boundaries as a single dimensional array of integers.

    Returns a rectangular region within the given boundaries as a single dimensional array of integers.

    Eg, pixels(10, 10, 30, 20) would result in an array of size 600 with the first row of the region in indexes 0,..,29, second row 30,..,59 etc.

    x

    the start x coordinate

    y

    the start y coordinate

    w

    the width of the region

    h

    the height of the region

    returns

    an Array of pixels for the region

  31. def pixels: Array[Pixel]

    Returns all the pixels for the image

    Returns all the pixels for the image

    returns

    an array of pixels for this image

  32. lazy val points: Seq[(Int, Int)]

  33. lazy val radius: Int

  34. lazy val ratio: Double

    returns

    Returns the aspect ratio for this image.

  35. def rgb: Array[Array[Int]]

  36. def rgb(x: Int, y: Int): Array[Int]

  37. def row(y: Int): Array[Pixel]

  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped