PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) HTML/CSS rendering issues Not embeddable color type. Reformatting image…

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26888

    Hi

    I am evaluating pd4ml and find that images are a bit blurred. When I turn debug info on I get this warning:

    “Not embeddable color type. Reformatting image…”

    I could not find info about this anywhere. Could you please tell me what might cause it? What are the supported embeddable color types? My image is png.

    Thank you

    #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]

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.