Normand Briere
2019-08-20 537f4ac57ae2b34f0a04fa63874c8ca6534c9a6d
ObjEditor.java
....@@ -134,8 +134,14 @@
134134
135135 try
136136 {
137
- BufferedImage image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name));
138
-
137
+ BufferedImage image;
138
+
139
+ if (name.endsWith("jpg"))
140
+ // Much faster!
141
+ image = new sun.awt.image.codec.JPEGImageDecoderImpl(ObjEditor.class.getClassLoader().getResourceAsStream(name)).decodeAsBufferedImage();
142
+ else
143
+ image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name));
144
+
139145 // if (image.getWidth() > 48 && image.getHeight() > 48)
140146 // {
141147 // BufferedImage resized = new BufferedImage(48, 48, image.getType());
....@@ -1789,7 +1795,7 @@
17891795 cGridBag creditsPanel = new cGridBag().setVertical(true);
17901796 creditsPanel.setName("Credits");
17911797
1792
- cLabel ogaLabel = new cLabel(" Most Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF);
1798
+ cLabel ogaLabel = new cLabel(" Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF);
17931799 creditsPanel.add(ogaLabel);
17941800
17951801 cButton creditButton;
....@@ -1811,7 +1817,7 @@
18111817 }
18121818 });
18131819
1814
- ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF);
1820
+ ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF);
18151821 creditsPanel.add(ogaLabel);
18161822
18171823 creditsPanel.add(creditButton = GetButton("icons/3delicious.png", !Globals.NIMBUSLAF));