Created
February 2, 2024 18:58
-
-
Save mikedigriz/6830eaaedcbba99afbe216c3d9195c06 to your computer and use it in GitHub Desktop.
Revisions
-
mikedigriz created this gist
Feb 2, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ ## Installation: # python3 -m venv env # . env/bin/activate # pip install --upgrade pip # pip install opencv-python ## Launch: # python3 8bit.py import cv2 # Load your image image = cv2.imread('input.png') # Convert the image to 8-bit color depth image_8bit = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Save the 8-bit image cv2.imwrite('syncthing_app.bmp', image_8bit)