-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported Image Formats #19
Comments
It is an expected behavior, but certainly not desired. It appears due to https://github.com/KilianB/UtilityCode only supporting byte and int a/rgb image formats. -> monochromatic or ushort encoded images will throw an error. If you can please provide the integer value returned by this method: bImage.getType() for the failing images so I see which encoding should be supported the next. |
Minor version bump resolving #19. Support all types of exotic buffered image types
Got around to quickly fix it today. Please try version 2.1.1 |
Thank you for the quick fix! It works perfectly. |
Hi,
I'm facing an issue with about ~4% of the images I'm trying to generate a hash value for are not supported.
The majority of the errors I get are 'UnsupportedOperationException'. I get either:
java.lang.UnsupportedOperationException: The image type is currently not supported: 10
at com.github.kilianB.graphics.FastPixel.create(FastPixel.java:38)
at com.github.kilianB.hashAlgorithms.PerceptiveHash.hash(PerceptiveHash.java:44)
at com.github.kilianB.hashAlgorithms.HashingAlgorithm.hash(HashingAlgorithm.java:122)
Example of an image that gets this error: https://console.brax-cdn.com/creatives/b86bbc0b-1fab-4ae3-9b34-fef78c1a7488/5_1200x800_ee7df89490d518b2f6fb8c739cbbfa30.png
Or:
java.lang.UnsupportedOperationException: The image type is currently not supported: 13
at com.github.kilianB.graphics.FastPixel.create(FastPixel.java:38)
at com.github.kilianB.hashAlgorithms.PerceptiveHash.hash(PerceptiveHash.java:44)
at com.github.kilianB.hashAlgorithms.HashingAlgorithm.hash(HashingAlgorithm.java:122)
Example of an image that generated this error: http://scd.pt.rfi.fr/sites/portugues.filesrfi/dynimagecache/0/42/337/190/1024/578/sites/images.rfi.fr/files/aef_image/dog2.gif
Also, for a small percentage of images I get an 'IllegalArgumentException':
java.lang.IllegalArgumentException: Unknown image type 0
at java.awt.image.BufferedImage.(BufferedImage.java:501)
at com.github.kilianB.graphics.ImageUtil.getScaledInstance(ImageUtil.java:40)
at com.github.kilianB.hashAlgorithms.PerceptiveHash.hash(PerceptiveHash.java:44)
at com.github.kilianB.hashAlgorithms.HashingAlgorithm.hash(HashingAlgorithm.java:122)
For example: https://ocdn.eu/pulscms-transforms/1/xkZktkpTURBXy9iZDgyYWY0YWNmNWRhY2NlZTA1OTZkYTVmNDcwYWUyNC5wbmeSlQMCAM0DTs0B3JMFzQNSzQG9
Is this an expected behavior and will not be fixed? Or is it a bug?
Thank you!
The text was updated successfully, but these errors were encountered: