quick hack to use JPEG again. better solution on the way.
authormh <mh>
Mon, 8 Apr 2002 01:58:08 +0000 (01:58 +0000)
committermh <mh>
Mon, 8 Apr 2002 01:58:08 +0000 (01:58 +0000)
dbscripts/populate_mediatyp.sql
source/mir/misc/WebdbImage.java

index 55d61e4..d540eab 100755 (executable)
@@ -23,9 +23,9 @@ INSERT INTO "media_type" VALUES (8,'mov','video/quicktime','Video','Video',NULL)
 INSERT INTO "media_type" VALUES (7,'mpg','video/mpeg','Video','Video',NULL);
 INSERT INTO "media_type" VALUES (9,'avi','video/x-msvideo','Video','Video',NULL);
 INSERT INTO "media_type" VALUES (6,'pdf','application/pdf','Generic','Other',NULL);
-INSERT INTO "media_type" VALUES (15,'png','image/*','Images','Images',NULL);
+INSERT INTO "media_type" VALUES (15,'png','- deprecated -','Images','Images',NULL);
 INSERT INTO "media_type" VALUES (3,'jpg','- deprecated -','Images','Images',NULL);
-INSERT INTO "media_type" VALUES (5,'jpg','- deprecated -','Images','Images',NULL);
+INSERT INTO "media_type" VALUES (5,'jpg','image/*','Images','Images',NULL);
 INSERT INTO "media_type" VALUES (16,'asf','video/x-ms-asf','Video','Video',NULL);
 INSERT INTO "media_type" VALUES (17,'rm','application/vnd.rn-realmedia','RealVideo','Video',NULL);
 INSERT INTO "media_type" VALUES (18,'mp3','audio/mpeg','Mp3','Audio',NULL);
index 2c6bc91..0513938 100755 (executable)
@@ -80,7 +80,7 @@ public class WebdbImage
                if (imageData==null) {
                        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
             // @todo the choice of PNG or JPEG should be made configurable
-            JAI.create("encode", planarImage, outStream, "PNG", null);
+            JAI.create("encode", planarImage, outStream, "JPEG", null);
                        imageData = outStream.toByteArray();
                }
                return imageData;
@@ -137,7 +137,7 @@ public class WebdbImage
       PlanarImage temp = JAI.create("scale", params);
                        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
             // @todo the choice of PNG or JPEG should be made configurable
-            JAI.create("encode", temp, outStream, "PNG", null);
+            JAI.create("encode", temp, outStream, "JPEG", null);
                        iconData = outStream.toByteArray();
                        iconWidth=temp.getWidth();
                        iconHeight=temp.getHeight();