BlendingRanges.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Photoshop PSD FileType Plugin for Paint.NET
  4. // http://psdplugin.codeplex.com/
  5. //
  6. // This software is provided under the MIT License:
  7. // Copyright (c) 2006-2007 Frank Blumenberg
  8. // Copyright (c) 2010-2014 Tao Yue
  9. //
  10. // Portions of this file are provided under the BSD 3-clause License:
  11. // Copyright (c) 2006, Jonas Beckeman
  12. //
  13. // See LICENSE.txt for complete licensing and attribution information.
  14. //
  15. /////////////////////////////////////////////////////////////////////////////////
  16. using System;
  17. using System.Diagnostics;
  18. using System.Globalization;
  19. namespace PhotoshopFile
  20. {
  21. internal class BlendingRanges
  22. {
  23. /// <summary>
  24. /// The layer to which this channel belongs
  25. /// </summary>
  26. public Layer Layer { get; private set; }
  27. public byte[] Data { get; set; }
  28. ///////////////////////////////////////////////////////////////////////////
  29. public BlendingRanges(Layer layer)
  30. {
  31. Layer = layer;
  32. Data = new byte[0];
  33. }
  34. ///////////////////////////////////////////////////////////////////////////
  35. public BlendingRanges(PsdBinaryReader reader, Layer layer)
  36. {
  37. Util.DebugMessage(reader.BaseStream, "Load, Begin, BlendingRanges");
  38. Layer = layer;
  39. var dataLength = reader.ReadInt32();
  40. if (dataLength <= 0)
  41. return;
  42. Data = reader.ReadBytes(dataLength);
  43. Util.DebugMessage(reader.BaseStream, "Load, End, BlendingRanges");
  44. }
  45. }
  46. }