ImageIO.read illegal argument exception - raster bands/colour space components?

后端 未结 3 737
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 20:11

Apologies for the somewhat vague title, I can\'t work out what the keywords are here. The setup\'s quite simple, I\'m opening an image with

ImageIO.read(new          


        
3条回答
  •  一生所求
    2020-12-14 20:52

    It is possible to read this image using twelvemonkeys ImageIO, which is a more robust and forgiving replacement for the original ImageIO provided by the JRE.

    See https://github.com/haraldk/TwelveMonkeys/

    I found this solution in the PDF Box Jira https://issues.apache.org/jira/browse/PDFBOX-3637

    In order to use twelvemonkeys, it is sufficient to add it as a maven dependency. It then registers itself before the default image processor.

    
        com.twelvemonkeys.imageio
        imageio-jpeg
        3.3.2 
    
    

提交回复
热议问题