summaryrefslogtreecommitdiff
blob: f6d695f2894bbc9bdc11c368b81fe63ec6013b89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff -ru skinlf-1.2.12-orig/src/com/l2fprod/tools/ImageUtils.java skinlf-1.2.12/src/com/l2fprod/tools/ImageUtils.java
--- skinlf-1.2.12-orig/src/com/l2fprod/tools/ImageUtils.java	2006-01-22 13:14:39.000000000 +0100
+++ skinlf-1.2.12/src/com/l2fprod/tools/ImageUtils.java	2006-01-22 13:19:13.000000000 +0100
@@ -6,15 +6,12 @@
 
 import javax.swing.ImageIcon;
 
-import com.ibm.imageconversion.*;
 import com.sun.jimi.core.*;
 
 public class ImageUtils {
 
   public static Component bitmapCreator = new javax.swing.JLabel();
   
-  static BMPDecoder decoder = new BMPDecoder();
-  static BMPEncoder encoder = new BMPEncoder();
 
   public static Image loadPng(String pathToImage) throws Exception {
     ImageIcon icon = new ImageIcon(new File(pathToImage).toURL());
@@ -30,17 +27,7 @@
     try {
       System.out.println("working with " + pathToImage);
       Image image = null;
-
-      if (pathToImage.toLowerCase().endsWith(".png") ||
-        	pathToImage.toLowerCase().endsWith(".gif")) {
-        image = loadPng(pathToImage);
-      } else if (pathToImage.toLowerCase().endsWith(".bmp")) {
-        decoder.setInputFilename(pathToImage);
-        decoder.triggerAction();
-        image = decoder.getResult();
-      } else {
-        throw new Error("do not know how to load " + pathToImage);
-      }
+      image = Toolkit.getDefaultToolkit().getImage(pathToImage);
 
       // if only one image, dump it as it
 	    if (index == 0 && maxParts == 1) {