I got following error message "Magick: MemoryAllocationFailed `No such file or directory' @ fatal/string.c/BlobToStringInfo/217" trying to read an image from buffer with follwing lines of code:
```
try
{
//Create Image from Buffer
using(var img = new MagickImage())
{
// Read file that will raise a warning.
var warning = img.Read(buffer);
// Check if warning was returned and write to console
if (warning != null)
Console.WriteLine(warning.Message);
```
The whole application quits in line "var warning = img.Read(buffer);" without reaching the except block.
Any idea?
The image I try to read from exists and can be opened with default Windows foto viewer.
Comments: ** Comment from web user: dlemstra **
```
try
{
//Create Image from Buffer
using(var img = new MagickImage())
{
// Read file that will raise a warning.
var warning = img.Read(buffer);
// Check if warning was returned and write to console
if (warning != null)
Console.WriteLine(warning.Message);
```
The whole application quits in line "var warning = img.Read(buffer);" without reaching the except block.
Any idea?
The image I try to read from exists and can be opened with default Windows foto viewer.
Comments: ** Comment from web user: dlemstra **
Can you attach the image that causes the exception? Feel free to contact me through CodePlex if you don't want to publicly share it. And what is the datatype of your 'buffer' variable?