Fix rasterization bug

Add some transform function as well
main is able to read files and write images now