HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting sun.awt.image.ImageFormatException: Unsupported color conver

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #28366

    It could be that your jpeg is using the CMYK color model rather than RGB.

    You can convert it on a fly (with JAI, for example) using custom resource loaders API.

    See pd4ml-html-css-pdf-tips-tricks-f7/a-definition-of-custom-resource-loaders-t40.html

    #28367

    Hi,

    I tried the CMYK to RGB conversion trick (CmykImageLoader.java) but my image can’t get metadata with reader.getImageMetadata(0);. Is there any others way for me to solve sun.awt.image.ImageFormatException: Unsupported color conversion request?


    if (“JPEG”.equalsIgnoreCase(format) || “JPG”.equalsIgnoreCase(format)) {

    IIOMetadata metadata = reader.getImageMetadata(0);
    String metadataFormat = metadata.getNativeMetadataFormatName();
    IIOMetadataNode iioNode = (IIOMetadataNode) metadata.getAsTree(metadataFormat);

    #28368

    > but my image can’t get metadata with reader.getImageMetadata(0);.

    What kind of error it produces?

    #28369

    @PD4ML wrote:

    > but my image can’t get metadata with reader.getImageMetadata(0);.

    What kind of error it produces?

    reader.getImageMetadata is null so unable to proceed to next line of code.

    #28370

    @Guest wrote:

    @PD4ML wrote:

    > but my image can’t get metadata with reader.getImageMetadata(0);.

    What kind of error it produces?

    reader.getImageMetadata is null so unable to proceed to next line of code.

    Any idea on this issue? I don’t know why I can’t get any information from Image Metadata.

Viewing 5 posts - 16 through 20 (of 20 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.