diff options
-rw-r--r-- | ffx-convert.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ffx-convert.cpp b/ffx-convert.cpp index 8ad0059..f310b92 100644 --- a/ffx-convert.cpp +++ b/ffx-convert.cpp @@ -98,21 +98,21 @@ virtual int startup() throw (GeneralException) { for (int y = 0; y < IMG_SX; y++) { for (int x = 0; x < IMG_SY; x++) { Color c = LookUp(buffer[transform(x, y)]); - pixels[((x * 2 + 0) * IMG_SY * 2 + (y * 2 + 0)) * 3 + 0] = c.R; - pixels[((x * 2 + 0) * IMG_SY * 2 + (y * 2 + 0)) * 3 + 1] = c.G; - pixels[((x * 2 + 0) * IMG_SY * 2 + (y * 2 + 0)) * 3 + 2] = c.B; + pixels[((y * 2 + 0) * IMG_SX * 2 + (x * 2 + 0)) * 3 + 0] = c.R; + pixels[((y * 2 + 0) * IMG_SX * 2 + (x * 2 + 0)) * 3 + 1] = c.G; + pixels[((y * 2 + 0) * IMG_SX * 2 + (x * 2 + 0)) * 3 + 2] = c.B; - pixels[((x * 2 + 0) * IMG_SY * 2 + (y * 2 + 1)) * 3 + 0] = c.R; - pixels[((x * 2 + 0) * IMG_SY * 2 + (y * 2 + 1)) * 3 + 1] = c.G; - pixels[((x * 2 + 0) * IMG_SY * 2 + (y * 2 + 1)) * 3 + 2] = c.B; + pixels[((y * 2 + 0) * IMG_SX * 2 + (x * 2 + 1)) * 3 + 0] = c.R; + pixels[((y * 2 + 0) * IMG_SX * 2 + (x * 2 + 1)) * 3 + 1] = c.G; + pixels[((y * 2 + 0) * IMG_SX * 2 + (x * 2 + 1)) * 3 + 2] = c.B; - pixels[((x * 2 + 1) * IMG_SY * 2 + (y * 2 + 0)) * 3 + 0] = c.R; - pixels[((x * 2 + 1) * IMG_SY * 2 + (y * 2 + 0)) * 3 + 1] = c.G; - pixels[((x * 2 + 1) * IMG_SY * 2 + (y * 2 + 0)) * 3 + 2] = c.B; + pixels[((y * 2 + 1) * IMG_SX * 2 + (x * 2 + 0)) * 3 + 0] = c.R; + pixels[((y * 2 + 1) * IMG_SX * 2 + (x * 2 + 0)) * 3 + 1] = c.G; + pixels[((y * 2 + 1) * IMG_SX * 2 + (x * 2 + 0)) * 3 + 2] = c.B; - pixels[((x * 2 + 1) * IMG_SY * 2 + (y * 2 + 1)) * 3 + 0] = c.R; - pixels[((x * 2 + 1) * IMG_SY * 2 + (y * 2 + 1)) * 3 + 1] = c.G; - pixels[((x * 2 + 1) * IMG_SY * 2 + (y * 2 + 1)) * 3 + 2] = c.B; + pixels[((y * 2 + 1) * IMG_SX * 2 + (x * 2 + 1)) * 3 + 0] = c.R; + pixels[((y * 2 + 1) * IMG_SX * 2 + (x * 2 + 1)) * 3 + 1] = c.G; + pixels[((y * 2 + 1) * IMG_SX * 2 + (x * 2 + 1)) * 3 + 2] = c.B; } } |