String sNewGfx = _aPSList[i];
// String sDiffGfx_ = getJPEGName(_sOutputPath, sS1Basename + ".diff", StringHelper.createValueString(i, 4));
String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx );
StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
// if (FileHelper.exists(sDiffGfx))
if (sDiffGfx.length() > 0)
{
int nResult = identify(sDiffGfx);
if (nResult == 1)
{
aStatus.nDiffStatus = StatusHelper.DIFF_NO_DIFFERENCES;
}
else
{
try
{
int nPercent = estimateGfx(sOldGfx, sNewGfx, sDiffGfx);
// GlobalLogWriter.get().println("Hello World: Percent:= " + nPercent);
// GlobalLogWriter.get().println("Hello World: TriState:= " + _tUseBorderMove.intValue());
// GlobalLogWriter.get().println("Hello World: DocType:= " + m_sDocumentType);
aStatus.nDiffStatus = StatusHelper.DIFF_DIFFERENCES_FOUND;
aStatus.nPercent = nPercent;
if (nPercent > 75 &&
((_tUseBorderMove == TriState.TRUE ) ||
((_tUseBorderMove == TriState.UNSET) &&
m_sDocumentType.indexOf("MS PowerPoint") > 0)))
{
_tUseBorderMove = TriState.TRUE;
// TODO: problem is here, that we have to create some new names.
String sBasename1 = FileHelper.getBasename(sOldGfx);
String sNameNoSuffix1 = FileHelper.getNameNoSuffix(sBasename1);
String sBasename2 = FileHelper.getBasename(sNewGfx);
String sNameNoSuffix2 = FileHelper.getNameNoSuffix(sBasename2);
String sTmpDir = util.utils.getUsersTempDir();
String fs = System.getProperty("file.separator");
String sOld_BM_Gfx = sTmpDir + fs + sNameNoSuffix1 + "-BM-" + StringHelper.createValueString(i, 4) + ".jpg";
String sNew_BM_Gfx = sTmpDir + fs + sNameNoSuffix2 + "-BM-" + StringHelper.createValueString(i, 4) + ".jpg";
try
{
BorderRemover a = new BorderRemover();
a.createNewImageWithoutBorder(sOldGfx, sOld_BM_Gfx);
a.createNewImageWithoutBorder(sNewGfx, sNew_BM_Gfx);
String sDiff_BM_Gfx = compareJPEGs( sOld_BM_Gfx, sNew_BM_Gfx );
aStatus.setFilesForBorderMove(sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx);
// if (FileHelper.exists(sDiff_BM_Gfx))
if (sDiff_BM_Gfx.length() > 0)
{
nResult = identify(sDiff_BM_Gfx);