Skip to content

SmilyOrg/hxlode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hxlode

PNG image decoder haxelib for neko/cpp using LodePNG / PicoPNG.

Official binaries provided for Windows. Binaries for Mac / Mac64 by Alex Koz. Binaries for Linux / Linux64 by zaynyatyi.

Usage

Decode PNG directly from a file

var img:Image = PicoPNG.loadFile("hello.png");

Decode PNG from BytesData

var file = File.read("hello.png");
var fileBytes = file.readAll();
var img:Image = PicoPNG.decodePNG(fileBytes.getData(), fileBytes.length);

Using the returned image data

var bytes = Bytes.ofData(img.data);
var width = img.width;
var height = img.height;

log('Processing $path | $width x $height | '+bytes.length+" bytes");
log("First RGBA pixel: "+bytes.get(0)+" "+bytes.get(1)+" "+bytes.get(2)+" "+bytes.get(3));

About

PNG image decoder haxelib for neko/cpp using LodePNG / PicoPNG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published