After a bit of detective work, I found that swapper.py has the following:
def batch_process()
. . .
if save_path:
for img in current_images:
img.save(path) # Default behavior
But it seems the default quality level for .jpg files is very very low (maybe 60?). If you don't mind hard-coding quality levels, you can try something like:
for img in current_images:
ext = os.path.splitext(path)[1].lower()
if ext in [".jpg", ".jpeg"]:
img.save(path, format="JPEG", quality=95) # Higher quality JPEG
elif ext == ".png":
img.save(path, format="PNG", compress_level=0) # Lossless PNG
else:
img.save(path) # Default behavior
Othewise you'll have to modify the batch menu to include a quality setting, which shouldn't be too hard.
After a bit of detective work, I found that `swapper.py` has the following:
```
def batch_process()
. . .
if save_path:
for img in current_images:
img.save(path) # Default behavior
```
But it seems the default quality level for .jpg files is very very low (maybe 60?). If you don't mind hard-coding quality levels, you can try something like:
```
for img in current_images:
ext = os.path.splitext(path)[1].lower()
if ext in [".jpg", ".jpeg"]:
img.save(path, format="JPEG", quality=95) # Higher quality JPEG
elif ext == ".png":
img.save(path, format="PNG", compress_level=0) # Lossless PNG
else:
img.save(path) # Default behavior
```
Othewise you'll have to modify the batch menu to include a quality setting, which shouldn't be too hard.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
After a bit of detective work, I found that
swapper.pyhas the following:But it seems the default quality level for .jpg files is very very low (maybe 60?). If you don't mind hard-coding quality levels, you can try something like:
Othewise you'll have to modify the batch menu to include a quality setting, which shouldn't be too hard.