Skip to content

Commit

Permalink
Restrict BGR swapping to uncompressed data only
Browse files Browse the repository at this point in the history
Other compression types appear to handle this internally without requiring correction.
  • Loading branch information
melissalinkert committed Aug 8, 2023
1 parent feeb527 commit 97b60fd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ private void parseETSFile(RandomAccessInputStream etsFile, String file, int s)

etsFile.skipBytes(4 * 10 - color.length); // background color
int componentOrder = etsFile.readInt();
bgr[s] = componentOrder == 1;
bgr[s] = componentOrder == 1 && compressionType.get(compressionType.size() - 1) == RAW;
boolean usePyramid = etsFile.readInt() != 0;

ms.rgb = ms.sizeC > 1;
Expand Down

0 comments on commit 97b60fd

Please sign in to comment.