This commit is contained in:
magenoxx 2010-11-05 15:53:24 +00:00
parent c346276b0d
commit ad50277430
24 changed files with 220 additions and 85 deletions

View file

@ -52,6 +52,8 @@ import mage.view.AbilityView;
import mage.view.CardView;
import mage.view.StackAbilityView;
import com.mortennobel.imagescaling.ResampleOp;
/**
*
* @author BetaSteward_at_googlemail.com
@ -299,4 +301,14 @@ public class ImageHelper {
}
}
/**
* Returns an image scaled to the size appropriate for the card picture
* panel
*/
public static BufferedImage getResizedImage(BufferedImage original, int width, int height) {
ResampleOp resampleOp = new ResampleOp(width, height);
BufferedImage image = resampleOp.filter(original, null);
return image;
}
}