This project has moved and is read-only. For the latest updates, please go here.


Jul 7, 2014 at 12:16 PM
Edited Jul 7, 2014 at 12:18 PM
I love this work and have gotten it working just fine.

I was wondering when you will get around to implementing Image handling and Sound?
Aug 4, 2014 at 5:56 PM
I'm also loving the MicroWPF :)
Loading Jpegs works OK if the image is smaller than the 4K command buffer, using these existing commands:
context.CmdLoadImage(0, 0);
for (int i = 0; i < buffer.Length; i = i + 4)
    if (buffer.Length >= i + 4)
        context.WriteBytes((int)buffer[i], (int)buffer[i + 1], (int)buffer[i + 2], (int)buffer[i + 3]);
    else if (buffer.Length >= i + 3)
        context.WriteBytes((int)buffer[i], (int)buffer[i + 1], (int)buffer[i + 2], 0);
    else if (buffer.Length >= i + 2)
        context.WriteBytes((int)buffer[i], (int)buffer[i + 1], 0, 0);
    else if (buffer.Length >= i + 1)
        context.WriteBytes((int)buffer[i], 0, 0, 0);
However, Larger images defeat me. Tried looking at how it's done in the C demo apps but I'm not having much luck.
Anyone know the correct magic spell?
If not, Highfield I hope you have some free time for the MicroWPF soon :)
Dec 9, 2015 at 11:34 PM
The problem of the limit of 4k is due to the mode that was chosen for the compilation of the command list. He chose to use a buffer (oucoming) and then not worry about the overwrite happens precisely to 4096 bytes as it is well explained in manual and appnotes.
I also found some bugs in functions ReadUInt##Immediate on positioning of returned byte, these functions are not used in the source but serve to correctly calculate the time when the buffer overflow is done.
Jan 9, 2016 at 11:54 AM
Edited Jan 9, 2016 at 11:56 AM
I have substantially reduced the memory usage passing from the buffering to sending data directly to the FT and given that normally, even in case of complex WPF, the data are just a few hundred and is unnecessary to allocate a buffer of 4096 elements.
Also the image transfer readed from a SD card can be done without using a transmission buffer.