Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PixelInformationPng.cs
1
using
System;
2
using
SkiaSharp;
3
4
namespace
Waher.Script.Graphs
5
{
9
public
class
PixelInformationPng
:
PixelInformation
10
{
17
public
PixelInformationPng
(
byte
[]
Binary
,
int
Width
,
int
Height
)
18
: base(
Binary
,
Width
,
Height
)
19
{
20
}
21
26
public
override
SKImage
CreateBitmap
()
27
{
28
using
(SKBitmap Bitmap = SKBitmap.Decode(this.
Binary
))
29
{
30
return
SKImage.FromBitmap(Bitmap);
31
}
32
}
33
38
public
override
byte
[]
EncodeAsPng
()
39
{
40
return
this.
Binary
;
41
}
42
47
public
override
PixelInformationRaw
GetRaw
()
48
{
49
using
(SKBitmap Bitmap = SKBitmap.Decode(this.
Binary
))
50
{
51
return
new
PixelInformationRaw
(Bitmap.ColorType, Bitmap.Bytes, Bitmap.Width, Bitmap.Height,
52
Bitmap.Width * Bitmap.BytesPerPixel);
53
}
54
}
55
}
56
}
Waher.Script.Graphs.PixelInformation
Contains pixel information
Definition:
PixelInformation.cs:9
Waher.Script.Graphs.PixelInformation.Width
int Width
Width
Definition:
PixelInformation.cs:35
Waher.Script.Graphs.PixelInformation.Binary
byte[] Binary
Binary representation of pixels
Definition:
PixelInformation.cs:30
Waher.Script.Graphs.PixelInformation.Height
int Height
Height
Definition:
PixelInformation.cs:40
Waher.Script.Graphs.PixelInformationPng
Contains pixel information in PNG format
Definition:
PixelInformationPng.cs:10
Waher.Script.Graphs.PixelInformationPng.EncodeAsPng
override byte[] EncodeAsPng()
Encodes the pixels into a binary PNG image.
Definition:
PixelInformationPng.cs:38
Waher.Script.Graphs.PixelInformationPng.GetRaw
override PixelInformationRaw GetRaw()
Gets raw pixel data.
Definition:
PixelInformationPng.cs:47
Waher.Script.Graphs.PixelInformationPng.CreateBitmap
override SKImage CreateBitmap()
Creates an SKImage image. It must be disposed by the caller.
Definition:
PixelInformationPng.cs:26
Waher.Script.Graphs.PixelInformationPng.PixelInformationPng
PixelInformationPng(byte[] Binary, int Width, int Height)
Contains pixel information in PNG format
Definition:
PixelInformationPng.cs:17
Waher.Script.Graphs.PixelInformationRaw
Contains pixel information in a raw unencoded format.
Definition:
PixelInformationRaw.cs:11
Waher.Script.Graphs
Definition:
CanvasGraph.cs:11
IoTGateway
Script
Waher.Script.Graphs
PixelInformationPng.cs
Generated by
1.9.5