Install in seconds
Install this skill
Copy the command and run it in your terminal. You can review the source before installing.
terminal
git clone https://github.com/CoderWanFeng/python-office

Works with Git. The repository opens in your current directory.

✏️
AutomationPython

Pencil Sketch

by CoderWanFeng

Converts images to pencil sketch style. Use when you need to turn a photo into a pencil drawing or sketch.

1.3K stars297 forksAdded 2026/07/20
officepippypipythonweixin

Documentation

README

pencil4img Skill

使用 pencil4img 算法处理图像

功能描述

将输入的图像转换为铅笔画风格的图像。

所属分类

office/skills/image/pencil4img/

调用方式

from office.skills.image import pencil4img

pencil4img(
    input_img='./test.jpg',
    output_path='./',
    output_name='pencil4img.jpg'
)

参数说明

参数 类型 必填 默认值 说明
input_img str - 输入的图像文件路径
output_path str './' 输出图像的路径
output_name str 'pencil4img.jpg' 转换后的图像文件名

返回值

None

使用示例

from office.skills.image import pencil4img
pencil4img(input_img='./photo.jpg')

原始函数

office.api.image.pencil4img