From 7683c81f3cbadd6e83bc8405356e1566f81f7f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20C=C3=A9sar=20Batista?= Date: Fri, 14 Apr 2023 11:05:04 -0300 Subject: [PATCH] package docs --- lib/xgif/xgif.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/xgif/xgif.go b/lib/xgif/xgif.go index 20dccd0d0c..bbe662dcec 100644 --- a/lib/xgif/xgif.go +++ b/lib/xgif/xgif.go @@ -1,3 +1,11 @@ +// xgif is a helper package to create GIF animations based on PNG images +// The resulting animations have the following properties: +// 1. All frames have the same size (max(pngs.width), max(pngs.height)) +// 2. All PNGs are centered in the given frame +// 3. The frame background is plain white +// Note that to convert from a PNG to a GIF compatible image (Bitmap), the PNG image must be quantized (colors are aggregated in median buckets) +// so that it has at most 255 colors. +// This is required because GIFs support only 256 colors and we must keep 1 slot for the white background. package xgif import (