#29433

The message is not fatal, it only means the image cannot be embedded to PDF “as is”, and needs to be converted to an internal PDF image format. However, of course, a conversion takes CPU resources and a resulting PDF slightly grows.

PNG has some requirements in order to be embeddable: if should be 8 bit, not be interlaced and not have a transparency mask and translucency layer.

In the code below colorType==3 refers to PNG8, otherwise it is PNG24

[language=java:22arj1xh]…
if ( bitDepth > 8 ) {
if ( debug ) {
System.err.println( “can not embed ” + fileName +
“. PNG should not have more than 256 colors. Reformatting image…” );
}
unsupportedType = true;
}

if ( colorType > 3 ) {
if ( debug ) {
System.err.println( “can not embed ” + fileName +
“. Not embeddable color type. Reformatting image…” );
}
unsupportedType = true;
}

if ( interlaceMethod > 0 ) {
if ( debug ) {
System.err.println( “can not embed ” + fileName +
“. Interlaced PNG are not embeddable. Reformatting image…” );
}
unsupportedType = true;
}[/language:22arj1xh]