Re: Image has wrong colors



"Joe Thompson" <JoeThompson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F06FF15F-36C7-405A-9B1A-019E99484022@xxxxxxxxxxxxxxxx
Hi Michael,

Thank you for the reply. I'm not sure of the format - I beleive it's 24
bit
color. Each frame is just a jpg file. I am trying to rewrite an
application
that was written on a Linux box and it displays the colors correctly (I
don't
have that code).

Can you save the data to a file and open it using an image program? Does it
look the same as what you get in C#?

As far as my app goes, I gather the bytes 1450 at a time until I get a
full
frame. Then I build the whole bitmap at once. I'm not familiar with
LockBits - what does it do? I was hoping it was just a color map problem
or
something like that.

LockBits gives you high speed access to the raw data in a bitmap object.
It's possible if it's coming across from a linux box that it's a little/big
endian issue and the RGB values are just back to front. If the image is
correct except that the colours are wrong then this is what you could do:
1) Create the bitmap as you are doing currently.
2) Use LockBits to 'fix' all the data in the bitmap.

Lockbits is slightly more challenging than most C# card but it's nothing too
difficult.

Try attaching the bitmap to a post, I know that's frowned apon here but we
can cope with 1450 bytes.

Michael


.



Relevant Pages

  • Re: image Clone problem when using LockBits
    ... It creates 8bpp indexed Bitmap objects using a pointer to ... >> Hi Bob, ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: image Clone problem when using LockBits
    ... It creates 8bpp indexed Bitmap objects using a pointer to some ... As each frame is ready, ... Clonemethod when adding images to the ArrayList, ... > gives me a pointer to a frame buffer which contains some image data (8bpp, ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: How do I link a bitmap to a bound object frame ?
    ... bound frame, which I understand will then amend the table to which it is ... "Stephen Lebans" wrote: ... but how can I use VBA to embed that flag ... an external bitmap that is causing a problem. ...
    (microsoft.public.access.forms)
  • Re: problem with AVI getframe modify pixels and display
    ... > display each frame to a picture box. ... > The part I am having trouble with is to modify the bitmap contents. ... To work out the size of the DIB header, ... The next step is to work out the palette size, generally the palette is only included in <=8-bit images, however based on the Bitmap ...
    (microsoft.public.vb.winapi.graphics)
  • Re: Sample WMV-Videofile and save frames as bitmaps
    ... to access every frame of a video in order to ... > access to every pixel of a frame. ... // stream to the end of the file. ... To write out a bitmap, you may have to get the bitmapinfoheader out of the ...
    (microsoft.public.windowsmedia.sdk)