A PowerShell module that converts Pixquare .px files to terminal pixel graphics using ANSI True Color.
# Clone the repository
git clone https://github.com/jakehildreth/PX2PS.git
# Import the module
Import-Module ./PX2PS/PX2PS.psd1# Convert and display a .px file
Convert-PX2PS -Path "image.px"
# Convert all .px files in a directory using alias
px2ps -Path "C:\PixelArt"
# Pipeline support
Get-ChildItem -Path . -Filter "*.px" | Convert-PX2PS
# Get scriptblock for deferred rendering
$sb = Convert-PX2PS -Path "logo.px" -OutputMode ScriptBlock
& $sb
# Generate standalone script file
Convert-PX2PS -Path "banner.px" -OutputMode Script -OutputPath "banner.ps1"
# -PassThru to get pixel data without rendering
$imageData = px2ps -Path "image.px" -PassThru
Write-Host "Dimensions: $($imageData.Width)x$($imageData.Height)"
- Renders .px files directly in the terminal using ANSI True Color
- Supports single-layer and multi-layer .px files
- Automatic layer compositing and transparency handling
- ScriptBlock output for deferred rendering
- Standalone script generation
- Cross-platform support (Windows, Linux, macOS)
- PowerShell 5.1+ compatible
- Pipeline input support
- PowerShell 5.1 or later (ISE is not supported.)
- Terminal with True Color (24-bit color) support
PX2PS reads Pixquare .px files, decompresses the zlib-encoded layer data, composites multiple layers if present, and renders the final image using Unicode lower half block characters (▄) with ANSI True Color escape sequences. Each terminal line represents two rows of pixels.
MIT License w/Commons Clause - see LICENSE file for details.
Made with 💜 by Jake Hildreth
