Csharp/C Sharp by API/System.Drawing.Imaging/ImageCodecInfo — различия между версиями

Материал из .Net Framework эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 15:31, 26 мая 2010

ImageCodecInfo.Clsid

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}


ImageCodecInfo.CodecName

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}


ImageCodecInfo.FilenameExtension

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}


ImageCodecInfo.Flags

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}


ImageCodecInfo.FormatDescription

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}


ImageCodecInfo.GetImageEncoders

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}


ImageCodecInfo.MimeType

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}


ImageCodecInfo.Version

  
using System;
using System.Collections.Generic;
using System.ruponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
public class MainClass {
    public static void Main() {
    ImageCodecInfo[] availableCodecs;
    availableCodecs = ImageCodecInfo.GetImageEncoders();
    int numCodecs = availableCodecs.Length;
    for (int i = 0; i < numCodecs; i++)
    {
      Console.WriteLine("Codec Name = " + availableCodecs[i].CodecName);
      Console.WriteLine("Class ID = " + availableCodecs[i].Clsid.ToString());
      Console.WriteLine("Filename Extension = " +
        availableCodecs[i].FilenameExtension);
      Console.WriteLine("Flags = " +
        availableCodecs[i].Flags.ToString());
      Console.WriteLine("Format Description = " +
        availableCodecs[i].FormatDescription);
      Console.WriteLine("Format ID = " +
        availableCodecs[i].FormatID.ToString());
      Console.WriteLine("MimeType = " + availableCodecs[i].MimeType);
      Console.WriteLine("Version = " +
        availableCodecs[i].Version.ToString());
      Console.WriteLine();
    }
    }
}