Write compressed image to binary, size is (x+y)k + k + 7
size is that * sizeof(double), removed debug output