AGENT SKILL

image-grayscale

Convert images to grayscale in-place.

使用场景图像与多媒体
License 许可
MIT
最近更新
2026-10-02
Stars
★ 93
Forks
8

01 前言 Front Matter

name
image-grayscale
description
Convert images to grayscale in-place.

03 SKILL.md 正文

Image Grayscale Conversion

You can use python to convert an image to grayscale and override the original file.

import cv2
import sys

image_path = sys.argv[1]
img = cv2.imread(image_path)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imwrite(image_path, gray)

04 同仓库更多 Skills