• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

Errors reading bitmap files in VB5

Hi,

I have an application which monitors a video signal through a WinTV capture card, capturing a single frame then analysing the contents.  This is working fine on 2 machines here but it has now been deployed abroad and there is some strange behaviour occurring.

Randomly in the middle of the image the RGB pixel data seems to get out of step, see below:

Start of the file (fine)
 15 , 19 , 24
 23 , 24 , 16
 22 , 15 , 22
 18 , 21 , 21
 18 , 25 , 18
 25 , 17 , 21

Middle of the file (values shifting one place each time)
 28 , 255 , 43
 255 , 38 , 44
 32 , 38 , 255
 38 , 255 , 47
 255 , 38 , 55
 26 , 49 , 255
 56 , 255 , 28

The image looks fine visually so can't work out whats going on.  My read code is as follows:

    WinTV.SaveToDiskEx ("c:\capture.bmp")
       
    Open "c:\capture.bmp" For Binary As #14
    Lock #14
    Get #14, , fileheader
    Get #14, , imageheader
    ReDim bimage(imageheader.width - 1, imageheader.height - 1)
    Get #14, , bimage
    Unlock #14
    Close #14

where bimage is an array of type pixel which has individual bytes for b, g and r fields.

Could this be a memory or cache issue?  Both machines are running a similar spec (Win XP, 512MB ram etc).

Any ideas would be great.
0
fvcctv
Asked:
fvcctv
1 Solution
 
fvcctvAuthor Commented:
Turns out the driver for the WinTV card was corrupt or incorrect on the deployed machine.  Reloaded with the same version I am using here and all sprung into life...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now