Skip to content

Number of color/alpha components exception when reading PNG images #20

@mksplg

Description

@mksplg

When reading certain PNG images the following exception is thrown:

Exception in thread "main" java.lang.IllegalArgumentException: Number of color/alpha components should be 4 but length of bits array is 3
    at java.awt.image.ColorModel.<init>(ColorModel.java:341)
    at java.awt.image.ComponentColorModel.<init>(ComponentColorModel.java:273)
    at at.ac.tuwien.photohawk.evaluation.colorconverter.ICCProfileColorConverter.<init>(ICCProfileColorConverter.java:53)
    at at.ac.tuwien.photohawk.evaluation.colorconverter.srgb.SRGBColorConverter.<init>(SRGBColorConverter.java:39)
    at at.ac.tuwien.photohawk.evaluation.qa.SsimQa.evaluate(SsimQa.java:71)
    at at.ac.tuwien.photohawk.commandline.Ssim.evaluate(Ssim.java:116)
    at at.ac.tuwien.photohawk.commandline.Photohawk.init(Photohawk.java:112)
    at at.ac.tuwien.photohawk.commandline.Photohawk.main(Photohawk.java:52)

One example where the problem occurrs is file 920000.png from govdocs.
920000

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions