#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    10
    Rep Power
    0

    BMP Loading with SDL/ncurses


    Hey DevShed. I need an image loaded into a c program, it's just one single 16 x 16 image that I want to integrate with an ncurses program, is this possible? Say I initialized SDL, if I called the image with LoadBMP("image.bmp") is there anyway I can turn that into something I could use with ncurses? Maybe turn it into a pointer somehow..but would that still print on the screen without SDL_Surface? Thanks for any help.
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,417
    Rep Power
    1871
    https://duckduckgo.com/?q=bmp+to+asc...&kl=uk-en&kh=1
    You'll be able to "draw" it with 16x16 characters in ncurses, with some limited range of colours as well.

    If it's just a single size of BMP file you want, then SDL is overkill. BMP is a trivial file format.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper

IMN logo majestic logo threadwatch logo seochat tools logo