Esempio n. 1
0
        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}");
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public PsdBlockLengthWriter(PsdBinaryWriter writer) : this(writer, false)
 {
 }
Esempio n. 4
0
 protected override void WriteData(PsdBinaryWriter writer)
 {
     writer.Write(Data);
 }
Esempio n. 5
0
 protected override void WriteData(PsdBinaryWriter writer)
 {
     PsdFile.SaveLayersData(writer);
 }
Esempio n. 6
0
 protected abstract void WriteData(PsdBinaryWriter writer);