mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-05 18:34:45 +00:00
fix zero image width/height
This commit is contained in:
@@ -1767,6 +1767,12 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
|
||||
|
||||
int width = (int) (viewRect.getWidth() * zoom); //int) (rect.getWidth() * zoom);
|
||||
int height = (int) (viewRect.getHeight() * zoom);//(int) (rect.getHeight() * zoom);(int) (rect.getHeight() * zoom);
|
||||
if (width == 0) {
|
||||
width = 1;
|
||||
}
|
||||
if (height == 0) {
|
||||
height = 1;
|
||||
}
|
||||
SerializableImage image = new SerializableImage((int) Math.ceil(width / SWF.unitDivisor),
|
||||
(int) Math.ceil(height / SWF.unitDivisor), SerializableImage.TYPE_INT_ARGB);
|
||||
//renderContext.borderImage = new SerializableImage(image.getWidth(), image.getHeight(), SerializableImage.TYPE_INT_ARGB);
|
||||
|
||||
Reference in New Issue
Block a user