How to convert any displaying file to bitmap...

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hi,

I am working on LED display ( scrolling simple one not RGB based) and need your guidance for converting any clip art like file to bit map represetation on pixel by any mean....

thanks
 

thatoneguy

Joined Feb 19, 2009
6,359
Download Irfanview It is an image display/resize/filter program that can also do screen captures and other stuff. FREEWARE. It can convert formats to any other format, including to .BMP

Once you have your bitmap, download LCD Assitant Which will take a .BMP image as input, and output a C code hex block describing the image, either column by column, or row by row. It needs to know which, otherwise the results look like static. Same for Endian-ness (MSB or LSB first), dependent on processor architecture and your code, basically.

Those two links were enough to get several 12 to 15 year olds moving pictures from their phones to LCD Displays, you should be able to figure it out by trail and some error. :)
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hi,
I have loaded file and giving only zeroes....
Rich (BB code):
//------------------------------------------------------------------------------
// File generated by LCD Assistant
// http://en.radzio.dxp.pl/bitmap_converter/
//------------------------------------------------------------------------------

const unsigned char a [] = {
0x28, 0x00, 0x28, 0x00, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
};
 

Attachments

thatoneguy

Joined Feb 19, 2009
6,359
You have a display that uses 100x100 pixels per letter??

Open Ifranview, create new canvas, height same as number of LEDs. Then show paint dialog, and in Black and White only, enter a letter.

Rich (BB code):
//------------------------------------------------------------------------------
// File generated by LCD Assistant
// http://en.radzio.dxp.pl/bitmap_converter/
//------------------------------------------------------------------------------

const unsigned char a [] = {
0x08, 0x14, 0x14, 0x22, 0x22, 0x3E, 0x41, 0x41, 0x00, 0x00, 
};
8x8 pixel Letter A in a 10x10 "box", in Anonymous Pro (The most awesome console font in existence!). Horizontal aligned, no image size, little endian (8 bit processors)
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Open Ifranview, create new canvas, height same as number of LEDs. Then show paint dialog, and in Black and White only, enter a letter.

here it is change canvas image there is no new canvas..
any way, i have opened image -> change canvas -> 8x8 pixel ...
i don't understand why to open paint in it and write i want to convert jpeg into hex code..
please clear my doubt
 

thatoneguy

Joined Feb 19, 2009
6,359
Why do you want to use JPEG? It is a lossy compression, so the result is text with "fuzzy" (grey) edges, which are neither white nor black.

If you draw the raw text in an image with Irfanview in 1 bit color mode, the result is on and off pixels, which is the only thing black and white LCDs can display.

The way the converter works, is if the pixel is not black, it is not set, so the bits are all zeros.

If you already have the file in .JPG format, change pallete to 1 bit mode, and that is what can be displayed on an LCD. Then pick "resize/resample" to reduce it to the size you need for LED or LCD display, then save it as .BMP, which the LCDAssistant will then convert into a nice C-code friendly array for use in your program.
 

kubeek

Joined Sep 20, 2005
5,795
here it is change canvas image there is no new canvas..
any way, i have opened image -> change canvas -> 8x8 pixel ...
i don't understand why to open paint in it and write i want to convert jpeg into hex code..
please clear my doubt
You can also resize an existing image to the desired resolution.
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Why do you want to use JPEG? It is a lossy compression, so the result is text with "fuzzy" (grey) edges, which are neither white nor black.

If you draw the raw text in an image with Irfanview in 1 bit color mode, the result is on and off pixels, which is the only thing black and white LCDs can display.
Hi,
Actually i want to display some clip art on led display 10x32 so, i want t convert in array..
Then how to have 1bit mode??
 
Top