com.sksamuel.scrimage

AsyncImage

class AsyncImage extends ImageLike[Future[AsyncImage]]

Linear Supertypes
ImageLike[Future[AsyncImage]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AsyncImage
  2. ImageLike
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AsyncImage(image: Image)

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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clear(color: Color = Color.WHITE): Image

    Clears all image data to the given color

    Clears all image data to the given color

    Definition Classes
    AsyncImageImageLike
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. 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. Images can be copied multiple times as well as copies copied etc.

    returns

    A copy of this image.

    Definition Classes
    AsyncImageImageLike
  10. def count(pixel: Int): Int

    Counts the number of pixels with the given colour.

    Counts the number of pixels with the given colour.

    pixel

    the colour to detect.

    returns

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

    Definition Classes
    ImageLike
  11. def dimensions: (Int, Int)

    Definition Classes
    ImageLike
  12. def empty: 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

    Definition Classes
    AsyncImageImageLike
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(obj: Any): Boolean

    Definition Classes
    ImageLike → AnyRef → Any
  15. def exists(pixel: Int): Boolean

    pixel

    the pixel colour to look for.

    returns

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

    Definition Classes
    ImageLike
  16. def filter(filter: Filter): Future[AsyncImage]

    Creates a copy of this image with the given filter applied.

    Creates a copy of this image with the given filter applied. The original (this) image is unchanged.

    filter

    the filter to apply. See com.sksamuel.scrimage.Filter.

    returns

    A new image with the given filter applied.

    Definition Classes
    AsyncImageImageLike
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def fit(targetWidth: Int, targetHeight: Int, color: Color = Color.WHITE, scaleMethod: ScaleMethod = Bicubic, position: Position = Position.Center): Future[AsyncImage]

    Definition Classes
    AsyncImageImageLike
  19. def fitToHeight(targetHeight: Int, color: Color = java.awt.Color.WHITE, scaleMethod: ScaleMethod = Bicubic, position: Position = Center): Future[AsyncImage]

    Definition Classes
    ImageLike
  20. def fitToWidth(targetWidth: Int, color: Color = java.awt.Color.WHITE, scaleMethod: ScaleMethod = Bicubic, position: Position = Center): Future[AsyncImage]

    Definition Classes
    ImageLike
  21. def foreach(f: (Int, Int, Int) ⇒ Unit): Unit

    Definition Classes
    AsyncImageImageLike
  22. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  24. def height: Int

    Definition Classes
    AsyncImageImageLike
  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. def map(f: (Int, Int, Int) ⇒ Int): Future[AsyncImage]

    Maps the pixels of this image into another image by applying the given function to each point.

    Maps the pixels of this image into another image by applying the given function to each point.

    The function accepts three parameters: x,y,p where x and y are the coordinates of the pixel being transformed and p is the current pixel value in ABGR format.

    f

    the function to transform pixel x,y with existing value p into new pixel value p' (p prime)

    returns

    Definition Classes
    AsyncImageImageLike
  27. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  30. def pixels: Array[Int]

    Definition Classes
    AsyncImageImageLike
  31. lazy val points: Seq[(Int, Int)]

    Definition Classes
    ImageLike
  32. def ratio: Double

    returns

    Returns the aspect ratio for this image.

    Definition Classes
    ImageLike
  33. def resize(scaleFactor: Double, position: Position = Center, background: Color = Color.WHITE): Future[AsyncImage]

    Resize will resize the canvas, it will not scale the image.

    Resize will resize the canvas, it will not scale the image. This is like a "canvas resize" in Photoshop.

    scaleFactor

    the scaleFactor. 1 retains original size. 0.5 is half. 2 double. etc

    position

    where to position the original image after the canvas size change. Defaults to centre.

    background

    the color to use for expande background areas. Defaults to White.

    returns

    a new Image that is the result of resizing the canvas.

    Definition Classes
    ImageLike
  34. def resizeTo(targetWidth: Int, targetHeight: Int, position: Position = Center, background: Color = Color.WHITE): Future[AsyncImage]

    Definition Classes
    AsyncImageImageLike
  35. def resizeToHeight(targetHeight: Int, position: Position = Center, background: Color = Color.WHITE): Future[AsyncImage]

    Resize will resize the canvas, it will not scale the image.

    Resize will resize the canvas, it will not scale the image. This is like a "canvas resize" in Photoshop.

    position

    where to position the original image after the canvas size change

    returns

    a new Image that is the result of resizing the canvas.

    Definition Classes
    ImageLike
  36. def resizeToWidth(targetWidth: Int, position: Position = Center, background: Color = Color.WHITE): Future[AsyncImage]

    Resize will resize the canvas, it will not scale the image.

    Resize will resize the canvas, it will not scale the image. This is like a "canvas resize" in Photoshop.

    position

    where to position the original image after the canvas size change

    returns

    a new Image that is the result of resizing the canvas.

    Definition Classes
    ImageLike
  37. def scale(scaleFactor: Double, scaleMethod: ScaleMethod = Bicubic): Future[AsyncImage]

    Scale will resize the canvas and the image.

    Scale will resize the canvas and the image. This is like a "image resize" in Photoshop.

    scaleFactor

    the target increase or decrease. 1 is the same as original.

    scaleMethod

    the type of scaling method to use.

    returns

    a new Image that is the result of scaling this image

    Definition Classes
    ImageLike
  38. def scaleTo(targetWidth: Int, targetHeight: Int, scaleMethod: ScaleMethod = Bicubic): Future[AsyncImage]

    Scale will resize the canvas and scale the image to match.

    Scale will resize the canvas and scale the image to match. This is like a "image resize" in Photoshop.

    targetWidth

    the target width

    targetHeight

    the target width

    scaleMethod

    the type of scaling method to use.

    returns

    a new Image that is the result of scaling this image

    Definition Classes
    AsyncImageImageLike
  39. def scaleToHeight(targetHeight: Int, scaleMethod: ScaleMethod = Bicubic): Future[AsyncImage]

    Scale will resize the canvas and scale the image to match.

    Scale will resize the canvas and scale the image to match. This is like a "image resize" in Photoshop.

    This overloaded version of scale will scale the image so that the new image has a height that matches the given targetHeight and the same aspect ratio as the original.

    Eg, an image of 200,300 with a scaleToHeight of 450 will result in a scaled image of 300,450

    targetHeight

    the target height

    scaleMethod

    the type of scaling method to use.

    returns

    a new Image that is the result of scaling this image

    Definition Classes
    ImageLike
  40. def scaleToWidth(targetWidth: Int, scaleMethod: ScaleMethod = Bicubic): Future[AsyncImage]

    Scale will resize the canvas and scale the image to match.

    Scale will resize the canvas and scale the image to match. This is like a "image resize" in Photoshop.

    This overloaded version of scale will scale the image so that the new image has a width that matches the given targetWidth and the same aspect ratio as the original.

    Eg, an image of 200,300 with a scaleToWidth of 400 will result in a scaled image of 400,600

    targetWidth

    the target width

    scaleMethod

    the type of scaling method to use.

    returns

    a new Image that is the result of scaling this image

    Definition Classes
    ImageLike
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  42. def toImage: Image

    Returns the underlying image.

    Returns the underlying image.

    returns

    the image that was wrapped when creating this async.

  43. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. def width: Int

    Definition Classes
    AsyncImageImageLike
  48. def write(out: OutputStream, format: Format[_ <: ImageWriter]): Unit

    Definition Classes
    ImageLike
  49. def write(out: OutputStream): Unit

    Definition Classes
    ImageLike
  50. def write(file: File, format: Format[_ <: ImageWriter]): Unit

    Definition Classes
    ImageLike
  51. def write(file: File): Unit

    Definition Classes
    ImageLike
  52. def write(path: String, format: Format[_ <: ImageWriter]): Unit

    Definition Classes
    ImageLike
  53. def write(path: String): Unit

    Definition Classes
    ImageLike
  54. def write(format: Format[_ <: ImageWriter]): Array[Byte]

    Definition Classes
    ImageLike
  55. def write: Array[Byte]

    Definition Classes
    ImageLike
  56. def writer[T <: ImageWriter](format: Format[T]): T

    Definition Classes
    AsyncImageImageLike

Inherited from ImageLike[Future[AsyncImage]]

Inherited from AnyRef

Inherited from Any

Ungrouped