Skip to content
Pixel Command Line Lab
Swift
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.swiftpm/xcode
Assets/Demos
Sources/pixlab
Tests
.gitignore
LICENSE
Package.resolved
Package.swift
README.md
pixlab

README.md

pixlab

Powered by PixelKit and Metal

Install

Add pixlab to /usr/local/bin/

Examples

$ pixlab ~/Desktop/pix_out.png --metal-lib ~/PixelKitShaders-macOS.metallib --view
RenderKit ready to render.
> a = /Users/<user>/Desktop/pix_in_a.png
> b = /Users/<user>/Desktop/pix_in_b.png
> a + b
> a * b
> a -> b
> a ~> 0.1
> :q!
$ pixlab ~/Desktop/pix_out.png --metal-lib ~/PixelKitShaders-macOS.metallib --view
RenderKit ready to render.
> ramp = gradient(1024)
> ramp.
.scale
.offset
.bgColor
.color
.position
.direction
> ramp.direction = .
.horizontal
.vertical
.radial
.angle
> ramp.direction = .angle
> ramp
$ pixlab ~/Desktop/pix_out.png --metal-lib ~/PixelKitShaders-macOS.metallib --view
RenderKit ready to render.
> ? 
arc(res)
circle(res)
color(res)
gradient(res)
line(res)
noise(res)
polygon(res)
rectangle(res)
blur(pix)
channelmix(pix)
chromakey(pix)
clamp(pix)
cornerpin(pix)
edge(pix)
flare(pix)
flipflop(pix)
huesaturation(pix)
kaleidoscope(pix)
levels(pix)
quantize(pix)
range(pix)
sepia(pix)
sharpen(pix)
slope(pix)
threshold(pix)
transform(pix)
twirl(pix)
blend(pixA, pixB)
cross(pixA, pixB)
displace(pixA, pixB)
lookup(pixA, pixB)
lumablur(pixA, pixB)
lumalevels(pixA, pixB)
remap(pixA, pixB)
reorder(pixA, pixB)
array(pixA, pixB, pixC, ...)
blends(pixA, pixB, pixC, ...)

You can find the Metal library here

You can’t perform that action at this time.