@Nullable private String overrideXmlFileContent(@NotNull Document vdDocument,@NotNull VdPreview.SourceSize vdOriginalSize,@NotNull StringBuilder errorBuffer){
  int finalWidth=vdOriginalSize.getWidth();
  int finalHeight=vdOriginalSize.getHeight();
  Integer outputWidth=myOutputWidth.get();
  Integer outputHeight=myOutputHeight.get();
  if (outputWidth > 0) {
    finalWidth=outputWidth;
  }
  if (outputHeight > 0) {
    finalHeight=outputHeight;
  }
  finalWidth=Math.max(VdPreview.MIN_PREVIEW_IMAGE_SIZE,finalWidth);
  finalHeight=Math.max(VdPreview.MIN_PREVIEW_IMAGE_SIZE,finalHeight);
  finalWidth=Math.min(VdPreview.MAX_PREVIEW_IMAGE_SIZE,finalWidth);
  finalHeight=Math.min(VdPreview.MAX_PREVIEW_IMAGE_SIZE,finalHeight);
  VdOverrideInfo overrideInfo=new VdOverrideInfo(finalWidth,finalHeight,myOpacity.get(),myAutoMirrored.get());
  return VdPreview.overrideXmlContent(vdDocument,overrideInfo,errorBuffer);
}

@ Nullable private String overrideXmlFileContent ( @ NotNull Document vdDocument , @ NotNull VdPreview . SourceSize vdOriginalSize , @ NotNull StringBuilder errorBuffer ) { int finalWidth = vdOriginalSize . getWidth ( ) ; int finalHeight = vdOriginalSize . getHeight ( ) ; Integer outputWidth = myOutputWidth . get ( ) ; Integer outputHeight = myOutputHeight . get ( ) ; if ( outputWidth > 0 ) { finalWidth = outputWidth ; } if ( outputHeight > 0 ) { finalHeight = outputHeight ; } finalWidth = Math . max ( VdPreview . MIN_PREVIEW_IMAGE_SIZE , finalWidth ) ; finalHeight = Math . max ( VdPreview . MIN_PREVIEW_IMAGE_SIZE , finalHeight ) ; finalWidth = Math . min ( VdPreview . MAX_PREVIEW_IMAGE_SIZE , finalWidth ) ; finalHeight = Math . min ( VdPreview . MAX_PREVIEW_IMAGE_SIZE , finalHeight ) ; VdOverrideInfo overrideInfo = new VdOverrideInfo ( finalWidth , finalHeight , myOpacity . get ( ) , myAutoMirrored . get ( ) ) ; return VdPreview . overrideXmlContent ( vdDocument , overrideInfo , errorBuffer ) ; }
modify the source xml content with custom values set by the user , such as final output size and opacity .
