This was working just fine and now all of a sudden when I attempt to re-size an image the result is a black rectangle. Here's my code:
Am I missing something? Is there a better way to accomplish the resize I'm going for with this code?
```
using (var magick = new MagickImage(imageStream))
{
// Resize the image to retain it's ratio but be no taller than the specified height
magick.Resize(new MagickGeometry("x" + ( string.IsNullOrEmpty( ConfigKeys.ResizeHeight ) ? "200" : ConfigKeys.ResizeHeight ) ) );
// Save the image
magick.Write("~/Images/Products/" + productFamily.ImageName + ".png");
}
```
Comments: ** Comment from web user: Raquor **
Am I missing something? Is there a better way to accomplish the resize I'm going for with this code?
```
using (var magick = new MagickImage(imageStream))
{
// Resize the image to retain it's ratio but be no taller than the specified height
magick.Resize(new MagickGeometry("x" + ( string.IsNullOrEmpty( ConfigKeys.ResizeHeight ) ? "200" : ConfigKeys.ResizeHeight ) ) );
// Save the image
magick.Write("~/Images/Products/" + productFamily.ImageName + ".png");
}
```
Comments: ** Comment from web user: Raquor **
Context is a magical thing. I meant I rolled back to a previous version of my application. I attempted to downgrade my project from .Net 4.5 to .Net 4, changed from the x86 version of magic Q16 to the anycpu version and a couple other changes.
At the time I thought I'd taken care of all issues except the resize weirdness but I must not have as the rollback fixed everything. Since then I've upgraded from x86 to anycpu with out issue so it was most likely my attempt to change my project from .net 4.5 to .net 4 that caused my issues.