This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

using bmptoraster utility

Hi,

I a using LCDK c6748, and tried with raster example, I am trying to use bmptoraster utility from starterware so that I can display my own images on the LCD, but so far am not successfull in using the utility, could any one please provide the method..readme file has not helped so far.

  • Hi Rohit,

    Able to build the tool ?
    I'm able to build and convert.

    You have to use Linux machine to build.
    Simply give "make" command to build and you would get "a.out" file as a output file (tool).


    ----------------------

  • Hi Rohit,

    By default, the "bmpToRaster" will generate the header file in compressed format. In the generated file, the three Least Significant Bytes will indicate the pixel value. The Most Significant Byte of a word will indicate the number of times the pixel repeats. If the number is <256 then, the Most Significant Byte will contain the count. If the number is >256, the number will be stored in the next WORD.
  • Hi Shankari,

    Yes I used a linux machine to build the application using make and got the a.out file, but unable to convert bmp file into header file. By the way, how to determine the number of rows and columns?

  • Hi Rohit,

    Open your bmp file using any of the utility such as "MSpaint" . It will show the length and breadth in terms of pixels.

    For example :
    rows ( in pixels) x columns (pixels)
    640x720 px

    ----
  • Hi Shankari,

    I have standard lena.bmp file, which I opened in Paint and found that its 512x512 image. As per readme file, the command to convert the bmp file to header file is-

    ./a.out <No.of ROWS> <No.of Columns> <Source File Name> <Destination File name> <image format required 565/24><pixel odering RGB/BGR>

    So, to get a header file..I put the command...
    ./a.out 512 512 lena.bmp header.h 565 RGB

    This generates segmentation fault
  • Hi Shankari,

    One more question, I have an array of image generated using bmptoc utility, this seems to have a slightly diffferent format than bmptoraster array, can it be used to display at the LCD using raster example from starterware, what changes are required to do so? Because I tried the starightforward way, and it does not display any image at the LCD except for some flickering.
  • Hi,

    Give the destination file as *.txt and put it in 24 RGB

    ./a.out 512 512 lena.bmp header.txt 24 RGB

    ---