Skip to content

Commit 1e6935b

Browse files
authored
Add files via upload
1 parent 403e876 commit 1e6935b

4 files changed

Lines changed: 272 additions & 161 deletions

File tree

General/Extras.vb

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Public Class GIF
1212
proj.SourceFile = inputFile
1313
End If
1414

15+
proj.Log.WriteHeader("Saving GIF")
16+
proj.Log.WriteLine(inputFile)
17+
proj.Log.Save(proj)
18+
1519
Dim Rate = s.Storage.GetInt("GifFrameRate", 15)
1620
Dim cachePath = Folder.Temp + "Palette.png"
1721
Dim OutPutPath = inputFile + ".gif"
@@ -42,6 +46,10 @@ End Class
4246
proj.SourceFile = inputFile
4347
End If
4448

49+
proj.Log.WriteHeader("Saving Thumbnails")
50+
proj.Log.WriteLine(inputFile)
51+
proj.Log.Save(proj)
52+
4553
Dim Col = s.Storage.GetInt("MTNColumn", 4)
4654
Dim Rows = s.Storage.GetInt("MTNRow", 6)
4755
Dim SizeWidth = s.Storage.GetInt("MTNWidth", 1280)
@@ -66,6 +74,10 @@ Public Class PNG
6674
proj.SourceFile = inputFile
6775
End If
6876

77+
proj.Log.WriteHeader("Saving aPNG")
78+
proj.Log.WriteLine(inputFile)
79+
proj.Log.Save(proj)
80+
6981
Dim Rate = s.Storage.GetInt("PNGFrameRate", 15)
7082
Dim Path = inputFile + ".apng"
7183
Dim NewPath = inputFile + ".png"
@@ -74,12 +86,21 @@ Public Class PNG
7486
Dim Duration = s.Storage.GetString("PNGLength", 4)
7587
Dim Size = s.Storage.GetInt("PNGScale", 480)
7688
Dim OptSettings = s.Storage.GetString("PNGopt", "-z0")
89+
Dim Opt = s.Storage.GetBool("OptSetting", False)
90+
91+
If Opt = False Then
7792

78-
g.DefaultCommands.ExecuteCommandLine(Package.Items("ffmpeg").Path.Escape + " -ss " & Seek & " -t " & Duration & " -i " + """" + inputFile + """" + " -lavfi " + """" + "fps=" & Rate & ",scale=" & Size & ":-1:flags=spline" + """ -plays 0 -loglevel quiet -an -y " + """" + Path + """", True, True, False)
79-
File.Move(Path, NewPath)
80-
g.DefaultCommands.ExecuteCommandLine(Package.Items("PNGopt").Path.Escape + " " + OptSettings + " " + """" + NewPath + """" + " " + """" + OptOut + """", True, True, False)
81-
File.Delete(NewPath)
93+
g.DefaultCommands.ExecuteCommandLine(Package.Items("ffmpeg").Path.Escape + " -ss " & Seek & " -t " & Duration & " -i " + """" + inputFile + """" + " -lavfi " + """" + "fps=" & Rate & ",scale=" & Size & ":-1:flags=spline" + """ -plays 0 -loglevel quiet -an -y " + """" + Path + """", True, True, False)
94+
File.Move(Path, NewPath)
8295

96+
Else
97+
98+
g.DefaultCommands.ExecuteCommandLine(Package.Items("ffmpeg").Path.Escape + " -ss " & Seek & " -t " & Duration & " -i " + """" + inputFile + """" + " -lavfi " + """" + "fps=" & Rate & ",scale=" & Size & ":-1:flags=spline" + """ -plays 0 -loglevel quiet -an -y " + """" + Path + """", True, True, False)
99+
File.Move(Path, NewPath)
100+
g.DefaultCommands.ExecuteCommandLine(Package.Items("PNGopt").Path.Escape + " " + OptSettings + " " + """" + NewPath + """" + " " + """" + OptOut + """", True, True, False)
101+
File.Delete(NewPath)
102+
103+
End If
83104

84105
End Sub
85106

General/LogBuilder.vb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ Public Class LogBuilder
7373
Shared EnvironmentString As String 'cached due to bug report
7474

7575
Sub WriteEnvironment()
76+
77+
Dim Memory = My.Computer.Info.TotalPhysicalMemory \ 1073741824
78+
Dim MemoryF = Math.Ceiling(My.Computer.Info.TotalPhysicalMemory * 100D) / 100D
79+
7680
If ToString.Contains("- System Environment -") Then Exit Sub
7781
WriteHeader("System Environment")
7882

@@ -82,6 +86,7 @@ Public Class LogBuilder
8286
"Language:" + CultureInfo.CurrentCulture.EnglishName + BR +
8387
"CPU:" + Registry.LocalMachine.GetString("HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString") + BR +
8488
"GPU:" + String.Join(", ", SystemHelp.VideoControllers) + BR +
89+
"Memory:" + MemoryF.ToString.Shorten(1) + " GB" + BR +
8590
"Resolution:" & Screen.PrimaryScreen.Bounds.Width & " x " & Screen.PrimaryScreen.Bounds.Height & BR +
8691
"DPI:" & g.MainForm.DeviceDpi
8792

0 commit comments

Comments
 (0)