This project has moved and is read-only. For the latest updates, please go here.

Large Image Resize failing. Leaving bottom grey.

Sep 30, 2015 at 5:48 PM
Using ImageMagick.Net-AnyCPU Version 7

When I'm trying to resize a large image something 3744 x 5616 for example 300dpi and 24 bit depth with the following code I get a resized image with only 3/4 of the image visible and the rest grey sometimes with a green line separating the two areas.

Anyone have any ideas. Thanks

using (fileStream)
                {
                    MagickImage img = new MagickImage(fileStream);
                    //320x240 for example.
                    string resolution = width + "x" + height;
                    img.Resize(new MagickGeometry(resolution)); 
                    img.RePage();

                    using (var memStream = new MemoryStream())
                    {
                        img.Write(memStream);
                        memStream.Position = 0;
                        FileAccessBL.Set(file, memStream, resolution);
                    }
                }
Sep 30, 2015 at 6:01 PM
Looks like it is in loading of the image and not the resize or repage. If I just bring in the image with

MagickImage img = new MagickImage(fileStream);
Then write it with

using (var memStream = new MemoryStream())
                {
                    img.Write(memStream);
                    memStream.Position = 0;
                    FileAccessBL.Set(file, memStream, resolution);
                }
It is messed up. If I down size the image to something like 2000 x Y in external photo editor first then all is fine. So it is the size. Perhaps I over ran a buffer of some sort. I'll keep searching but any help would be greatly appreciated.

Thanks
Sep 30, 2015 at 6:09 PM
Here's the debug MagickNET_log that is generated

2015-09-30T11:07:27-06:00 1228:13.685 286.031u 7.0.0 Cache iisexpress.exe[9960]: cache.c/DestroyPixelCache/875/Cache
destroy
Oct 1, 2015 at 2:38 PM
Is it possible that the error is occurring inside the FileAccessBL class?