2
0

Encoder.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // System.Drawing.Imaging.Encoder.cs
  3. //
  4. // (C) 2004 Novell, Inc. http://www.novell.com
  5. // Author: Ravindra ([email protected])
  6. //
  7. //
  8. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  9. //
  10. // Permission is hereby granted, free of charge, to any person obtaining
  11. // a copy of this software and associated documentation files (the
  12. // "Software"), to deal in the Software without restriction, including
  13. // without limitation the rights to use, copy, modify, merge, publish,
  14. // distribute, sublicense, and/or sell copies of the Software, and to
  15. // permit persons to whom the Software is furnished to do so, subject to
  16. // the following conditions:
  17. //
  18. // The above copyright notice and this permission notice shall be
  19. // included in all copies or substantial portions of the Software.
  20. //
  21. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  22. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  24. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  25. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  26. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  27. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  28. //
  29. using System;
  30. namespace System.Drawing.Imaging
  31. {
  32. public sealed class Encoder
  33. {
  34. private Guid guid;
  35. public static readonly Encoder ChrominanceTable;
  36. public static readonly Encoder ColorDepth;
  37. public static readonly Encoder Compression;
  38. public static readonly Encoder LuminanceTable;
  39. public static readonly Encoder Quality;
  40. public static readonly Encoder RenderMethod;
  41. public static readonly Encoder SaveFlag;
  42. public static readonly Encoder ScanMethod;
  43. public static readonly Encoder Transformation;
  44. public static readonly Encoder Version;
  45. static Encoder ()
  46. {
  47. // GUID values are taken from my windows machine.
  48. ChrominanceTable = new Encoder ("f2e455dc-09b3-4316-8260-676ada32481c");
  49. ColorDepth = new Encoder ("66087055-ad66-4c7c-9a18-38a2310b8337");
  50. Compression = new Encoder ("e09d739d-ccd4-44ee-8eba-3fbf8be4fc58");
  51. LuminanceTable = new Encoder ("edb33bce-0266-4a77-b904-27216099e717");
  52. Quality = new Encoder ("1d5be4b5-fa4a-452d-9cdd-5db35105e7eb");
  53. RenderMethod = new Encoder ("6d42c53a-229a-4825-8bb7-5c99e2b9a8b8");
  54. SaveFlag = new Encoder ("292266fc-ac40-47bf-8cfc-a85b89a655de");
  55. ScanMethod = new Encoder ("3a4e2661-3109-4e56-8536-42c156e7dcfa");
  56. Transformation = new Encoder ("8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9");
  57. Version = new Encoder ("24d18c76-814a-41a4-bf53-1c219cccf797");
  58. }
  59. internal Encoder (String guid) {
  60. this.guid = new Guid (guid);
  61. }
  62. public Encoder (Guid guid) {
  63. this.guid = guid;
  64. }
  65. public Guid Guid {
  66. get {
  67. return guid;
  68. }
  69. }
  70. }
  71. }