mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
parent
ebc789afbb
commit
50a9cf5b98
@ -474,6 +474,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
internal MakeBitmapParameter MakeMakeBitmapParameter(int index, int screenWidth, int screenHeight)
|
||||
{
|
||||
var p = _subtitle.GetParagraphOrDefault(index);
|
||||
if (p == null)
|
||||
{
|
||||
p = new Paragraph();
|
||||
}
|
||||
|
||||
var parameter = new MakeBitmapParameter
|
||||
{
|
||||
Type = _exportType,
|
||||
@ -510,6 +515,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
FullFrame = checkBoxFullFrameImage.Checked,
|
||||
FullFrameBackgroundColor = panelFullFrameBackground.BackColor,
|
||||
};
|
||||
|
||||
if (index < _subtitle.Paragraphs.Count)
|
||||
{
|
||||
parameter.P = _subtitle.Paragraphs[index];
|
||||
@ -571,6 +577,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
parameter.P = null;
|
||||
}
|
||||
|
||||
return parameter;
|
||||
}
|
||||
|
||||
|
@ -21,13 +21,19 @@ namespace Nikse.SubtitleEdit.Logic.CommandLineConvert
|
||||
|
||||
using (var form = new ExportPngXml())
|
||||
{
|
||||
form.Initialize(new Subtitle(), new SubRip(), BatchConvert.BluRaySubtitle, fileName, null, fileName);
|
||||
var sub = tsParser.GetDvbSubtitles(pid);
|
||||
|
||||
var tempSubtitle = new Subtitle();
|
||||
foreach (var x in sub)
|
||||
{
|
||||
tempSubtitle.Paragraphs.Add(new Paragraph(string.Empty, x.StartMilliseconds, x.EndMilliseconds));
|
||||
}
|
||||
|
||||
form.Initialize(tempSubtitle, new SubRip(), BatchConvert.BluRaySubtitle, fileName, null, fileName);
|
||||
|
||||
var language = GetFileNameEnding(programMapTableParser, pid);
|
||||
var outputFileName = CommandLineConverter.FormatOutputFileNameForBatchConvert(Utilities.GetPathAndFileNameWithoutExtension(fileName) + language + Path.GetExtension(fileName), ".sup", outputFolder, overwrite);
|
||||
stdOutWriter?.Write($"{count}: {Path.GetFileName(fileName)} -> PID {pid} to {outputFileName}...");
|
||||
var sub = tsParser.GetDvbSubtitles(pid);
|
||||
progressCallback?.Invoke($"Save PID {pid}");
|
||||
var subtitleScreenSize = GetSubtitleScreenSize(sub, overrideScreenSize, resolution);
|
||||
using (var binarySubtitleFile = new FileStream(outputFileName, FileMode.Create))
|
||||
|
Loading…
Reference in New Issue
Block a user