deweese 2003/04/04 15:52:20
Modified: sources/org/apache/batik/ext/awt/image/spi
JPEGRegistryEntry.java
Log:
JPEG Registry entry now has 'magic number' entry for EXIF files as well as JFIF
(This normally wasn't noticed since the JDK entry would pick it up, but
the JPEG entry is generally a bit faster than the JDK entry).
Revision Changes Path
1.10 +8 -3
xml-batik/sources/org/apache/batik/ext/awt/image/spi/JPEGRegistryEntry.java
Index: JPEGRegistryEntry.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/ext/awt/image/spi/JPEGRegistryEntry.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- JPEGRegistryEntry.java 19 Feb 2003 02:50:57 -0000 1.9
+++ JPEGRegistryEntry.java 4 Apr 2003 23:52:20 -0000 1.10
@@ -29,13 +29,19 @@
public class JPEGRegistryEntry
extends MagicNumberRegistryEntry {
- static final byte [] signature = {(byte)0xFF, (byte)0xd8,
+ static final byte [] sigJFIF = {(byte)0xFF, (byte)0xd8,
(byte)0xFF, (byte)0xe0};
+ static final byte [] sigEXIF = {(byte)0xFF, (byte)0xd8,
+ (byte)0xFF, (byte)0xe1};
static final String [] exts = {"jpeg", "jpg" };
static final String [] mimeTypes = {"image/jpeg", "image/jpg" };
+ static final MagicNumber [] magicNumbers = {
+ new MagicNumber(0, sigJFIF),
+ new MagicNumber(0, sigEXIF)
+ };
public JPEGRegistryEntry() {
- super("JPEG", exts, mimeTypes, 0, signature);
+ super("JPEG", exts, mimeTypes, magicNumbers);
}
/**
@@ -51,7 +57,6 @@
public Filter handleStream(InputStream inIS,
ParsedURL origURL,
boolean needRawData) {
-
final DeferRable dr = new DeferRable();
final InputStream is = inIS;
final String errCode;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]