Skip to content
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

[ 🐛 Bug ] Images are going all pixelated and weird #19

Open
phocks opened this issue Jul 5, 2024 · 6 comments
Open

[ 🐛 Bug ] Images are going all pixelated and weird #19

phocks opened this issue Jul 5, 2024 · 6 comments

Comments

@phocks
Copy link

phocks commented Jul 5, 2024

Describe the bug
The JPEG images seem to be getting saved multiple times and turning all pixelated.

To Reproduce
Steps to reproduce the behavior:
I set it up with the default config here: https://github.com/ChillFish8/lust/blob/master/description.md

Expected behavior
The JPEG images to display normally.

Screenshots
Screenshot 2024-07-05 101614

Versioning (please complete the following information):

  • Lust Version - latest main
  • OS - Ubunto 22.04.4
  • Rustc Version - latest
  • Cargo Version - latest

Additional context
At first, they seem fine when I add ?format=jpeg but then after a while, they turn blocky.

@phocks
Copy link
Author

phocks commented Jul 5, 2024

I think it may be related to this line in the config.

lust/description.md

Lines 119 to 120 in 259e886

# This probably does not want to be a lossy format.
original_image_store_format: jpeg

I changed it to png and that may have fixed it. So it could have been repeatedly trying to compress the original or something?

@phocks
Copy link
Author

phocks commented Jul 5, 2024

Bit of a thread here anyway. https://bne.social/@phocks/112727431188820755

@phocks
Copy link
Author

phocks commented Jul 5, 2024

Actually, nope, this one seems to be getting blockier and blockier too even with png original saving. https://images.phocks.org/v1/images/testing/040afb6b-ed86-4c26-b945-ee8c31a7efc9?format=jpeg

Edit: I'll try using aot instead of jit. I think that should hopefully fix it.

@phocks
Copy link
Author

phocks commented Jul 5, 2024

Can confirm that aot ahead of time conversion seems to work. https://images.phocks.org/v1/images/testing/27151e2b-17f5-4bd4-8e21-c289f8135661?format=jpeg

@ChillFish8
Copy link
Owner

Interesting, I wonder if it is continuously re-encoding the image, although I am not sure why.

@phocks
Copy link
Author

phocks commented Jul 5, 2024

Interesting, I wonder if it is continuously re-encoding the image, although I am not sure why.

Thanks for getting back to me. I just tried it again on my local machine and can confirm the steps to replicate. I wonder if it's working properly for you or anyone else in jit mode.

  1. Clone repo and build in --release
  2. Run the built target executable with the default config https://github.com/ChillFish8/lust/blob/master/description.md
  3. Upload an image and grab the UUID
  4. Load that image in a web browser with ?format=jpeg
  5. Hit refresh on your browser multiple times
  6. You will see the pixelated squares start to get worse and worse
Screenshot 2024-07-05 194259

Thanks again for taking a look. Great work on this. It's just what I need. I'm going to use it in aot mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants