View Single Post
Old 2nd January 2018, 10:04   #1396  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Yes, it's exactly that, except that the first conversion (from SUP to SUP) fixes only the false positives of the multiple ODS (the "Avatar bug"). ++1.0.2 doesn't have the palette/transparency bug.

The script I've made uses ImageMagick's convert.exe. It's somewhat slow, but since there are usually only a few multiple ODS, it's fast enough.
The command line looks like this:
Quote:
convert.exe -size "474x864" xc:none "test/test_exp_exp_0002_0.png" -geometry +34+0 -composite "test/test_exp_exp_0002_1.png" -geometry +0+820 -composite "test/test_exp_exp_0002_combined.png"
Where the size is the size of the transparent bitmap receiving the two (or more) subtitles and the -geometry parameters are the X/Y coordinates of the PNGs within that bitmap. Both are easy to compute from the values in the XML. You can add more -geometry +x+y -composite "sub.png" chains if there are more than 2 subtitles to compose, but I have never encountered that.

The script checks also if there are bad entries in the XML, with <Graphic Width="0" Height="0" X="0" Y="0"> or missing PNG files, as they are the sign that a stream causing the "Avatar bug" has been converted directly to XML/PNG. Anyway, that buggy XML/PNG streams cannot be loaded in any version of BDSup2Sub, due to the missing PNGs.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 2nd January 2018 at 10:08.
r0lZ is offline   Reply With Quote