Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reading Bmps in C

    I am going to try to make a program that converts a bitmap into a format suitable for the gba.

    My big problem is how to read a .bmp file into my C program. I am not sure how they are formatted and how I would go about reading them in since i think they are binary, and not text.

    Thanks

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Location
    India
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can find details regarding bitmaps and reading bmp files in c here: http://www.brackeen.com/home/vga/bitmaps.html

  • #3
    New to the CF scene
    Join Date
    Oct 2009
    Location
    Bucharest, Romania
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello,

    thou i see this post its 7 years old, i think i am trying to make same thing as Josh Campbell.
    i am trying to make a c program that reads .bmp files and then create them in a format i can use for my DS application .

    for start i am having problems even at the reading the bitmap . thou i think i only need to read the rgb from the bitmap and put that in a file , and then use it for DS , because i will be using only 1 type of bmps and with certain size .

    do you have anything that could put me on the right track ?

    Thank you

  • #4
    New Coder
    Join Date
    Jun 2002
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have no experience with the DS, and I stopped working with the GBA shortly before the DS came out.

    Some resources that might be helpful:
    • gbadev - I've heard that the DS is very similar to the GBA, so maybe some of the graphics tools they have will prove useful. Also have forums devoted to the DS.
    • FreeImage - I've used it before. Makes loading/saving image files really easy. Supports a bunch of formats, too.

  • #5
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    I guess you can add this to your resources:

    http://www.imagemagick.org/script/index.php

    the library can be linked with any program you write and provide reading/writing and manipulation of different formats.
    There also have bindings for other languages in case you need.

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •