@@ -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
0 commit comments