Displaying Bitmaps

This is a discussion on Displaying Bitmaps within the Game Programming forums, part of the General Programming Boards category; Hey guys I was wondering if anyone has come across "streaky" artefacts whilst displaying .bmp images? I've included a sample ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    14

    Displaying Bitmaps

    Hey guys

    I was wondering if anyone has come across "streaky" artefacts whilst displaying .bmp images? I've included a sample of the image being displayed through an IDE and also being played through VLC player; each show the same error, but in different locations. Has anyone seen this before? And if so, does anyone know the cause?Name:  Error.jpg
Views: 113
Size:  35.0 KB

    Thanks for your help

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Looks like the BMP header is reporting the wrong size for the image...

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    14
    I'm not using the header. The IDE just uses pixel values to display data. I've had a play with some parameters and it's looking like the number of bytes used for each pixel affects the output. The encoding (from the header) is 24bpp, so by changing the number of pixels in a row to 3 x rowlength, I get more clarity. I'm about to test with just one byte and see what happens. Cheers!

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    14
    Yeah it was the padding for each row that introduces that effect. Just have to skip the padding; I used fseek but a better way might exist.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DX9 Not Displaying Bitmaps
    By Sentral in forum Game Programming
    Replies: 9
    Last Post: 01-31-2006, 04:35 AM
  2. Problem displaying bitmaps
    By batman123 in forum Game Programming
    Replies: 2
    Last Post: 01-09-2005, 01:01 AM
  3. Bitmaps Not Displaying
    By DCII764II00 in forum Windows Programming
    Replies: 3
    Last Post: 05-25-2004, 03:14 PM
  4. Displaying Two BitMaps
    By kryptkat in forum Windows Programming
    Replies: 2
    Last Post: 12-24-2002, 07:15 PM
  5. Displaying bitmaps on a dialog
    By minesweeper in forum Windows Programming
    Replies: 2
    Last Post: 05-15-2002, 03:11 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21