c# - Using (Bitmap image = new Bitmap(path)) Error.. Parameter not valid? -


i'm trying image error parameter not valid following code.

 if (file.exists(mappath(tempfolderpathalt + "extractedfiles\\" + boxpath + "\\" + arraynode[i].tagvalue)))     {       using (bitmap image = new bitmap(mappath(tempfolderpathalt + "extractedfiles\\" + boxpath + "\\" + arraynode[i].tagvalue)))         {           //other code         }     } 

the inner exception null.

enter image description here

the path after mapped is:

\c:\users\shaun\documents\formvalue\extractedfiles\box1e84b34a-522b-492e-919f-1334ee5845ff\ca4ac72a-9ca2-4a28-b4a4-a6031b734567.png

getting invalid parameter exception new bitmap(string), file exists means file content invalid , can't parsed of image type handlers.

one of common reasons underlying file of 0 size.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -