mashb1t/Fooocus

[Bug]: Input image tab Metadata does not read JPG metadata

Turpo69 opened this issue · 2 comments

Checklist

  • The issue has not been resolved by following the troubleshooting guide
  • The issue exists on a clean installation of Fooocus
  • The issue exists in the current version of Fooocus
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

I updated to latest v2.6.0 and immediately noticed that Input image tab Metadata does not read metadata for some reason. I'm 100% sure it still worked in rc2. Turns out it's just a jpg problem. It reads metadata from png files just fine.

Steps to reproduce the problem

Generate image with Output Format jpeg and then try to import it with Input image tab Metadata - Apply metadata. Clicking Apply metadata will turn off Advanced options too.

What should have happened?

Show image metadata from Metadata Scheme fooocus (json) or
a1111 (plain text).

What browsers do you use to access Fooocus?

Google Chrome, Other

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 10

Console logs

Console says: Could not find metadata in the image!

Additional information

No response

@Turpo69 please check out #58. Still trying to find a way to make it work with the image input element, but it works 100% for file input.

@Turpo69 fixed using type PIL, please restart Fooocus or pull main again. Side effect is also that metadata reading is much faster now as it uses only one image save / read cycle instead of two.