TwitterSharebutton

500 sheets for continuous conversion WebP Converter 500 sheets for continuous conversion 
WebP Converter
ABOUT
ABOUT
This tool can convert JPEG and PNG images to WebP images.
WebP images are an image format developed by Google that reduces file size compared to JPEG images and supports transparent colors like PNG.
All major web browsers are supported (Chrome, Firefox, Safari, Edge).
All processing is completed within the device. No data is sent to the server.
customize
CUSTOMIZE
INPUT
INPUT
SOURCE
ORIGINAL

WebP Images
WEBP

Technology Overview
IMPLEMENTATION
The official library libwebp was built into WebAssembly with Emscripten.
It operates completely offline only and does not use any external servers.
技術詳detail
Makefile
CC = emcc
CFLAGS = -I libwebp -O3 --bind -msimd128 -s EXPORTED_RUNTIME_METHODS=HEAP8,HEAPU8 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s ENVIRONMENT=web,worker -s EXPORT_ES6=0 -s DYNAMIC_EXECUTION=0 -s MODULARIZE=0

TARGET_JS = webp160.js
TARGET_WASM = webp160.wasm

SRCS = $(wildcard libwebp/src/dec/*.c)
SRCS += $(wildcard libwebp/src/dsp/*.c)
SRCS += $(wildcard libwebp/src/demux/*.c)
SRCS += $(wildcard libwebp/src/enc/*.c)
SRCS += $(wildcard libwebp/src/mux/*.c)
SRCS += $(wildcard libwebp/src/utils/*.c)
SRCS += $(wildcard libwebp/sharpyuv/*.c)
SRCS += $(wildcard src/*.c)

all: $(TARGET_JS)

$(TARGET_JS): $(SRCS)
	$(CC) $(SRCS) $(CFLAGS) -o $(TARGET_JS)

clean:
	@if exist $(TARGET_JS) del $(TARGET_JS)
	@if exist $(TARGET_WASM) del $(TARGET_WASM)


webp.c
#include "emscripten.h"
#include "src/webp/encode.h"
#include <stdlib.h>

EMSCRIPTEN_KEEPALIVE
int version()
{
    return WebPGetEncoderVersion();
}

EMSCRIPTEN_KEEPALIVE
void *create_buffer(int width, int height)
{
    return malloc(width * height * 4 * sizeof(uint8_t));
}

EMSCRIPTEN_KEEPALIVE
void destroy_buffer(uint8_t *p)
{
    free(p);
}

int result[2];
EMSCRIPTEN_KEEPALIVE
void encode(uint8_t *img_in, int width, int height, float quality)
{
    uint8_t *img_out;
    size_t size;

    size = WebPEncodeRGBA(img_in, width, height, width * 4, quality, &img_out);

    result[0] = (int)img_out;
    result[1] = size;
}

EMSCRIPTEN_KEEPALIVE
void free_result(uint8_t *result)
{
    WebPFree(result);
}

EMSCRIPTEN_KEEPALIVE
int get_result_pointer()
{
    return result[0];
}

EMSCRIPTEN_KEEPALIVE
int get_result_size()
{
    return result[1];
}

Change log
HISTORY
May 26, 2026: We have updated the libweb library used for encoding to version 1.6.0.
Terms of Use
TERMS OF USE
Use of this tool is completely free of charge. The developer does not ask for any form of compensation.
Images Created by this tool may be used freely, including for commercial purposes.
The developer assumes no responsibility for any damages resulting from the use of this tool.
licence list
LICENCE
@タイトル
@テキスト
Comments, requests, bug reports, etc.
FEEDBACK
Please send your comments, requests, bug reports, etc. to the following address.
https://x.com/mmgamess
mmmgames@gmail.com
Share
SHARE
If you like the tool, we would be very encouraged if you would share it.
TwitterSharebutton FacebookSharebutton Hatebubutton
Convenient Apple
UTILITY