TI E2E Community
Stellaris® ARM® Microcontrollers
Stellaris® ARM® LM3S Microcontrollers Forum
Gimp generates C arrays for OLED & LCD images
The attached Python script "file-cheader-save.py" is a plugin for the GIMP (www.gimp.org) which allows (small) grayscale images to be saved directly as a C header file containing an array of pixel data. Edit your grayscale image then select "Save As" and from GIMPs (long) list of formats pick "C Source code header", either 1 bit or 4 bit. Example output shown below, although it easily modified to suit your specific needs.
This forum won't allow .py files to be uploaded, so please remove the .txt extension I added to get around this.
This has been tested on Linux and Windows with the TI LM3S8962 EVK, see the Python source file for the install and use instructions.
Try out Inkscape, it's a nice vector graphics editor which can be used to make icons, export to GIMP, then to your OLED.
You have not attached the "file-cheader-save.py" file,,can u plz attach the file or give some info , where to download that file .
I am using BeagleBone AM335x ,and to test my display driver for 1024x768 resolution, i need an bmp to array converter tool . Can you guide me which tool i have to use to get an array from 1024x768 resolution image.
I am completely blocked.
You probably need to be a lot more specific here because there are a million different image file formats. When you say "bmp", I presume you mean a Windows bitmap. If you are looking for something that will just dump this into a C array in its original format, the makefsfile tool included in the tools/bin directory of any TivaWare or StellarisWare release will do this for you (use the -f command line switch). If you need to convert the bitmap into a different format then dump that to a C array, you'll need something more like the script Satyaprakash provided here though, obviously, it would need to be modified to output the format you are looking for.
I am completely blocked.
And - might this "blocking" be of your own creation - and unlikely to be solved by originating poster's nearly 3 year past, post?
Should that neat board/chip not have suitable forum - or other focused tech support link - you should find much, "content of interest" w/in the Stellaris Graphic Library - and multiple TFT-based Ap Kits...
And beware - color images encoded via bmp simply "devour" memory. A more complex jpg converter may warrant your/others investigation - especially if multiple images are in play ...
Thanks Mr Dave Wilson for ur quick response.
I will try those necessary steps you mentioned above.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.