All pastes #341472 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-05 17:50 UTC
rendered paste body
import yage.all;
import std.file;


void main(char[][] args){
        Resource.addPath("./");
        Device.init(800,600,32,false);
        Image orig = new Image(args[1] ~ ".png");

        ubyte old[] = orig.get();
        ubyte[] hm;
        uint elem = 0;
        while (elem < old.length){
                hm ~= old[elem];
                elem += 3;
        }
        write(args[1] ~ ".hm",hm[]);
}