seam-carving

Using a TreeMap with images

廉价感情. 提交于 2019-12-24 00:35:09
问题 For representing most popular artists from EchoNest API, I've been trying to set-up Silverlight Toolkit's TreeMap using images, their TreeItemDefinition.ValueBinding being defined as the area of the image. While it mostly fills up the space when the image stretch is set to 'Fill' : When setting image stretch to 'Uniform' a lot of blank spaces remain : On this post, image carving is suggested : Treemapping with a given aspect ratio How can I know which images should be carved and at what

Rotating BufferedImage changes its colors

拜拜、爱过 提交于 2019-11-29 12:37:21
I'm trying to code a class to seam carve images in x and y direction. The x direction is working, and to reduce the y direction I thought about simply rotating the image 90° and run the same code over the already rescaled image (in x direction only) and after that, rotate it back to its initial state. I found something with AffineTransform and tried it. It actually produced a rotated image, but messed up the colors and I don't know why. This is all the code: import java.awt.image.BufferedImage; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.io.File;

Rotating BufferedImage changes its colors

别等时光非礼了梦想. 提交于 2019-11-28 06:25:30
问题 I'm trying to code a class to seam carve images in x and y direction. The x direction is working, and to reduce the y direction I thought about simply rotating the image 90° and run the same code over the already rescaled image (in x direction only) and after that, rotate it back to its initial state. I found something with AffineTransform and tried it. It actually produced a rotated image, but messed up the colors and I don't know why. This is all the code: import java.awt.image