User Rating 0.0
Total Usage 0 times
Fewer colors = smaller file, more banding

Drop BPG file here or click to browse

Maximum file size: 50MB

Is this tool helpful?

Your feedback helps us improve.

About

BPG (Better Portable Graphics) delivers superior compression over JPEG and PNG using HEVC intra-frame coding, but browser support remains nonexistent. Converting to GIF ensures universal compatibility at the cost of palette depth - GIF enforces a strict 256-color limit per frame via indexed color tables. This converter implements client-side Median Cut quantization to extract optimal palettes and Floyd-Steinberg dithering to mask banding artifacts. The risk of poor conversion lies in choosing aggressive quantization without dithering, producing visible posterization in gradient-heavy images. For photographic BPG sources, enable maximum dithering; for flat graphics, dithering introduces unnecessary noise.

The GIF89a specification permits multiple frames with independent delays, enabling animation from multi-frame BPG sequences. Each frame carries a Local Color Table (LCT) or references a Global Color Table (GCT), compressed via Lempel-Ziv-Welch (LZW) encoding with variable code widths up to 12 bits. Transparency support exists but affects one palette index only - no alpha gradients. This tool processes files entirely in-browser; no server upload occurs, preserving privacy for sensitive imagery.

bpg gif image converter animation hevc lzw compression

Formulas

GIF compression relies on the Lempel-Ziv-Welch algorithm, which builds a dictionary of repeated byte sequences during encoding. The compression ratio depends on image complexity and palette usage.

CR = SoriginalScompressed

where CR is compression ratio, Soriginal is raw pixel data size, and Scompressed is LZW-encoded stream size.

Color quantization via Median Cut partitions the RGB color cube iteratively. For a palette of k colors:

nsplits = log2(k)

Each split divides the box with the largest color range along its dominant axis (R, G, or B). Final palette colors are computed as the centroid of pixels within each box.

Floyd-Steinberg dithering distributes quantization error to neighboring pixels using these weights:

ex+1,y += 716 err
ex-1,y+1 += 316 err
ex,y+1 += 516 err
ex+1,y+1 += 116 err

where err = original quantized for each RGB channel independently.

Reference Data

FormatMax ColorsCompressionAnimationTransparencyBrowser SupportTypical Use Case
BPG16.7M (24-bit)HEVC IntraYes (rare)Alpha channelNone (plugin required)Archival, high-quality web
GIF256 indexedLZWYes (native)1-bit (single color)UniversalAnimations, simple graphics
PNG16.7M (24-bit)DEFLATEAPNG (limited)Alpha channelUniversalLossless graphics
JPEG16.7M (24-bit)DCT lossyNoNoneUniversalPhotographs
WebP16.7M (24-bit)VP8/VP8LYesAlpha channelModern browsersWeb optimization
AVIF16.7M+ (HDR)AV1 IntraYesAlpha channelModern browsersNext-gen web images
HEIF/HEIC16.7M+ (HDR)HEVCYesAlpha channelSafari onlyApple ecosystem
TIFF16.7M+ (48-bit)VariousMulti-pageAlpha channelNone (download)Print, archival
BMP16.7M (24-bit)None (RLE opt.)NoLimitedUniversalLegacy Windows
ICO16.7M (32-bit)PNG/BMPNoAlpha channelUniversalFavicons

Frequently Asked Questions

GIF's 256-color palette cannot represent smooth gradients. Enable Floyd-Steinberg dithering to introduce noise patterns that simulate intermediate colors. For extreme gradients, consider PNG or WebP as alternative outputs.
Multi-frame BPG files are processed sequentially. Each frame undergoes independent color quantization unless "Global Palette" mode is selected, which analyzes all frames to build a unified 256-color table - useful for maintaining color consistency across animation frames.
BPG supports full alpha channels with 256 opacity levels. GIF supports only binary transparency (fully opaque or fully transparent). Pixels with alpha < 128 become transparent; others become opaque. The transparency color index is set to the least-used palette entry.
BPG uses HEVC intra-frame coding, requiring computationally intensive block decoding, inverse transforms, and prediction reconstruction. This converter processes everything client-side without native codec acceleration. For files exceeding 4000×4000 pixels, expect delays of 10 - 30 seconds.
Yes. The frame delay parameter (in milliseconds) sets the interval between frames in the output GIF. GIF specification rounds delays to 10ms increments. Values below 20ms may render inconsistently across browsers; 100ms (10 fps) is a safe default for animations.
This converter accepts BPG files up to 50MB. Larger files may exhaust browser memory during decoding. If you encounter crashes, close other tabs and retry, or reduce source image dimensions before conversion.