thumbnail in imagemagick
Posted: 2019-08-31T01:17:28-07:00
I want to make thumbnail a image but I have the following error
I use this code :NullReferenceException: Object reference not set to an instance of an object.
Code: Select all
using (MagickImage image = new MagickImage(mainpath + media.Name))
{
ExifProfile profile = image.GetExifProfile();
using (MagickImage thumbnail = profile.CreateThumbnail())
{
// if (thumbnail != null)
thumbnail.Write(paththumb + media.Name);
}
}