Ask Your Question

Revision history [back]

how can I convert an image to grayscale without losing transparency?

I'm trying to convert an image to grayscale without losing any of it's transparency.

This is my code:

img = cv2.imread(some_path, 0)

Original image:

image description

After running the code:

image description