Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,27 +144,27 @@ private static PDImageXObject convertPng(PDDocument doc, PNGConverterState state

if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4 && bitDepth != 8 && bitDepth != 16)
{
LOG.error("Invalid bit depth %d.", bitDepth);
LOG.error("Invalid bit depth {}.", bitDepth);
return null;
}
if (width <= 0 || height <= 0)
{
LOG.error("Invalid image size %d x %d", width, height);
LOG.error("Invalid image size {} x {}", width, height);
return null;
}
if (compressionMethod != 0)
{
LOG.error("Unknown PNG compression method %d.", compressionMethod);
LOG.error("Unknown PNG compression method {}.", compressionMethod);
return null;
}
if (filterMethod != 0)
{
LOG.error("Unknown PNG filtering method %d.", compressionMethod);
LOG.error("Unknown PNG filtering method {}.", compressionMethod);
return null;
}
if (interlaceMethod != 0)
{
LOG.debug("Can't handle interlace method %d.", interlaceMethod);
LOG.debug("Can't handle interlace method {}.", interlaceMethod);
return null;
}

Expand Down Expand Up @@ -224,7 +224,7 @@ private static PDImageXObject buildIndexImage(PDDocument doc, PNGConverterState
}
if (state.bitsPerComponent > 8)
{
LOG.debug("Can only convert indexed images with bit depth <= 8, not %d.",
LOG.debug("Can only convert indexed images with bit depth <= 8, not {}.",
state.bitsPerComponent);
return null;
}
Expand All @@ -238,7 +238,7 @@ private static PDImageXObject buildIndexImage(PDDocument doc, PNGConverterState
int highVal = (plte.length / 3) - 1;
if (highVal > 255)
{
LOG.error("Too much colors in PLTE, only 256 allowed, found %d colors.",
LOG.error("Too much colors in PLTE, only 256 allowed, found {} colors.",
highVal + 1);
return null;
}
Expand Down Expand Up @@ -365,7 +365,7 @@ private static PDImageXObject buildImageObject(PDDocument document, PNGConverter
{
if (state.sRGB.length != 1)
{
LOG.error("sRGB chunk has an invalid length of %d", state.sRGB.length);
LOG.error("sRGB chunk has an invalid length of {}", state.sRGB.length);
return null;
}

Expand Down Expand Up @@ -435,7 +435,7 @@ private static PDImageXObject buildImageObject(PDDocument document, PNGConverter
byte compressionMethod = state.iCCP.bytes[state.iCCP.start + iccProfileDataStart];
if (compressionMethod != 0)
{
LOG.error("iCCP chunk: invalid compression method %d", compressionMethod);
LOG.error("iCCP chunk: invalid compression method {}", compressionMethod);
return null;
}
// Skip over the compression method
Expand Down