I have C language source code, for an embedded system, containing arrays of data for an 8-bit per pixel grayscale image. I'm in charge of documenting the software and I'd like to convert this source code to a JPEG (image) file.
Here is a code sample:
const unsigned char grayscale_image[] = {
0, 0, 0, 0, 0, 0, 0, 74, 106, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 146, 93, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//...
};
const unsigned int height = 41;
const unsigned int width = 20;
Here are my questions: (yes, plural)
- What application(s) do you recommend for converting this source file to JPEG?
- Can GIMP or Paint import a CSV file of data?
- If I write this custom application, what Java libraries exist for JPEG?
- What libraries exist in C# for accomplishing this task?
I have the following resources at my disposal: MS Visio 2010, Gimp, Paint, Java, Eclipse, MS Visual Studio 2010 Professional, wxWidgets, wxFrameBuilder, Cygwin.
I can write the custom application in C#, Java, C or C++.
Thanks for your advice.