Index of every page on this site: llms.txt
All skills
steelan9199 avatar

/webp-to-jpg

@9e01957
Run it yourself

将WebP格式的图片转换为JPG格式。当用户需要将WebP图片转换为JPG格式时使用此技能,因为某些平台不支持WebP格式。

Use this Skill: https://skilld.dev/gh/steelan9199/wechat-publisher/webp-to-jpg

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈41 tokens for metadata: the name and description. ≈368 when used: this file. ≈922 more on demand in 2 files.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈76 characters, or 0.9%.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

WebP到JPG转换技能

功能概述

此技能将帮助您将WebP格式的图片转换为JPG格式,以便在不支持WebP格式的平台上使用。

使用场景

  • 在微信公众号等不支持WebP格式的平台上使用图片
  • 将WebP图片转换为更通用的JPG格式
  • 准备适合特定平台的图片格式

转换步骤

  1. 检查Pillow库:确认系统已安装Pillow库用于图片处理

    python -c "from PIL import Image; print('Pillow is available')"
  2. 安装Pillow库(如果没有安装):

    pip install Pillow
  3. 执行格式转换:

    from PIL import Image
    
    # 打开WebP图片
    img = Image.open('<webp_image_path>')
    
    # 转换为RGB模式(因为JPG不支持透明度)
    rgb_img = img.convert('RGB')
    
    # 保存为JPG格式
    rgb_img.save('<jpg_image_path>', 'JPEG')

完整转换命令

直接使用Python命令行进行转换:

python -c "from PIL import Image; img = Image.open('<webp_image_path>'); rgb_img = img.convert('RGB'); rgb_img.save('<jpg_image_path>', 'JPEG'); print('图片转换成功')"

将 <webp_image_path> 替换为您的WebP图片路径,将 <jpg_image_path> 替换为您想要保存的JPG图片路径。

注意事项

  • JPG格式不支持透明度,所以WebP的透明部分会被转换为白色背景
  • 转换后的图片质量可能会略有变化
  • 确保目标路径有写入权限

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert8mo4 checks · Risk HIGH
  • Gen Agent Trust Hub9mo

    The skill provides a utility for converting images but introduces a high-risk security flaw by instructing the AI agent to perform unsanitized string interpolation into executable Python commands. A user could exploit this by providing a malicious filename that executes arbitrary code on the host system.

  • Socket8mo

    No alerts

  • Snyk9mo

    Risk: LOW · No issues

  • Runlayer9mo

    4/4 files flagged

Signed by skilld at 9e01957. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 9 months ago

README badge

README badge for steelan9199/wechat-publisher/webp-to-jpg