Hi there,
I am having a MCB1700 board with me. I want to display an bmp image on the display. For that I wish to save the pixel values as a vaiable (in an Array) and display it.
I would be much obliged if you can help me.
Thank you
There are a number of applications out there that can convert a binary file into an C array of unsigned char data for inclusion in a build. That is normally the most "standard" way to include larger binary data into a project.
There are generic converters that just convert the entire file content to a data array.
There are also converters that specifically interpret the content of a file into a suitable 'C' representation - eg, extracting the image data from a BMP file.
I think GIMP may be able to save an image as a 'C' data array...?
First of all thank you for the reply.
I am really struggling with my project can you please specify the software that exactly convert the file to load it to the program
That's an issue for you to discuss with your supervisor(s).
"can you please specify the software that exactly convert the file to load it to the program"
What have you found so far?
www.lmgtfy.com
http://codesearch.google.com
Only minutes between our responses, and your request for receiving links. Does that mean that you haven't even tried Google? Andrew even mentioned Gimp - exactly how hard would it have been to try Google with search terms "gimp download"?
And what do you think would have happened if you had tried Google with "convert binary file to c array", based on my comment?
You will always struggle, if you see problems, instead of spending time searching/thinking of solutions. It is up to you, if you want to continue to struggle.
I am trying to use MATLAB to get the values of RGB values.Actully I don't own a development board. I am accessing it through my university. I will check the sample program and get to you back.
Thank you for you replies and spending your valuable time for me
MATLAB is not a Keil product! Therefore, for MATLAB support, you will need to go to a MATLAB forum.
Or, again, as you say you're struggling - you should be talking to your tutors about that!
There are much better tools to play with images than matlab.
Tools like Netpbm can handle a large number of graphics formats, and convert the RGB values into ASCII text lines that you can process yourself.
The text formats are documented here: en.wikipedia.org/.../Netpbm_format
Just a silly question, but why are you using MATLAB for this? Haven't you already tried Gimp? Did you feel it would be too easy to load an existing image (lots of formats supported) into Gimp and then save into c or h file format?