DVBTechnics Forum
some tilted 8-color .bmp subtitles -- and fix - Druckversion

+- DVBTechnics Forum (https://forum.dvbtechnics.info)
+-- Forum: Offizieller Software-Support (https://forum.dvbtechnics.info/forumdisplay.php?fid=6)
+--- Forum: Project X (https://forum.dvbtechnics.info/forumdisplay.php?fid=20)
+--- Thema: some tilted 8-color .bmp subtitles -- and fix (/showthread.php?tid=5384)



some tilted 8-color .bmp subtitles -- and fix - domo - 17.01.2015

Hi

When creating the .bmp files from demuxed subtitle stream some of the
pictures appear tilted and shifted (last time 10 out of 891).

This happened with 0.90, 0.91 and now latests CVX (0.91.0.10 (07.02.2014)

I found this patch from ProjectX bug tracker:

--- a/src/net/sourceforge/dvb/projectx/subtitle/BMP.java 2013-01-29 14:28:45.000000000 +0100
+++ b/src/net/sourceforge/dvb/projectx/subtitle/BMP.java 2013-03-12 18:16:40.730592272 +0100
@@ -223,7 +223,7 @@ public class BMP extends Object {
out.write(0xFF & getColorIndex(pixels[b + a * width], color_table_array));
}

- out.write(new byte[width & 3]); //padding bytes
+ out.write(new byte[4 - width & 3]); //padding bytes
}

out.flush();

( http://sourceforge.net/p/project-x/bugs/70/ )

and it fixes the problem; now all subtitle pictures looks OK.


Thanks for ProjectX (and this patch)