convertir un archivo en formato .webp a formato .jpg
function convert(file) {
return file.name + '.' + file.ext
}
convert('myfile.webp')
All generations.
function convert(file) {
return file.name + '.' + file.ext
}
convert('myfile.webp')
import (
"os"
"fmt"
"image/jpeg"
"github.com/chai2010/webp"
)
func main() {
webpFile, err := os.Open("chiquita.webp")
if err != nil {
fmt.Println(err)
}
defer webpFile.Close()
webpImage, err := webp.Decode(webpFile)
if err != nil {
fmt.Println(err)
}
jpgFile, err := os.Create("chiquita.jpg")
if err != nil {
fmt.Println(err)
}
defer jpgFile.Close()
err = jpeg.Encode(jpgFile, webpImage, nil)
if err != nil {
fmt.Println(err)
}
}
import os
from PIL import Image
for filename in os.listdir(os.getcwd()):
if filename.endswith('.webp'):
img = Image.open(filename).convert('RGB')
img.save(filename.split('.')[0]+'.jpg')
elif filename.endswith('.jpg'):
print('not yet')
Generate
More than just a code generator. A tool that helps you with a wide range of tasks. All in one place.
Function from Description
Text Description to SQL Command
Translate Languages
Generate HTML from Description
Code to Explanation
Fix invalid Code
Get Test for Code
Class from Description
Regex from Description
Regex to Explanation
Git Command from Description
Linux Command
Function from Docstring
Add typing to code
Get Language from Code
Time complexity
CSS from Description
Meta Tags from Description