The image i trying to convert into bitmap is of size 36.7 MB and having dimensions 29696 x 4381.
I am posting my code below:
What I have tried:
try
{
FileStream fs = new FileStream(FilePath,FileMode.Open,FileAccess.Read);
System.Drawing.Image objImage = System.Drawing.Image.FromStream(fs);//From File
int height = objImage.Height;//Actual image width
int width = objImage.Width;//Actual image height
LineNumber = 1;
System.Drawing.Bitmap bitmapimage = new System.Drawing.Bitmap(objImage, width, height);// create bitmap with same size of Actual image.Getting error on this line
}
catch(Exception ex)
{
}