CPImage

org.cosplay.CPImage$
See theCPImage companion class
object CPImage

Companion object with utility functions.

Attributes

Companion
class
Source
CPImage.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CPImage.type

Members list

Value members

Concrete methods

def horImage(imgs: CPImage*): CPImage

Creates new image by stacking given images horizontally, starting with the 1st image, then stitching the 2nd image to the right of the 1st, etc.

Creates new image by stacking given images horizontally, starting with the 1st image, then stitching the 2nd image to the right of the 1st, etc.

Value parameters

imgs

Non-empty set of images to stitch horizontally.

Attributes

Source
CPImage.scala
def load(path: String, skin: (CPPixel, Int, Int) => CPPixel): CPImage

Loads image auto-detecting its format based on the file path extension. The following extensions are recognized:

Loads image auto-detecting its format based on the file path extension. The following extensions are recognized:

Value parameters

path

Local filesystem file path.

skin

Skinning function. The function takes an existing pixel, its X and Y coordinate and return a new pixel. Default value is the function that returns the same pixel.

Attributes

Source
CPImage.scala
def loadRexCsv(src: String, skin: (CPPixel, Int, Int) => CPPixel): CPImage

Loads image using REXPaint CSV format.

Loads image using REXPaint CSV format.

Value parameters

skin

Skinning function. The function takes an existing pixel, its X and Y coordinate and return a new pixel. Default value is a function that return the same pixel.

src

Local filesystem path, resources file or URL.

Attributes

Source
CPImage.scala
def loadRexXp(src: String, skin: (CPPixel, Int, Int) => CPPixel): CPImage

Loads image using REXPaint XP format.

Loads image using REXPaint XP format.

Value parameters

skin

Skinning function. The function takes an existing pixel, its X and Y coordinate and return a new pixel. Default value is the function that returns the same pixel.

src

Local filesystem path, resources file or URL.

Attributes

Note
Source
CPImage.scala
def loadTxt(src: String, skin: (CPPixel, Int, Int) => CPPixel): CPImage

Loads image using *.txt format.

Loads image using *.txt format.

Value parameters

skin

Skinning function. The function takes an existing pixel, its X and Y coordinate and return a new pixel. Default value is the function that returns the same pixel.

src

Local filesystem path, resources file or URL.

Attributes

Source
CPImage.scala
def previewAnimation(imgs: Seq[CPImage], fps: Int, emuTerm: Boolean, bg: CPPixel): Unit

Previews given sequence of image as animation.

Previews given sequence of image as animation.

Value parameters

bg

Optional background pixel for the terminal. Default value is

CPPixel('.', C_GRAY2, C_GRAY1)

.

emuTerm

Whether or not to use terminal emulation. Default value is true.

fps

How many frame per second to show.

imgs

Sequence of images to be used as key frames for the animation.

Attributes

Source
CPImage.scala
def previewImage(img: CPImage, bg: CPPixel, emuTerm: Boolean): Unit

Previews given image.

Previews given image.

Value parameters

bg

Optional background pixel for the terminal. Default value is

CPPixel('.', C_GRAY2, C_GRAY1)

.

emuTerm

Whether or not to use terminal emulation. Default value is true.

img

Image to preview.

Attributes

Source
CPImage.scala
def vertImage(imgs: CPImage*): CPImage

Creates new image by stacking given images vertically, starting with the 1st image, then stitching the 2nd image underneath the 1st, etc.

Creates new image by stacking given images vertically, starting with the 1st image, then stitching the 2nd image underneath the 1st, etc.

Value parameters

imgs

Non-empty set of images to stitch vertically.

Attributes

Source
CPImage.scala