Skip to content

FugroRoames/LibPNG.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibPNG

Build Status Build status Coverage Status

LibPNG bindings for reading and writing png files in Julia.

TODO - Windows build is broken!

Installation

Pkg.clone("https://github.com/FugroRoames/LibPNG.jl.git")

Usage

using LibPNG
using ColorTypes

# Write RGB image
pixels = rand(RGB, 10, 10)
writeimage("pixels.png", pixels)
pixels_in = readimage("pixels.png")

# Convert to nchannel × height × width matrix
using ImageCore
pixels_matrix = channelview(pixels_in)
writeimage("pixels_channel.png", pixels_matrix)

The supported png image types are RGB, RGBA, Gray and GrayA as defined in ColorTypes.jl. The expected memory structure for images are nchannel × height × width.

About

LibPNG Julia wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages