mirror of
https://github.com/cyanfish/naps2.git
synced 2024-11-11 02:45:19 +03:00
26 lines
731 B
C#
26 lines
731 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using Google.Protobuf;
|
|
using NAPS2.Images;
|
|
using NAPS2.Serialization;
|
|
|
|
namespace NAPS2.ImportExport
|
|
{
|
|
[Serializable]
|
|
public class DirectImageTransfer
|
|
{
|
|
public DirectImageTransfer(IEnumerable<ScannedImage> images)
|
|
{
|
|
ProcessID = Process.GetCurrentProcess().Id;
|
|
var serializedImages = images.Select(x => SerializedImageHelper.Serialize(x, new SerializedImageHelper.SerializeOptions()));
|
|
SerializedImages = serializedImages.Select(x => x.ToByteArray()).ToList();
|
|
}
|
|
|
|
public int ProcessID { get; }
|
|
|
|
public List<byte[]> SerializedImages { get; }
|
|
}
|
|
}
|