ImageCropper: fails with unhelpful error message on very large pictures

34 Views Asked by At

Using Primefaces's ImageCropper component, cropping a png image of 15,000 x 12,000 pixels fails, the only error trace I get is error reading png data. There is no error trace logged on my local IDE.

  • local IDE: NetBeans
  • JDK: 17
  • server: Payara
1

There are 1 best solutions below

0
On

The error was investigated in a Github issue posted on the Primefaces repo.

It seems that the issue lays in the JDK, not in Primefaces. The error disappears when:

  • the image is converted to jpg
  • or a smaller png image is used

There is no reason for Primefaces to work on solving this issue and I document it here for future users.