nyqui / AI-Image-EXIF-Viewer

MIT License
12 stars 1 forks source link

gens from vladmandic/automatic are not parsed correctly? #29

Closed nyqui closed 1 year ago

nyqui commented 1 year ago

https://arca.live/b/aiart/78612290

nyqui commented 1 year ago

JPG gens from automatic1111, uploaded: works fine the problematic gen from vladmandic downloaded then drag+dropped onto browser: works fine

nyqui commented 1 year ago

30

nyqui commented 1 year ago

caused by JPEG file beginning with FF D8 FF E0 rather than FF D8 FF E1

the previous code only supported the latter when clicking an image on a webpage

fixed by adding on additional offset specified in the 2-byte length variable immediately following the FF D8 FF E0. should handle the FF E1 just like it did before.

has a probability of crashing and burning if the variable is wrong


curiously, the original code calls the casestry-exif-library and UPNG only when reading locally. calls its own homebrew decoding method when reading from page, presumably to save bandwidth? or carryover from the code's previous iterations?