forked from External/mage
...
This commit is contained in:
parent
c346276b0d
commit
ad50277430
24 changed files with 220 additions and 85 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue