Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
Look up a common image source and figure out how the bits are formatted. I would suggest using either .BMP http://en.wikipedia.org/wiki/bmp_file_format or
.PPM formats as they are very simplistic http://netpbm.sourceforge.net/doc/ppm.html Then write a conversion program that arranges the bits how you like. The PPM format you may be able to read directly. Inkscape is a good GPL program to try to convert from one image format to another. Python also has image reading routines that can be used to convert image formats. import the image module and you can read several different file formats. Pete - Altera_Forum
Honored Contributor
--- Quote Start --- Look up a common image source and figure out how the bits are formatted. I would suggest using either .BMP http://en.wikipedia.org/wiki/bmp_file_format or .PPM formats as they are very simplistic http://netpbm.sourceforge.net/doc/ppm.html Then write a conversion program that arranges the bits how you like. The PPM format you may be able to read directly. Inkscape is a good GPL program to try to convert from one image format to another. Python also has image reading routines that can be used to convert image formats. import the image module and you can read several different file formats. Pete --- Quote End --- i did not understand this. actually i have to convert the image(pixels) into a text file using quartus tool same as how we do using matlab. so that i can use that text file as input for my architecture. can u please help me regarding this problem. - Altera_Forum
Honored Contributor
Quartus won't be able to do that for you, you'll need an external software or a script you make yourself. You can either convert your image to a .mif or .hex text file to use it as initialization contents for a RAM or ROM block generated from the Megawizard, or convert it to a table in a HDL file, either Verilog or VHDL.