dlemstra wrote:
Dpx file can`t send email to magick@discussions.codeplex.com
Can you share the image you are using? And a bit of sample code?
my code
//this using magick.net
public static FileInfo DPXConvertJPG(String ImagePath)
{
//check the dpx file
//if dpx file used the nconvert to jpg
//else used the magick.net to convert
MagickImage magickImage = new MagickImage(ImagePath);
//MagickImage magickImage = new MagickImage();
//magickImage.AddProfile(ColorProfile.SRGB);
//magickImage.ColorSpace = ColorSpace.sRGB;
//magickImage.Gamma(1.7);
//magickImage.Format = MagickFormat.Jpeg;
FileInfo Jpg = new FileInfo("temp.jpg");
magickImage.Write(Jpg.FullName);
return Jpg;
}
//this function using the xnviewer`s nconvert.exe ,the result is true
public static FileInfo ImageConvertJpg(String ImagePath, String JpgPath)
{
//check the dpx file
FileInfo image = new FileInfo(ImagePath);
if (image.Exists)
{
//Get the extension to image
Console.WriteLine(image.Extension);
if (image.Extension == ".dpx")
{
Execute execute = new Execute();
String command = @"nconvert.exe -o " + JpgPath + " -out jpeg ";
command = command + @"""" + ImagePath + @"""";
Console.WriteLine("Command : " + command);
String Output = execute.run(command);
Console.WriteLine(Output);
FileInfo Jpg = new FileInfo(JpgPath);
return Jpg;
}
else
{
//other image file
MagickImage magickImage = new MagickImage(ImagePath);
FileInfo Jpg = new FileInfo(JpgPath);
magickImage.Write(Jpg.FullName);
return Jpg;
}
}
else
{
return null;
}
return null;
}
THX magick.netDpx file can`t send email to magick@discussions.codeplex.com