Author: toad
Date: 2008-02-08 20:46:40 +0000 (Fri, 08 Feb 2008)
New Revision: 17720
Modified:
trunk/freenet/src/freenet/clients/http/filter/JPEGFilter.java
Log:
Write the chunk lengths
Modified: trunk/freenet/src/freenet/clients/http/filter/JPEGFilter.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/filter/JPEGFilter.java
2008-02-08 20:31:19 UTC (rev 17719)
+++ trunk/freenet/src/freenet/clients/http/filter/JPEGFilter.java
2008-02-08 20:46:40 UTC (rev 17720)
@@ -137,8 +137,10 @@
int blockLength;
if(markerType == MARKER_EOI || markerType >=
MARKER_RST0 && markerType <= MARKER_RST7)
blockLength = 0;
- else
+ else {
blockLength = dis.readUnsignedShort();
+ if(dos != null)
dos.writeShort(blockLength);
+ }
if(markerType == 0xDB // quantisation table
|| markerType == 0xC4 //
huffman table
|| markerType == 0xC0) { //
start of frame
@@ -196,8 +198,10 @@
continue; // Avoid writing the header
twice
} else if(markerType == 0xE0) { // APP0
+ if(logMINOR) Logger.minor(this, "APP0");
String type =
readNullTerminatedAsciiString(dis);
if(baos != null)
writeNullTerminatedString(baos, type);
+ if(logMINOR) Logger.minor(this, "Type:
"+type+" length "+type.length());
if(type.equals("JFIF")) {
Logger.minor(this, "JFIF
Header");
// File header