pxl

command module
v0.0.0-...-41a197c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

Pxl

A small utility written in Go to generate pixelart from PNG images.

Installation

Use the Makefile in this repository (make release) or compile pixelize.go (go build ./pixelize.go)

Usage

Pxl takes a PNG image as input and converts it to a pixelized version using different options.

Usage: pxl [command] [options...] <file.png>
	Command: convert
	Description: Converts a png image file to pixel art
		-o Path to the output file. Default is result.png
		-c Path to the colors json file.
		-l Level of granularity. Default is 8 Bit
		-w Maximum width for image resizing.
		-h Maximum height for image resizing.
	Command: colors
	Description: Extracts a color palette from a png image file
		-o Path to the output file. Default is colors.json
		-c Number of colors to extract into palette.

or use pxl as go module

import "github.com/cbrgm/pxl/pxl"
// ...
px := pxl.New()

px.SetGranularity(8)
px.SetMaxImageSize(1024, 800)
px.SetColors(palette.Websafe)

usePalette := true
pixelArt := px.Convert(img, usePalette)
// ...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL