Closed liujiuwu closed 11 years ago
Scrimgage is not Thumbnails - that's a different library. But you're right that position isn't used that's a bug.
I've pushed a fix. I'll do a release onto maven later but for now you can build from source and let me know if its ok ?
Sksamuel thanks! I mean is Scrimgage Similar functions of Thumbnails . I can wait pushing scrimage!
Released onto maven - usually takes 12 hours to show up.
I use Thumbnails,it set resize start position(x,y) Thumbnails.of("d:\tmp\rest.jpg") .size(320, 200).sourceRegion(10,40, 320, 200) .outputQuality(1f) .toFile(new File("d:\tmp\rest3.jpg"));
Scrimage i see code Position is not use.
def resizeTo(targetWidth: Int, targetHeight: Int, position: Position = Center): Image = { val target = Image.empty(targetWidth, targetHeight) val g2 = target.awt.getGraphics.asInstanceOf[Graphics2D] g2.drawImage(awt, 0, 0, null) g2.dispose() target }
why?
I want use jcrop user avatar! Thanks!