First attempt at JPEG encoding; not entirely successful...
Temporarily switched back to managed C# implementation of RLE encoding