daily update on 20240613 by nitload youmu[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[C[4
This commit is contained in:
@@ -45,6 +45,7 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
public class Image : ISSDSerializable, IImageProvider
|
||||
{
|
||||
|
||||
internal byte[] data;
|
||||
internal ImageInfo info;
|
||||
|
||||
@@ -55,27 +56,40 @@ namespace StgSharp.Graphics
|
||||
//int length = info.width * info.height * info.channel;
|
||||
}
|
||||
|
||||
public ref byte[] DataStream
|
||||
{
|
||||
get => ref data;
|
||||
}
|
||||
|
||||
public unsafe Image()
|
||||
{
|
||||
info = new ImageInfo();
|
||||
}
|
||||
|
||||
public ImageChannel Channel => info.Channel;
|
||||
public int ChannelCount => info.ChannelCount;
|
||||
public int Height => info.Height;
|
||||
public ref byte[] DataStream
|
||||
{
|
||||
get => ref data;
|
||||
}
|
||||
|
||||
public (int width, int height) Size
|
||||
{
|
||||
get => (info.Width, info.Height);
|
||||
}
|
||||
|
||||
public ImageChannel Channel => info.Channel;
|
||||
public int ChannelCount => info.ChannelCount;
|
||||
public int Height
|
||||
{
|
||||
get => info.Height;
|
||||
internal set => info.Height = value;
|
||||
}
|
||||
public int Width
|
||||
{
|
||||
get => info.Width;
|
||||
internal set => info.Width = value;
|
||||
}
|
||||
|
||||
public SerializableTypeCode SSDTypeCode => SerializableTypeCode.PixelImage;
|
||||
public int Width => info.Width;
|
||||
|
||||
public void FromBytes(byte[] stream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static unsafe Image FromFile(string route, ImageLoader loader)
|
||||
{
|
||||
@@ -139,11 +153,6 @@ namespace StgSharp.Graphics
|
||||
return data;
|
||||
}
|
||||
|
||||
public void FromBytes(byte[] stream)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Image ProvideImage()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -219,12 +228,6 @@ namespace StgSharp.Graphics
|
||||
set => height = value;
|
||||
}
|
||||
|
||||
public IntPtr StreamPtr
|
||||
{
|
||||
get => pixelPtr;
|
||||
internal set => pixelPtr = value;
|
||||
}
|
||||
|
||||
public int StreamSize
|
||||
{
|
||||
get => width * height * channelCount;
|
||||
@@ -236,6 +239,12 @@ namespace StgSharp.Graphics
|
||||
set => width = value;
|
||||
}
|
||||
|
||||
public IntPtr StreamPtr
|
||||
{
|
||||
get => pixelPtr;
|
||||
internal set => pixelPtr = value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{channel}\t{width}\t{height}\t{(ulong)StreamPtr}";
|
||||
|
||||
Reference in New Issue
Block a user