Loading...
Loading...
Convert images in WebP format to JPG format. Use this skill when you need to convert WebP images to JPG format, as some platforms do not support WebP format.
npx skill4agent add steelan9199/wechat-publisher webp-to-jpgpython -c "from PIL import Image; print('Pillow is available')"pip install Pillowfrom PIL import Image
# Open WebP image
img = Image.open('<webp_image_path>')
# Convert to RGB mode (since JPG does not support transparency)
rgb_img = img.convert('RGB')
# Save as JPG format
rgb_img.save('<jpg_image_path>', 'JPEG')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('Image conversion successful')"<webp_image_path><jpg_image_path>