Skip to content

Instantly share code, notes, and snippets.

View dflemstr's full-sized avatar

David Flemström dflemstr

View GitHub Profile
package se.dflemstr.imgproc.passes
import java.awt.image.BufferedImage
import se.dflemstr.imgproc.graphics.Texture
object NearestNeighbor extends Pass {
val title = "Nearest Neighbor interpolation detection"
val description = "A pass that highlights duplicate pixels in an image."
package se.dflemstr.imgproc.passes
import java.awt.image.BufferedImage
import se.dflemstr.imgproc.graphics.Texture
object NearestNeighbor extends Pass {
val title = "Nearest Neighbor interpolation detection"
val description = "A pass that highlights duplicate pixels in an image."
object SomeRandomPass extends Pass {
val title = "Stuff"
val description = "Stuff"
//Magie: dieser Code fügt zwei Methoden zur Klasse BufferedImage hinzu
//Tu dies in dein Pass herein unter "val description = ..." um es zu aktivieren
case class Color(a: Int, r: Int, g: Int, b: Int)
implicit def addColorAccessTo(img: BufferedImage) = new {
def apply(x: Int, y: Int) = {