I have a manga page that has a resolution of 1360×1920. I want it to reduce to 496×700.
This is a part of the image without resolution reduced.
This is after lowering the resolution to 496×700.
This is the Photoshop version after the lowering resolution
In short, what photoshop does under the hood to get the result I have shown here? When resizing with photoshop you can select resample method to use. Which is NEAREST by default. I used the same method with Pillow library but still, the result didn’t change.
Sample Code
from PIL import Image, ImageFilter img = Image.open("788.png") img = img.resize((496, 700), Image.NEAREST) img.save("low.png")
Advertisement
Answer
I found the solution I just had to change
img = Image.open("788.png")
to
img = Image.open("788.png").convert("RGB")