internal void SavePixelData(PsdBinaryWriter writer) { Util.DebugMessage(writer.BaseStream, "Save, Begin, Channel image"); writer.Write((short)ImageCompression); if (ImageDataRaw == null) { return; } if (ImageCompression == PSDFile.ImageCompression.Rle) { RleRowLengths.Write(writer, Layer.PsdFile.IsLargeDocument); } writer.Write(ImageDataRaw); Util.DebugMessage(writer.BaseStream, $"Save, End, Channel image, {ID}"); }
public PsdBlockLengthWriter(PsdBinaryWriter writer, bool hasLongLength) { this.writer = writer; this.hasLongLength = hasLongLength; // Store position so that we can return to it when the length is known. lengthPosition = writer.BaseStream.Position; // Write a sentinel value as a placeholder for the length. writer.Write((UInt32)0xFEEDFEED); if (hasLongLength) { writer.Write((UInt32)0xFEEDFEED); } // Store the start position of the data block so that we can calculate // its length when we're done writing. startPosition = writer.BaseStream.Position; }
public PsdBlockLengthWriter(PsdBinaryWriter writer) : this(writer, false) { }
protected override void WriteData(PsdBinaryWriter writer) { writer.Write(Data); }
protected override void WriteData(PsdBinaryWriter writer) { PsdFile.SaveLayersData(writer); }
protected abstract void WriteData(PsdBinaryWriter writer);