Bitmap bit1 = new Bitmap( bmpimg , width , height );
Bitmap bit2 = new Bitmap( bmp , width , height );
Bitmap bmpresult = new Bitmap( width
Yes, it's necessary.
The stride value is the offset from the start of one scan line to the start of the next scan line. If the scan lines are padded, the value is a few bytes more than what's needed for the pixels in the scan line.
If the bitmap is stored upside down in memory (i.e. the bottom scan line first), the stride value is negative. If you would read such a bitmap without using the stride value, you would get just garbage after the first scan line, or a memory access error.