It is currently Wed Jul 23, 2014 2:49 am


Post a new topicPost a reply Page 1 of 1   [ 1 post ]
Author Message
 Post subject: Pic to Hex Convertor
PostPosted: Wed Dec 01, 2010 1:47 pm 

Joined: Thu Nov 18, 2010 3:59 pm
Posts: 25
In my work I often have the need to create specialized tools. I usually use Visual Basic for this. This tool basically converts a picture to a hex format csv file for use in memory files. I made it because I have an ST development board with a 132x132 LCD and wanted to display a picture. I couldn't find readily available software out there, and I have needed something like this before a few years ago when in school, so I figured I'd post it for the good of the group.

The name isn't exactly accurate, it converts and html version of a picture, outputted with a program like Gimp, which creates an HTML table with the background color of each cell being the desired color of the pixel. My program opens the HTML file, reads through it, gets the size, then when you want to convert, it reads each cell line, rips out the color info, cuts it down to 12bit or leaves it at 24 depending on what you need (my lcd only does 12), lets you invert any of the colors, and change any order, change the prefix and ending to each piece of data in the csv file (my lcd was basic 0xRGB, format) and if you decide to have a larger size than original, it will fill the rest of the document with your desired color.

To use it, open a picture file, save it as an html file, then run the program. Put the path and filename in the textbox (don't put the extension .html), choose the desired color order, the desired size (must be larger than original), color bit mode (12 or 24), which colors to invert if any, what to put on the beginning and on the end of each entry, the fill color when out of space and hit convert. The new file will have the same name with the extension .csv. There is also the option to create a blank file filled with one color, just put in the desired filepath and name (without the extension), choose what color mode, choose the fill color, and hit fill blank.

Image
Image
Image
Image
Image
Image


Attachments:
File comment: The convertor program
BMP-CONV.zip [15.51 KiB]
Downloaded 239 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 1 post ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB