Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Revan654 committed Sep 24, 2018
1 parent 403e876 commit 1e6935b
Show file tree
Hide file tree
Showing 4 changed files with 272 additions and 161 deletions.
29 changes: 25 additions & 4 deletions General/Extras.vb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Public Class GIF
proj.SourceFile = inputFile
End If

proj.Log.WriteHeader("Saving GIF")
proj.Log.WriteLine(inputFile)
proj.Log.Save(proj)

Dim Rate = s.Storage.GetInt("GifFrameRate", 15)
Dim cachePath = Folder.Temp + "Palette.png"
Dim OutPutPath = inputFile + ".gif"
Expand Down Expand Up @@ -42,6 +46,10 @@ End Class
proj.SourceFile = inputFile
End If

proj.Log.WriteHeader("Saving Thumbnails")
proj.Log.WriteLine(inputFile)
proj.Log.Save(proj)

Dim Col = s.Storage.GetInt("MTNColumn", 4)
Dim Rows = s.Storage.GetInt("MTNRow", 6)
Dim SizeWidth = s.Storage.GetInt("MTNWidth", 1280)
Expand All @@ -66,6 +74,10 @@ Public Class PNG
proj.SourceFile = inputFile
End If

proj.Log.WriteHeader("Saving aPNG")
proj.Log.WriteLine(inputFile)
proj.Log.Save(proj)

Dim Rate = s.Storage.GetInt("PNGFrameRate", 15)
Dim Path = inputFile + ".apng"
Dim NewPath = inputFile + ".png"
Expand All @@ -74,12 +86,21 @@ Public Class PNG
Dim Duration = s.Storage.GetString("PNGLength", 4)
Dim Size = s.Storage.GetInt("PNGScale", 480)
Dim OptSettings = s.Storage.GetString("PNGopt", "-z0")
Dim Opt = s.Storage.GetBool("OptSetting", False)

If Opt = False Then

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)
File.Move(Path, NewPath)
g.DefaultCommands.ExecuteCommandLine(Package.Items("PNGopt").Path.Escape + " " + OptSettings + " " + """" + NewPath + """" + " " + """" + OptOut + """", True, True, False)
File.Delete(NewPath)
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)
File.Move(Path, NewPath)

Else

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)
File.Move(Path, NewPath)
g.DefaultCommands.ExecuteCommandLine(Package.Items("PNGopt").Path.Escape + " " + OptSettings + " " + """" + NewPath + """" + " " + """" + OptOut + """", True, True, False)
File.Delete(NewPath)

End If

End Sub

Expand Down
5 changes: 5 additions & 0 deletions General/LogBuilder.vb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ Public Class LogBuilder
Shared EnvironmentString As String 'cached due to bug report

Sub WriteEnvironment()

Dim Memory = My.Computer.Info.TotalPhysicalMemory \ 1073741824
Dim MemoryF = Math.Ceiling(My.Computer.Info.TotalPhysicalMemory * 100D) / 100D

If ToString.Contains("- System Environment -") Then Exit Sub
WriteHeader("System Environment")

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

Expand Down

0 comments on commit 1e6935b

Please sign in to comment.