.. | .. |
---|
134 | 134 | |
---|
135 | 135 | try |
---|
136 | 136 | { |
---|
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 | + |
---|
139 | 145 | // if (image.getWidth() > 48 && image.getHeight() > 48) |
---|
140 | 146 | // { |
---|
141 | 147 | // BufferedImage resized = new BufferedImage(48, 48, image.getType()); |
---|
.. | .. |
---|
1789 | 1795 | cGridBag creditsPanel = new cGridBag().setVertical(true); |
---|
1790 | 1796 | creditsPanel.setName("Credits"); |
---|
1791 | 1797 | |
---|
1792 | | - cLabel ogaLabel = new cLabel(" Most Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
| 1798 | + cLabel ogaLabel = new cLabel(" Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
1793 | 1799 | creditsPanel.add(ogaLabel); |
---|
1794 | 1800 | |
---|
1795 | 1801 | cButton creditButton; |
---|
.. | .. |
---|
1811 | 1817 | } |
---|
1812 | 1818 | }); |
---|
1813 | 1819 | |
---|
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); |
---|
1815 | 1821 | creditsPanel.add(ogaLabel); |
---|
1816 | 1822 | |
---|
1817 | 1823 | creditsPanel.add(creditButton = GetButton("icons/3delicious.png", !Globals.NIMBUSLAF)); |
---|