lust icon indicating copy to clipboard operation
lust copied to clipboard

[ 🐛 Bug ] Images are going all pixelated and weird

Open phocks opened this issue 1 year ago • 6 comments

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 avatar Jul 05 '24 00:07 phocks

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

https://github.com/ChillFish8/lust/blob/259e88632f726466f12daad2897a809057dc95f1/description.md?plain=1#L119-L120

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 avatar Jul 05 '24 00:07 phocks

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

phocks avatar Jul 05 '24 00:07 phocks

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 avatar Jul 05 '24 00:07 phocks

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

phocks avatar Jul 05 '24 05:07 phocks

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

ChillFish8 avatar Jul 05 '24 07:07 ChillFish8

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.

phocks avatar Jul 05 '24 09:07 phocks