nagadomi / waifu2x

Image Super-Resolution for Anime-Style Art
http://waifu2x.udp.jp/
MIT License
27.48k stars 2.71k forks source link

Feature request #442

Open shuttittuppitt opened 1 year ago

shuttittuppitt commented 1 year ago

I noticed that your website supports converting an image into either png or webp, but I didn't see an option to convert it into jpg.

REQUESTED FEATURE #1) Add jpg as one of the formats that your website can convert an image into. I recommend a default quality setting of 100, but you could add the option to change the quality too. REQUESTED FEATURE #2) I didn't see any information on the website about what image formats can be used. I tend to use either jpg or png, but I suggest that you should put a list of which image formats the image has to be in.

nagadomi commented 1 year ago
  1. Add jpg

JPEG is a lossy compression format. Once saved as JPEG, the image cannot be recovered. If saved as PNG or WebP(lossless mode), it can be converted to any other format if necessary. So I think JPEG should not be used in a feature that reconstructs JPEG compressed images. It defeats the purpose.

  1. I didn't see any information on the website about what image formats can be used

It depends on third party image loading library(Pillow) and there are so many supported formats. I do not fully understand it myself. That information can be found on the following web page. https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html