Commit 1c50821c authored by petter's avatar petter

Also support enlargement of frames

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@131 0463f305-d864-43cb-8a47-61cf597d4139
parent 232ecfbc
......@@ -207,9 +207,19 @@ public class ImageCreator {
w = targetWidth;
h = targetHeight;
}
if (w < targetWidth || h < targetHeight){
BufferedImage tmp = new BufferedImage(targetWidth, targetHeight, type);
Graphics2D g2 = tmp.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);
g2.drawImage(ret, 0, 0, w, h, null);
g2.dispose();
return tmp;
}
do
{
System.out.println("And another round: "+w+" "+h+" on the way to "+targetWidth+" " +targetHeight);
if (higherQuality && w > targetWidth)
{
w /= 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment