C
C#3w ago
Salakhosh

If i want to Convert ImageSource to byte[], is it possible to know max dimensions it can take?

So i am working on a wpf application and when i pick an image it gets converted to byte[] as editvalue. However when we uploaded 3000x4000 dimension photo the system couldnt take it and after debugging i found out it is because of the conversion so is there any way i can know what is max dimensions a byte[] can take ? Thanks in advance
2 Replies
MODiX
MODiX3w ago
ero
REPL Result: Success
Array.MaxLength
Array.MaxLength
Result: int
2147483591
2147483591
Compile: 186.969ms | Execution: 56.973ms | React with ❌ to remove this embed.
MODiX
MODiX3w ago
ero
REPL Result: Success
3000*4000
3000*4000
Result: int
12000000
12000000
Compile: 182.890ms | Execution: 14.622ms | React with ❌ to remove this embed.

Did you find this page helpful?