changeset 924:6853c02b238b

fixed problem with progressive jpeg images
author robcast
date Fri, 16 Dec 2011 14:34:04 +0100
parents 45effb9c9bed
children 66f1ba72d07b
files common/src/main/java/digilib/image/ImageInfoDocuImage.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/src/main/java/digilib/image/ImageInfoDocuImage.java	Mon Dec 12 20:37:53 2011 +0100
+++ b/common/src/main/java/digilib/image/ImageInfoDocuImage.java	Fri Dec 16 14:34:04 2011 +0100
@@ -39,7 +39,12 @@
             if (iif.check()) {
                 ImageSize d = new ImageSize(iif.getWidth(), iif.getHeight());
                 ii.setSize(d);
-                ii.setMimetype(iif.getMimeType());
+                String mt = iif.getMimeType();
+                // fix image/pjpeg
+                if (mt.equals("image/pjpeg")) {
+                    mt = "image/jpeg";
+                }
+                ii.setMimetype(mt);
                 logger.debug("image size: " + ii.getSize());
                 return ii;
             }