When a literal sequence was following a 127 long run sequence, as found in splash_logo-development.png at 75x65,
the first literal value was skipped, breaking the RLE stream. Fix #6255. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38890 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -201,19 +201,18 @@ write_24bit_image(const char* baseName, int width, int height, png_bytep* rowPtr
|
|||||||
}
|
}
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
}
|
}
|
||||||
buffer[0]++;
|
} else {
|
||||||
buffer[buffer[0]] = row[x];
|
if (count > 0) {
|
||||||
} else if (count > 0) {
|
|
||||||
buffer[0] = 1;
|
|
||||||
buffer[1] = row[x];
|
|
||||||
bufferActive = true;
|
|
||||||
if (count > 1) {
|
|
||||||
fprintf(sOutput, "%d, ", count);
|
fprintf(sOutput, "%d, ", count);
|
||||||
new_line_if_required();
|
new_line_if_required();
|
||||||
fprintf(sOutput, "%d, ", currentValue);
|
fprintf(sOutput, "%d, ", currentValue);
|
||||||
new_line_if_required();
|
new_line_if_required();
|
||||||
}
|
}
|
||||||
|
buffer[0] = 0;
|
||||||
|
bufferActive = true;
|
||||||
}
|
}
|
||||||
|
buffer[0]++;
|
||||||
|
buffer[buffer[0]] = row[x];
|
||||||
currentValue = row[x];
|
currentValue = row[x];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -304,19 +303,18 @@ write_8bit_image(const char* baseName, int width, int height, unsigned char** ro
|
|||||||
}
|
}
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
}
|
}
|
||||||
buffer[0]++;
|
} else {
|
||||||
buffer[buffer[0]] = row[x];
|
if (count > 0) {
|
||||||
} else if (count > 0) {
|
|
||||||
buffer[0] = 1;
|
|
||||||
buffer[1] = row[x];
|
|
||||||
bufferActive = true;
|
|
||||||
if (count > 1) {
|
|
||||||
fprintf(sOutput, "%d, ", count);
|
fprintf(sOutput, "%d, ", count);
|
||||||
new_line_if_required();
|
new_line_if_required();
|
||||||
fprintf(sOutput, "%d, ", currentValue);
|
fprintf(sOutput, "%d, ", currentValue);
|
||||||
new_line_if_required();
|
new_line_if_required();
|
||||||
}
|
}
|
||||||
|
buffer[0] = 0;
|
||||||
|
bufferActive = true;
|
||||||
}
|
}
|
||||||
|
buffer[0]++;
|
||||||
|
buffer[buffer[0]] = row[x];
|
||||||
currentValue = row[x];
|
currentValue = row[x];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user