Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package kierros3
- object Filter {
- private def createColor(alpha: Int, red: Int, green: Int, blue:Int): Int = {
- if ((Math.min(alpha, 255) == alpha && Math.max(alpha, 0) == alpha)
- && (Math.min(red, 255) == red && Math.max(red, 0) == red)
- && (Math.min(green, 255) == green && Math.max(green, 0) == green)
- && (Math.min(blue, 255) == blue && Math.max(blue, 0) == blue))
- {
- val movedAlpha = alpha
- val movedRed = red << 8
- val movedGreen = green << 16
- val movedBlue = blue << 24
- val result = movedAlpha & movedRed & movedGreen & movedBlue
- return result
- }
- else return -1
- }
- def lightness(factor: Float, image: Image) : Unit = {}
- def invert(image: Image) : Unit = {}
- def grayscale(image: Image) : Unit = {}
- def adjustRed(amount: Int, image: Image) : Unit = {}
- def adjustGreen(amount: Int, image: Image) : Unit = {}
- def adjustBlue(amount: Int, image: Image) : Unit = {}
- def blur(amount: Int, image: Image) : Unit = {}
- def sharpen(amount: Int, image: Image) : Unit = {}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement