-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
37 lines (34 loc) · 1.16 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.IO;
namespace SingleToDuplciate
{
internal class Program
{
private static void Main(string[] args)
{
SvgTest();
}
private static void SvgTest()
{
var name = Console.ReadLine();
while (name != "end")
{
var svgStream = new MemoryStream(File.ReadAllBytes(@$"..\..\..\Images\{name}.svg"));
var svg = new SvgGenerate(svgStream, 1000, 361);
var tt = svg.GenerateDuplicateIamgeStream();
File.WriteAllBytes(@$"..\..\..\Images\{name}-D.svg", tt.ToArray());
Console.WriteLine("Sucessed for convert");
name = Console.ReadLine();
}
Console.ReadKey();
}
private static void PngTest()
{
var name = "131134870";
var pngStream = new MemoryStream(File.ReadAllBytes(@$"..\Images\{name}.png"));
var png = new PNGGenerate();
var tt = png.GenerateDuplicateIamgeStream(pngStream);
File.WriteAllBytes(@$"..\Images\{name}-D.png", ((MemoryStream)tt).ToArray());
}
}
}