A cross published Scala.js library for Image Processing.
This Scala.js library brings convenient, high performance, image processing capabilities to your application whether it runs in JavaScript or on the JVM. Users can use this library natively from JavaScript, Scala, and other JVM languages.
Name | Signature | Description |
Unsharpen Mask | def unsharpenMaskRGB(img: ImageBasics, radius: Int, amount: Double, threshold: Int = 0): ImageBasics | Sharpen an image. |
Randomize RGB | def randomizeRGB(img: ImageBasics): ImageBasics | Generates an image of random pixels sampled from RGB color space. |
Flip Horizontal | def flipHorizontal(img: ImageBasics): ImageBasics | Flip an image about its vertical axis. |
Flip Vertical | def flipVertical(img: ImageBasics): ImageBasics | Flip an image about its horizontal axis. |
Rotate 90 Degrees | def rotate90Degrees(img: ImageBasics, counterClockwise: Boolean = false): ImageBasics | Rotate an image 90 degrees clockwise. |
Rotate 180 Degrees | def rotate180Degrees (img: ImageBasics): ImageBasics | Rotate an image 180 degrees. |
Rotate Degrees | def rotateDegrees(img: ImageBasics, angleDegrees: Double): ImageBasics | Rotate an image clockwise by an angle specified in degrees. Relies on bilinear interpolation. |
Rotate Radians | def rotateRadians(img: ImageBasics, angleRadians: Double): ImageBasics | Rotate an image clockwise by an angle specified in radians. Relies on bilinear interpolation. |
Overlay | def overlay(bgImg: ImageBasics, fgImg: ImageBasics, bgX: Int, bgY: Int, fgX: Int, fgY: Int, width: Int, height: Int): ImageBasics | Blend an image with another based on alpha channels. |
Negative | def negative(img: ImageBasics): ImageBasics | Invert the red, green, and blue channels in RGB space. |
Grayscale Average RGB | def grayscaleAverageRGB(img: ImageBasics): ImageBasics | Discard color information from an image by collapsing the red, green, and blue values of each of its pixels into simple averages. |
Grayscale L*a*b* Intensity | def grayscaleLABIntensity(img: ImageBasics): ImageBasics | Discard color information from each pixel by converting it to L*a*b* space and replacing the a* and b* values with zeros. |
Equalize RGB | def equalizeRGB(img: ImageBasics): ImageBasics | Equalize an image's Histogram in RGB space. |
Median Cut | def median(img: ImageBasics, radius: Int): ImageBasics | Replace each pixel in an image with the median of all other pixels within a radius of the original pixel. |
Scale | def scale(img: ImageBasics, newWidth: Int, newHeight: Int ): ImageBasics | Adjust the dimensions of an image. It supports uniform and non-uniform scaling and relies on bilinear interpolation. |
Threshold RGB | def thresholdRGB(img: ImageBasics, intensity: Int): ImageBasics | Map the color components of each pixel to either 0 or 255 depending on whether the given intensity is less than or greater than the threshold parameter. |
Threshold L*a*b* | def thresholdLab(img: ImageBasics, intensityRGB: Int): ImageBasics | Generates a binary image from a given image. Each new pixel becomes white or black depending on whether each pixel intensity exceeds or falls short of the specified intensity. |
Brightness | def brightness(img: ImageBasics, b: Int): ImageBasics | Adjust the brightness of an image. |
Contrast | def contrast(img: ImageBasics, c: Double): ImageBasics | Adjust the contrast of an image. |
Uniform Blur RGB | def uniformBlurRGB(toBlur: ImageBasics, radius: Int): ImageBasics | Blur an image with a uniform kernel. |
Epanechnikov Blur RGB | def epanechnikovBlurRGB(toBlur: ImageBasics, radius: Int): ImageBasics | Blur an image with an Epanechnikov kernel. |
Gaussian Blur RGB | Blurs an image with a Gaussian kernel. | |
Difference Matte | def differenceMatte(img1: ImageBasics, img2: ImageBasics): ImageBasics | Compute the difference between two images in RGB space. |