Mercurial > hg > digilib-old
annotate servlet/src/digilib/image/ImageOps.java @ 472:f8ca069517a2
Bugfix for images not found in dir: added sorting for ArrayLists of ImageFilesets
| author | hertzhaft |
|---|---|
| date | Fri, 07 Apr 2006 20:39:07 +0200 |
| parents | 5259018dce6c |
| children | baaa5bab5e16 |
| rev | line source |
|---|---|
| 281 | 1 /* ImageOps -- convenience methods for images |
| 458 | 2 |
| 281 | 3 Digital Image Library servlet components |
| 458 | 4 |
| 281 | 5 Copyright (C) 2004 Robert Casties (robcast@mail.berlios.de) |
| 458 | 6 |
| 281 | 7 This program is free software; you can redistribute it and/or modify it |
| 8 under the terms of the GNU General Public License as published by the | |
| 9 Free Software Foundation; either version 2 of the License, or (at your | |
| 10 option) any later version. | |
| 11 | |
| 12 Please read license.txt for the full details. A copy of the GPL | |
| 13 may be found at http://www.gnu.org/copyleft/lgpl.html | |
| 458 | 14 |
| 281 | 15 You should have received a copy of the GNU General Public License |
| 16 along with this program; if not, write to the Free Software | |
| 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 458 | 18 |
| 281 | 19 * Created on 13.10.2004 |
| 20 */ | |
| 21 package digilib.image; | |
| 22 | |
| 23 import java.io.IOException; | |
| 24 | |
| 25 import digilib.io.ImageFile; | |
| 26 | |
| 27 /** | |
| 28 * convenience methods for images | |
| 458 | 29 * |
| 281 | 30 * @author casties |
| 31 */ | |
| 32 public class ImageOps { | |
| 458 | 33 |
|
462
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
34 public static final int TYPE_AUTO = 0; |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
35 public static final int TYPE_JPEG = 1; |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
36 public static final int TYPE_PNG = 2; |
| 458 | 37 |
|
462
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
38 private static DocuImage docuImg; |
| 458 | 39 |
| 40 public static boolean checkFile(ImageFile imgf) throws IOException { | |
|
462
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
41 return docuImg.identify(imgf); |
| 458 | 42 } |
| 43 | |
|
462
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
44 public static void setDocuImage(DocuImage di) { |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
45 docuImg = di; |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
46 } |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
47 |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
48 public static DocuImage getDocuImage() { |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
49 return docuImg; |
|
03ff7238c9d4
second try for flashpix support (doesn't work currently...)
robcast
parents:
458
diff
changeset
|
50 } |
| 281 | 51 } |
