Re: Image has wrong colors
- From: "Michael C" <mike@xxxxxxxxxx>
- Date: Fri, 18 Jan 2008 17:24:13 +1100
"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
.
- Follow-Ups:
- Re: Image has wrong colors
- From: Peter Duniho
- Re: Image has wrong colors
- References:
- Re: Image has wrong colors
- From: Michael C
- Re: Image has wrong colors
- Prev by Date: Application Focus
- Next by Date: Re: Application Focus
- Previous by thread: Re: Image has wrong colors
- Next by thread: Re: Image has wrong colors
- Index(es):
Relevant Pages
|