I'm having trouble using DRAW_SetImage with the expected width and height of an image.
I converted a JPG into the 65k colorspace used by the LCD controller with the following code .NET C#:
           Bitmap b = new Bitmap("D:\\temp\\image.jpg");
            
            Int16 pixel;
            using (BinaryWriter bw = new BinaryWriter(File.Open("D:\\temp\\image.prm", FileMode.Create)))
            {
                for (int i = 0; i < b.Height; i++)
                {
                    for (int j = 0; j < b.Width; j++)
                    {
                        Color c = b.GetPixel(j, i);
                        pixel = (short)(((c.G & 0x07) << 13) + ((c.G) >> 5) + (((c.B) >> 3) << 8) + (((c.R) >> 3) << 3));
                        bw.Write(pixel);
                    }
                }
            }
So the bitmap is written to the output file line by line. File is copied to SD card
Then from Primer2 read from disk and displayed with:
          DRAW_SetImage(ImageBuffer,0,0,ImageHeight,ImageWidth);
Problem is that it is displayed 90 degrees rotated counterclockwise and 
DRAW_SetImage expects first Width and then Height.
Any idea what can be wrong here?