tags:

views:

350

answers:

3
+1  A: 

Hey it looks like the two images you posted are not related in any way (besides have a similar pattern of obfuscation). Did you post the wrong files?

With regard to the issue you are seeing, I would guess you are seeing a problem with the origin of the x-y axis. Normal images and graphics APIs use a slightly weird axis where you count "down" the y axis, that is to say, the point(0, 0) is at the top left of the screen and as you increment y, you go down the screen. Therefore it seems reasonable to assume that you have made a mistake in the conversion or that the two images are using a different y axis scheme.

1800 INFORMATION
No,I dont think so.The problem must be in the "bmp" line,Some people said the problem is in strides(the parameter should be negative),but its not there.
John
Which "bmp" line are you talking about? "Stride" is on one of the lines containing "bmp"
1800 INFORMATION
+3  A: 
   bmp.RotateFlip(RotateFlipType.Rotate180FlipX);

Fixed the problem :)

John
+1  A: 

Why not replace all that unsafe stuff with :

private static Bitmap ConvertFromBytes(Byte[] imagebytes)
{
   return new Bitmap(new MemoryStream(imagebytes));
}
WOPR
Because imageBytes doesn't contain the bitmap header.
Samuel