Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

unusualvibes/prusa-modelpreview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Prusa Model Preview

Extract embedded preview images (PNG & QOI) from PrusaSlicer G-code and BGCode files.

Live Demo

Visit: https://unusualvibes.github.io/prusa-modelpreview/

Features

  • Dual Format Support: Automatically detects and parses both G-code (text) and BGCode (binary) files
  • Multiple Image Formats: Extracts PNG images and decodes QOI format thumbnails
  • Drag & Drop: Simply drag your .gcode or .bgcode file onto the page
  • Browser-Based: No uploads, no servers - everything runs locally in your browser
  • Download Extracted Images: Save preview images to your computer

How to Use

  1. Open the application in your browser
  2. Drag and drop a .gcode or .bgcode file onto the drop zone (or click to browse)
  3. View the extracted preview images
  4. Download any images you want to save

Supported Files

  • G-code files (.gcode): Text-based files with base64-encoded PNG thumbnails
  • BGCode files (.bgcode): Binary files with embedded PNG or QOI images
  • Works with files exported from PrusaSlicer

How It Works

The application searches for embedded preview images in two ways:

  1. G-code Format: Looks for base64-encoded thumbnails in comment blocks (; thumbnail begin / ; thumbnail end)
  2. BGCode Format: Scans binary data for PNG signatures and QOI image headers

All processing happens in your browser - your files never leave your computer.

Technical Details

  • Pure HTML/CSS/JavaScript - no dependencies
  • Includes QOI image decoder
  • PNG detection using magic bytes (89 50 4E 47)
  • QOI detection using magic bytes (71 6F 69 66)
  • Canvas-based QOI to PNG conversion

License

This project is provided as-is.

About

Extract embedded preview images (PNG & QOI) from PrusaSlicer G-code and BGCode files - https://unusualvibes.github.io/prusa-modelpreview/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages