This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.imageio.ImageIO | |
import java.io.File | |
import java.awt.image.BufferedImage | |
import java.awt.{ RenderingHints, AlphaComposite } | |
// Content-aware image cropping with ChunkyPNG | |
// https://gist.github.com/a54cd41137b678935c91 | |
final class Cropper(file: String) { | |
val image = ImageIO.read(new File(file)) |