dragon66 / icafe

Java library for reading, writing, converting and manipulating images and metadata
Eclipse Public License 1.0
203 stars 58 forks source link

TestMetadata does not work #106

Closed anowak-ct closed 1 year ago

anowak-ct commented 3 years ago

Run TestMetadata agsinst a few (valid!) jpeg images. Always getting the following error:

--- exec-maven-plugin:3.0.0:exec (default-cli) @ icafe ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.IllegalArgumentException: Invalid JPEG image, expected SOI marker not found!
    at com.icafe4j.image.jpeg.JPGTweaker.readMetadata(JPGTweaker.java:1822)
    at com.icafe4j.image.meta.Metadata.readMetadata(Metadata.java:518)
    at com.icafe4j.image.meta.Metadata.readMetadata(Metadata.java:496)
    at com.icafe4j.image.meta.Metadata.readMetadata(Metadata.java:545)
    at com.icafe4j.test.TestMetadata.test(TestMetadata.java:63)
    at com.icafe4j.test.TestMetadata.main(TestMetadata.java:52)
dragon66 commented 3 years ago

Not sure if it is related to the other errors you had but if a jpg doesn't contain a SOI segment it is not a valid one to icafe. If after you solve the other errors and you still have this issue, try put the image somewhere I can have access or email to me so that I can take a look.