We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55abbc7 commit 25c1ac8Copy full SHA for 25c1ac8
tools/src/main/java/org/apache/pdfbox/tools/imageio/ImageIOUtil.java
@@ -350,7 +350,7 @@ private static byte[] getAsDeflatedBytes(ICC_Profile profile) throws IOException
350
{
351
byte[] data = profile.getData();
352
353
- ByteArrayOutputStream deflated = new ByteArrayOutputStream(Math.max(32, 2 * data.length));
+ ByteArrayOutputStream deflated = new ByteArrayOutputStream(Math.max(32, data.length / 2));
354
try (DeflaterOutputStream deflater = new DeflaterOutputStream(deflated))
355
356
deflater.write(data);
0 commit comments