ImageFormat.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. //
  2. // System.Drawing.Imaging.ImageFormat.cs
  3. //
  4. // Authors:
  5. // Everaldo Canuto ([email protected])
  6. // Andreas Nahr ([email protected])
  7. // Dennis Hayes ([email protected])
  8. //
  9. // (C) 2002 Ximian, Inc. http://www.ximian.com
  10. //
  11. using System;
  12. using System.ComponentModel;
  13. namespace System.Drawing.Imaging {
  14. [TypeConverter (typeof (ImageFormatConverter))]
  15. public sealed class ImageFormat {
  16. Guid guid;
  17. // constructors
  18. public ImageFormat(Guid guid) {
  19. this.guid = guid;
  20. }
  21. // methods
  22. [MonoTODO]
  23. public override bool Equals(object o) {
  24. return base.Equals(o);
  25. }
  26. [MonoTODO]
  27. public override int GetHashCode() {
  28. return base.GetHashCode();
  29. }
  30. [MonoTODO]
  31. public override string ToString() {
  32. // FIXME returns a string for the format like "Png"
  33. return String.Format("ImageFormat.Guid {0}", guid);
  34. }
  35. // properties
  36. public Guid Guid {
  37. get { return guid; }
  38. }
  39. static ImageFormat BmpImageFormat = new ImageFormat (new Guid ("b96b3cab-0728-11d3-9d7b-0000f81ef32e"));
  40. public static ImageFormat Bmp {
  41. get { return BmpImageFormat; }
  42. }
  43. static ImageFormat EmfImageFormat = new ImageFormat (new Guid ("b96b3cac-0728-11d3-9d7b-0000f81ef32e"));
  44. public static ImageFormat Emf {
  45. get { return EmfImageFormat; }
  46. }
  47. static ImageFormat ExifImageFormat = new ImageFormat (new Guid ("b96b3cb2-0728-11d3-9d7b-0000f81ef32e"));
  48. public static ImageFormat Exif {
  49. get { return ExifImageFormat; }
  50. }
  51. static ImageFormat GifImageFormat = new ImageFormat (new Guid ("b96b3cb0-0728-11d3-9d7b-0000f81ef32e"));
  52. public static ImageFormat Gif {
  53. get { return GifImageFormat; }
  54. }
  55. static ImageFormat IconImageFormat = new ImageFormat (new Guid ("b96b3cb5-0728-11d3-9d7b-0000f81ef32e"));
  56. public static ImageFormat Icon {
  57. get { return IconImageFormat; }
  58. }
  59. static ImageFormat JpegImageFormat = new ImageFormat(new Guid("b96b3cae-0728-11d3-9d7b-0000f81ef32e"));
  60. public static ImageFormat Jpeg {
  61. get { return JpegImageFormat; }
  62. }
  63. static ImageFormat MemoryBmpImageFormat = new ImageFormat (new Guid ("b96b3caa-0728-11d3-9d7b-0000f81ef32e"));
  64. public static ImageFormat MemoryBmp {
  65. get { return MemoryBmpImageFormat; }
  66. }
  67. static ImageFormat PngImageFormat = new ImageFormat(new Guid("b96b3caf-0728-11d3-9d7b-0000f81ef32e"));
  68. public static ImageFormat Png {
  69. get { return PngImageFormat; }
  70. }
  71. static ImageFormat TiffImageFormat = new ImageFormat (new Guid ("b96b3cb1-0728-11d3-9d7b-0000f81ef32e"));
  72. public static ImageFormat Tiff {
  73. get { return TiffImageFormat; }
  74. }
  75. static ImageFormat WmfImageFormat = new ImageFormat (new Guid ("b96b3cad-0728-11d3-9d7b-0000f81ef32e"));
  76. public static ImageFormat Wmf {
  77. get { return WmfImageFormat; }
  78. }
  79. }
  80. }