package rainbowPackage;

import java.awt.image.BufferedImage;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
//import java.util.Timer;
//import java.util.TimerTask;

import javax.imageio.ImageIO;

import org.jcodec.api.awt.AWTSequenceEncoder;
import org.jcodec.common.io.NIOUtils;
import org.jcodec.common.io.SeekableByteChannel;

/*import java.io.*;

import org.jcodec.api.SequenceEncoder;
import org.jcodec.api.SequenceEncoder.*;
import org.jcodec.api.awt.*;
import org.jcodec.api.awt.AWTSequenceEncoder.*;
import org.jcodec.common.Codec;
import org.jcodec.common.Format;
import org.jcodec.common.model.Rational;
import org.jcodec.scale.AWTUtil;
import org.jcodec.api.*;
import java.nio.channels.*; // */ 
//import java.nio.channels.SeekableByteChannel;
//import org.jcodec.*;//Keep For .mp4 Video Creation

import java.awt.*;
//import java.awt.image.*;

import javafx.application.Platform;
//import javafx.application.Platform;
import javafx.embed.swing.SwingFXUtils;
//import javafx.event.EventHandler;
import javafx.scene.control.Label;
import javafx.scene.*;
import javafx.scene.image.*;
import javafx.scene.image.Image;
//import javafx.scene.control.Dialog.*;
//import javafx.scene.control.Control.*;
//import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Screen;
import javafx.stage.Stage;
//import javafx.collections.ObservableList;
//import rainbowPackage.RainbowSoftColorCodesSets.BuddhismSchemeSet;
//import rainbowPackage.VibrantColors;
//import rainbowPackage.VibrantColorCombos;
/*import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.util.Duration;// */
import javafx.scene.Scene;



public class EightTypesOfReversedInvertedDiagnostics
{
	double sliderInterval = 100;
	Diagnostics diagnostics = null;
	RainbowSoftColor color = new RainbowSoftColor( new double[]{0,0,0,1} );//????????????????????????????
	RainbowPattern2D pattern2D = new RainbowPattern2D( new double[]{0,0,0,1} );
	RainbowPattern2D pattern2DArray[] = { new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ), new RainbowPattern2D( new double[]{0,0,0,1} ),  };
	//RainbowSoft2D rainbowSoft2D = new RainbowSoft2D( new double[]{0,0,0,1} );
	Buddhism buddhism = new Buddhism( new double[]{0,0,0,1} );
	MagiElite magiElite = new MagiElite( new double[]{0,0,0,1} );
	FwaSplashLogo fwaSplashLogo = new FwaSplashLogo( new double[]{0,0,0,1} );
	TransparencySlider transparencySlider = new TransparencySlider( new double[]{0,0,0,1} );
	RainbowSoftColor rainbowSoftColor = new RainbowSoftColor( new double[]{0,0,0,1} );
	Color tempFXColor = Color.BLACK;
	BufferedImage bImage = null;
	AWTSequenceEncoder encoder;
	Stage tertiaryStage;
	Image tertiaryBasisImage[] = new Image[4];
	Image tertiaryBackgroundBasisImage[] = new Image[4];
	Image tertiaryCurrentBrowserImage;
	WebEngine thirdBrowserEngine;
	WebView thirdBrowser;
	StackPane thirdStackPaneForBasis;
	StackPane thirdStackPaneForBackground;
	Scene thirdScene;
	Screen thirdScreen;
	Label thirdStateLabel;
	File thirdFile;
	File thirdJavaScriptFile;
	File thirdXSliderFile;
	//Thread tertiaryThread;
	boolean tertiaryIsFullScreened;
	Image tertiaryBackupWorkAroundImage;
	double tertiaryXslider = 0;
	double videoFrameQuantity = 7;
	double startingPoint = 0;
	double videoSequenceLoopQuantity;
	double videoSplittingQuantity = 1;
	double gradientExpontierMultiplier = 4.;
	double tertiaryBackgroundBasisImageWidth;
	double tertiaryBackgroundBasisImageHeight;
	double numberOfScrollFrames;
	SeekableByteChannel tertiaryVideoOut;

	Camera camera;
	WritableImage tertiaryWritableImage;
	PixelReader tertiaryCurrentBrowserImagePR;
	//PixelReader tertiaryBrowserTransitionImagePR;
	PixelWriter tertiaryCurrentBrowserImagePW;
	PixelReader tertiaryBackUpWorkAroundImagePR;
	PixelReader tertiaryBackgroundBasisImagePR[] = new PixelReader[4];
	PixelReader tertiaryBasisImagePR[] = new PixelReader[4];
	PixelWriter tertiaryPW;
	//PixelWriter tertiaryBrowserPW;
	ImageView tertiaryCurrentBrowserImageView, tertiaryBackupWorkAroundImageView, tertiaryBasisImageView[] = new ImageView[4], tertiaryBackgroundBasisImageView[] = new ImageView[4];//tertiaryCurrentTransitionBrowserImageView,
	WritableImage tertiaryBufferPictureForWritableImage, tertiaryBufferPictureForBrowser;//, tertiaryBrowserWritableImage, tertiaryBufferPictureForTransitionWritableBrowserImage;

	Parent tertiaryRoot;

	public EightTypesOfReversedInvertedDiagnostics ( Stage TertiaryStage, Image[] TertiaryBasisImage, Image[] TertiaryBackgroundBasisImage, Image TertiaryCurrentBrowserImage, Image TertiaryBackupWorkAroundImage,
			WebEngine ThirdBrowserEngine, WebView ThirdBrowser, StackPane ThirdStackPaneForBasis, StackPane ThirdStackPaneForBackground, Scene ThirdScene, Screen ThirdScreen, Label ThirdStateLabel, File ThirdFile, File ThirdJavaScriptFile,
			File ThirdXSliderFile, /*Thread TertiaryThread,*/ SeekableByteChannel TertiaryVideoOut, WritableImage TertiaryWritableImage, WritableImage TertiaryBufferPictureForWritableImage,
			/*WritableImage TertiaryBrowserWritableImage,*/ WritableImage TertiaryBufferPictureForBrowser, PixelReader TertiaryCurrentBrowserImagePR, /*PixelReader TertiaryBrowserTransitionImagePR,*/
			PixelReader TertiaryBackUpWorkAroundImagePR, PixelReader[] TertiaryBackgroundBasisImagePR, PixelReader[] TertiaryBasisImagePR, PixelWriter TertiaryPW, /*PixelWriter TertiaryBrowserPW,*/
			ImageView TertiaryCurrentBrowserImageView, ImageView TertiaryCurrentTransitionBrowserImageView, ImageView TertiaryBackupWorkAroundImageView, ImageView[] TertiaryBasisImageView,
			ImageView[] TertiaryBackgroundBasisImageView,	boolean TertiaryIsFullScreened, double VideoFrameQuantity, double StartingPoint, double VideoSequenceLoopQuantity,
			double TertiaryBackgroundBasisImageWidth, double TertiaryBackgroundBasisImageHeight, double NumberOfScrollFrames, Parent TertiaryRoot )
	{
		tertiaryStage = TertiaryStage;

		tertiaryCurrentBrowserImage = TertiaryCurrentBrowserImage;
		thirdBrowserEngine = ThirdBrowserEngine;
		thirdBrowser = ThirdBrowser;
		thirdStackPaneForBasis = ThirdStackPaneForBasis;
		thirdStackPaneForBackground = ThirdStackPaneForBackground;
		thirdScene = ThirdScene;
		thirdScreen = ThirdScreen;
		thirdStateLabel = ThirdStateLabel;
		thirdFile = ThirdFile;
		thirdJavaScriptFile = ThirdJavaScriptFile;
		thirdXSliderFile = ThirdXSliderFile;
		//tertiaryThread = TertiaryThread;
		tertiaryIsFullScreened = TertiaryIsFullScreened;
		tertiaryBackupWorkAroundImage = TertiaryBackupWorkAroundImage;
		videoFrameQuantity = VideoFrameQuantity;
		startingPoint = StartingPoint;
		videoSequenceLoopQuantity = VideoSequenceLoopQuantity;
		tertiaryVideoOut = TertiaryVideoOut;

		tertiaryWritableImage = TertiaryWritableImage;
		tertiaryCurrentBrowserImagePR = TertiaryCurrentBrowserImagePR;
		//tertiaryBrowserTransitionImagePR = TertiaryBrowserTransitionImagePR;
		tertiaryBackUpWorkAroundImagePR = TertiaryBackUpWorkAroundImagePR;


		tertiaryPW = TertiaryPW;
		//tertiaryBrowserPW = TertiaryBrowserPW;
		tertiaryCurrentBrowserImageView = TertiaryCurrentBrowserImageView;
		//tertiaryCurrentTransitionBrowserImageView = TertiaryCurrentTransitionBrowserImageView;
		tertiaryBackupWorkAroundImageView = TertiaryBackupWorkAroundImageView;

		for ( int i = 0; i < 4; i++ )
		{
			tertiaryBasisImage[i] = TertiaryBasisImage[i];
			tertiaryBackgroundBasisImage[i] = TertiaryBackgroundBasisImage[i];
			tertiaryBackgroundBasisImagePR[i] = TertiaryBackgroundBasisImagePR[i];
			tertiaryBasisImagePR[i] = TertiaryBasisImagePR[i];
			tertiaryBasisImageView[i] = TertiaryBasisImageView[i];
			tertiaryBackgroundBasisImageView[i] = TertiaryBackgroundBasisImageView[i];
		}

		tertiaryBufferPictureForWritableImage = TertiaryBufferPictureForWritableImage;
		//tertiaryBrowserWritableImage = TertiaryBrowserWritableImage;
		tertiaryBufferPictureForBrowser = TertiaryBufferPictureForBrowser;


		tertiaryBackgroundBasisImageWidth = TertiaryBackgroundBasisImageWidth;
		tertiaryBackgroundBasisImageHeight = TertiaryBackgroundBasisImageHeight;

		tertiaryRoot = TertiaryRoot;

		numberOfScrollFrames = NumberOfScrollFrames;

		diagnostics = new Diagnostics( thirdScreen.getBounds() );

		sliderInterval = videoSequenceLoopQuantity / videoFrameQuantity;
		//thirdScene = new Scene[(int)(videoFrameQuantity * ( videoSequenceLoopQuantity - startingPoint ) / videoSequenceLoopQuantity + 1 )];
		if ( videoFrameQuantity >= 6 )
			try { tertiaryVideoOut = NIOUtils.writableFileChannel( thirdFile.getPath() ); }
		catch (IOException e) {}

	}
	public BufferedImage videoRunner ()
	{
		//boolean donePixelWriting = false;
		bImage = null;
		if ( videoFrameQuantity >= 6 )
			try { encoder = AWTSequenceEncoder.create25Fps(thirdFile);}
		catch(IOException ie) { ie.printStackTrace(); }
		try { Thread.sleep(5000);//tertiaryThread.sleep(5000);
		} catch (InterruptedException eEight) {
			System.out.println("Interrupted.");
		}// */
		tertiaryStage.setFullScreen(tertiaryIsFullScreened);
		try { Thread.sleep(300);//tertiaryThread.sleep(300);
		} catch (InterruptedException eEight) {
			System.out.println("Interrupted.");
		}// */
		thirdBrowser.setPrefSize( tertiaryStage.getWidth(), tertiaryStage.getHeight() );
		try { Thread.sleep(4000);//tertiaryThread.sleep(4000);
		} catch (InterruptedException eEight) {
			System.out.println("Interrupted.");
		}// */
		System.out.println("Worked Till After Full Screen Enforcement");

		try { Thread.sleep(2000);//tertiaryThread.sleep(2000);
		} catch (InterruptedException eEight) {
			System.out.println("Interrupted.");
		}// */
		tertiaryStage.show();// */ Above Paragraph For FwaLogoSpalsh
		try { Thread.sleep(3500);//tertiaryThread.sleep(3500);
		} catch (InterruptedException eEightOutPut) {
			System.out.println("Interrupted."); }
		Dimension HalfedDim = new Dimension( 960, 540 );
		Dimension Dim = new Dimension ( (int)tertiaryStage.getWidth(), (int)tertiaryStage.getHeight() );// -48 ); // - 40.  -40
		HalfedDim.width = Math.round( (int)(tertiaryStage.getWidth() / 2));
		HalfedDim.height = Math.round( (int)(tertiaryStage.getHeight() / 2));
		//Dimension Dim = new Dimension ( (int)thirdScreen.getBounds().getWidth() , (int)thirdScreen.getBounds().getHeight() - 40 );
		//HalfedDim.width = Math.round( (int)thirdScreen.getBounds().getWidth() / 2 );
		//HalfedDim.height = Math.round( (int)thirdScreen.getBounds().getHeight() / 2 );
		double halfSreenDiagionalLength = Math.pow(Math.pow( HalfedDim.getWidth(), 2) + Math.pow( HalfedDim.getHeight(), 2), 0.5);
		double xScaleFactor = Dim.width / tertiaryBackgroundBasisImageWidth;
		double yScaleFactor = Dim.height / tertiaryBackgroundBasisImageHeight;
		tertiaryXslider = startingPoint;
		int frameIndex = Math.abs( (int)Math.round( videoFrameQuantity ) );
		ImageView tertiaryImageView = new ImageView();

		SnapshotParameters snapshotParameters = new SnapshotParameters();

		int beginingOfDiagnosticsIndex = 0, numberOfDiagnosticsIndexies = 32;
		if ( beginingOfDiagnosticsIndex < 8 )
		{
			tertiaryWritableImage = tertiaryBasisImageView[0].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[0], tertiaryBasisImageView[0] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /*tertiaryBackgroundBasisImageView,*/ tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[0], tertiaryBackgroundBasisImageView[0] );//, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );//, tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);
		}
		if ( beginingOfDiagnosticsIndex < 16)
		{
			tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /*tertiaryBackgroundBasisImageView,*/ tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );//, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );//, tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);
		}
		else if ( beginingOfDiagnosticsIndex < 24 )
		{
			tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /*tertiaryBackgroundBasisImageView,*/ tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );//, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );//, tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);
		}
		else if ( beginingOfDiagnosticsIndex < 32 )
		{
			tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /*tertiaryBackgroundBasisImageView,*/ tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );//, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );//, tertiaryImageView /*tertiaryCurrentTransitionBrowserImageView,*/);
		}
		
		tertiaryBufferPictureForWritableImage = tertiaryWritableImage;


		tertiaryImageView.setImage(tertiaryWritableImage);
		//tertiaryImageView[0].setImage(tertiaryWritableImage);
		int xEarly = 0;//, yEarly = 0;
		//thirdStackPane.getChildren().add( tertiaryImageView );
		StackPane thirdStackPaneForWritting = new StackPane();
		thirdStackPaneForWritting.getChildren().add(tertiaryImageView);
		tertiaryCurrentBrowserImagePR = tertiaryCurrentBrowserImage.getPixelReader();
		for ( int i = 0; i < 4; i++ )
		{
			tertiaryBackgroundBasisImagePR[i] = tertiaryBackgroundBasisImage[i].getPixelReader();
			tertiaryBasisImagePR[i] = tertiaryBasisImage[i].getPixelReader();
		}
		//tertiaryCurrentBrowserImagePW = tertiaryBrowserWritableImage.getPixelWriter();
		tertiaryPW = tertiaryWritableImage.getPixelWriter();
		//"FullDisplay", "SimplyBrowserShowing", "BackgroundToBasisFullDisplay", "FullDisplayNoTextShownAtAll", "TextDisplayAndBrowser", "TextDisplayAndBrowserBlackShowingBackground" "FullDisplayBasisText", "FullDisplayBackgroundToBasisNoTextShownAtAll", "BackgroundToBasisFullDisplayBasisText", "FullDisplayBasisBackround", "FullDisplayBackroundToBasis", "FullDisplayBasisOnly", "FullDisplayBackroundToBasisOnly", "BasisBackroundDisplayOnly", "BackroundToBasisOnly", "TextDisplayOnly", "BasisTextDisplayOnly", "BasisTextDisplayOnWhite", "BasisTextDisplayOnBlack", "NoDisplay", "BlackScreen"
		String typeOfDisplay = "FullDisplay";//"BasisTextDisplayOnWhite";//"BasisTextDisplayOnly";//"FullDisplay";//
		boolean reversedColors = false, invertBasisFromBackground = true,  invertInsteadOfReverse = false, invertBoth = false, invertJustOrigional = false, nextStepColorTooSimilarEffect = true, invertTextAlways = true;//invertBasisFromBackground = true For CGI Level Production Until Threading ReAccess For Future JavaFX Eclipse IDE Developments //reversalOfBackgroundEffectsMaster = true,
		Color initialColorContrastingChoice = VibrantColors.NeonGreen, colorTooSimilarReplacementColor = VibrantColors.SkyBlue;
		double colorDifference = 164;
		int lengthOfColorBar = Dim.height * 29 / 1080;

		System.out.println("Showing Frame 0");
		//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren().add(browser);
		//thirdStackPane[(int)( videoFrameQuantity * ( tertiaryXslider - startingPoint ) / videoSequenceLoopQuantity ) + 1].getChildren().remove(0);
		if (tertiaryRoot == null) {
			throw new RuntimeException("Could not find " + tertiaryRoot.toString()); }
		//camera may Be Needed
		//thirdScene.getCamera().snapshot(snapshotParameters, tertiaryWritableImage);
		thirdScene.setRoot(tertiaryRoot);
		tertiaryStage.show();// !!!!! Uncomment To Show Video !!!!!
		thirdScene = new Scene(thirdStackPaneForBackground);
		//thirdScene = new Scene(thirdStackPaneForBasis);
		//thirdScene = new Scene(thirdStackPaneForWritting);
		tertiaryStage.setScene(thirdScene);
		System.out.println(Dim);
		//tertiaryStage.setFullScreen(tertiaryIsFullScreened);// ASDF !!!! HERE ! Important For Full Screened

		try { Thread.sleep(3000);//tertiaryThread.sleep(3000);
		} catch (InterruptedException eEightEight) {
			System.out.println("Interrupted.");
		}// */

		tertiaryStage.show(); // !!!!! Uncomment To Show Video !!!!!
		//tertiaryStage.setFullScreen(tertiaryIsFullScreened);// Important For Full Screened
		//thirdScene = new Scene(tertiaryRoot);
		bImage = SwingFXUtils.fromFXImage(thirdScene.snapshot( tertiaryWritableImage ), bImage );

		try {
			File outputFile = new File("C:/TestImage-1.png");
			ImageIO.write(bImage, "png", outputFile);
		} catch (IOException eEightOutPut2) {
			throw new RuntimeException(eEightOutPut2);
		}
		//Above Getting 3D Viewing To Work  
		try { Thread.sleep(1000);//tertiaryThread.sleep(1000);
		} catch (InterruptedException eEight) {
			System.out.println("Interrupted.");
		}// */
		//tertiaryXslider = videoSequenceLoopQuantity * 3 / 4;//Custom Beggining Frame Reference Viable Uncommented Alone
		//tertiaryXslider = 1582 * sliderInterval;//Usefull For Setting Frame To Start For When It Finishes Change videoSequenceLoopQuantity
		tertiaryCurrentBrowserImageView.setImage( thirdBrowser.snapshot( snapshotParameters, tertiaryBufferPictureForBrowser ) );
		tertiaryCurrentBrowserImage = tertiaryCurrentBrowserImageView.getImage();
		tertiaryCurrentBrowserImagePR = tertiaryCurrentBrowserImage.getPixelReader();

		//tertiaryCurrentTransitionBrowserImageView.setImage(tertiaryCurrentBrowserImage);
		//tertiaryBrowserWritableImage = tertiaryBufferPictureForBrowser;
		//tertiaryBrowserTransitionImagePR = tertiaryCurrentBrowserImagePR;
		//tertiaryBrowserPW = tertiaryBrowserWritableImage.getPixelWriter();
		Platform.runLater( () -> { try { Thread.sleep(2489);//tertiaryThread.sleep(2489);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		} } ) ;// */
		tertiaryStage.show();
		try { Thread.sleep(1440);//tertiaryThread.sleep(1000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		Platform.runLater( () -> { try { Thread.sleep(10000);//tertiaryThread.sleep(4879);//4879//10000
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		} } ) ;// */

		//thirdStackPaneForBasis.getChildren().removeAll();
		//thirdStackPaneForBackground.getChildren().removeAll();		
		/*int z = 4;
			if ( z >= 8 && z < 16)
			{
				thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
				thirdStackPaneForBackground.getChildren().removeAll();
				thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );
				thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			}
			else if ( z < 24 )
			{
				thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
				thirdStackPaneForBackground.getChildren().removeAll();
				thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );
				thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			}
			else if ( z < 32 )
			{
				thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
				thirdStackPaneForBackground.getChildren().removeAll();
				thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );
				thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			}// */
		for ( int a = beginingOfDiagnosticsIndex; a < numberOfDiagnosticsIndexies; a++ )// a = 0; a < 32 // a = z; a < z + 1 //Needs To Be Done In The Batches Of 8 Right Now Of Same Basis & Background
			//while ( tertiaryXslider < videoSequenceLoopQuantity )//videoSequenceLoopQuantity )//fullScrollCycle / 4000 )// For Scrolling; tertiaryXslider < fullScrollCycle / 4000 . For MagiElite: videoSequenceLoopQuantity / 10)//for (tertiaryXslider = 0; tertiaryXslider <= 0.175979734764 * cy; tertiaryXslider++)
		{//0.175979734764 *
			frameIndex = (int)( Math.round( videoFrameQuantity * tertiaryXslider / videoSequenceLoopQuantity ) );
			thirdScene.setRoot(thirdStackPaneForBasis);
			try { Thread.sleep(1240);//tertiaryThread.sleep(4879);//4879//10000
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			}// */
			System.out.println("Got To Primary for Statement");
			//Platform.runLater( () -> {
			switch ( a )
			{
			case 0:	for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 1: for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 2: for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 3:	for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 4:	for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 5:	for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 6:	for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 7:	for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 8:	 thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 9:	thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 10: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 11: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 12: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 13: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 14: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 15: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[1] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[1] = tertiaryBasisImage[1].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[1] = tertiaryBackgroundBasisImage[1].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 16: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 17: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 18: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 19: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 20: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 21: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 22: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 23: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[2] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[2] = tertiaryBasisImage[2].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[2] = tertiaryBackgroundBasisImage[2].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 24: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 25: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 26: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 27: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 28: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, true, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 29: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, false, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 30: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, false, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			case 31: thirdStackPaneForBasis.getChildren().removeAll();//thirdStackPaneForBasis.getChildren().remove(3); thirdStackPaneForBasis.getChildren().remove(2);// thirdStackPaneForBasis.getChildren().removeLast();
			thirdStackPaneForBackground.getChildren().removeAll();//thirdStackPaneForBackground.getChildren().remove(3); thirdStackPaneForBackground.getChildren().remove(2);// thirdStackPaneForBackground.getChildren().removeLast();
			//tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			thirdStackPaneForBasis.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, tertiaryBackgroundBasisImageView[1], tertiaryBasisImageView[1], tertiaryBackgroundBasisImageView[2], tertiaryBasisImageView[2], tertiaryBackgroundBasisImageView[3], tertiaryBasisImageView[3] );//, /#tertiaryBackgroundBasisImageView,#/ tertiaryImageView /#tertiaryCurrentTransitionBrowserImageView,#/);//, tertiaryBasisImageView, tertiaryImageView );//, tertiaryImageView[0] );
			thirdStackPaneForBackground.getChildren().addAll( tertiaryBackupWorkAroundImageView, tertiaryCurrentBrowserImageView, tertiaryBasisImageView[3], tertiaryBackgroundBasisImageView[3] );
			thirdScene.setRoot(thirdStackPaneForBasis);
			tertiaryBasisImagePR[3] = tertiaryBasisImage[3].getPixelReader();
			thirdScene.setRoot(thirdStackPaneForBackground);
			tertiaryBackgroundBasisImagePR[3] = tertiaryBackgroundBasisImage[3].getPixelReader();// */
			for ( int x = 0; x < Dim.width; x++)
				for ( int y = 0; y < Dim.height; y++)
					tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, false, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, true, true, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );// */
			}
			//tertiaryPW.setColor( x, y, buddhism.BuddhismForRaster( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, sliderInterval, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, lengthOfColorBar, 24.6, 1., 1.014, 1.00000000,  halfSreenDiagionalLength, reversedColors, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[0], tertiaryBackgroundBasisImagePR[0], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, invertInsteadOfReverse, invertBoth, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );// Don't Change Object To It To Make This Work Because It Could Be ARGB Or RGB
			//tertiaryPW.setColor( x, y, magiElite.MagiEliteForRaster( -videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, 24.6, 88.8, 1., halfSreenDiagionalLength, reversedColors, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[1], tertiaryBackgroundBasisImagePR[1], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, invertInsteadOfReverse, invertBoth, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			//tertiaryPW.setColor( x, y, fwaSplashLogo.FwaLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, reversedColors, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[2], tertiaryBackgroundBasisImagePR[2], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, invertInsteadOfReverse, invertBoth, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );
			//tertiaryPW.setColor( x, y, fwaSplashLogo.FwaFlagLogoSplash( videoSequenceLoopQuantity, tertiaryXslider, tertiaryXslider, videoSequenceLoopQuantity, (int)x, (int)y, videoSequenceLoopQuantity, halfSreenDiagionalLength, xScaleFactor, yScaleFactor, reversedColors, 1., 2147483647, 1., 1., false, tertiaryBasisImagePR[3], tertiaryBackgroundBasisImagePR[3], tertiaryCurrentBrowserImagePR, Dim, typeOfDisplay, initialColorContrastingChoice, colorTooSimilarReplacementColor, colorDifference, invertBasisFromBackground, invertInsteadOfReverse, invertBoth, invertJustOrigional, invertTextAlways, nextStepColorTooSimilarEffect ) );////
			//Thread.yield();
			Platform.runLater( () -> { try { Thread.sleep(2688);
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			} } );// */
			//writableImageArray[frameIndex] = tertiaryWritableImage;
			//tertiaryWritableImage = currentPixelReaderFortertiaryPixelWriter;
			//tertiaryImageView[frameIndex].setImage(writableImageArray[frameIndex]);
			//thirdStackPane.getChildren().add(tertiaryImageView[frameIndex]);
			try { Thread.sleep(1868);
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			}// */
			//Platform.runLater( () -> {
			tertiaryImageView.setImage(tertiaryWritableImage);
			thirdStackPaneForWritting.snapshot(snapshotParameters, tertiaryWritableImage);
			thirdScene.setRoot(thirdStackPaneForWritting);
			try { Thread.sleep(2460);
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			}// */
			tertiaryStage.setScene(thirdScene);
			try { Thread.sleep(1234);
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			}// */
			tertiaryStage.show();
			try { Thread.sleep(3420);//tertiaryThread.sleep(1000);
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			}// */
			Platform.runLater( () -> { try { Thread.sleep(7420);//tertiaryThread.sleep(4879);//4879//10000
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			} } ) ;// */
			System.out.println("Picture Production Directly To C: Index a = " + a + " / 31.");
			System.out.println(Dim);
			try { Thread.sleep(1050);//tertiaryThread.sleep(1050);
			} catch (InterruptedException eEight) {
				System.out.println("Interrupted.");
			}// */
			//thirdScene.getCamera().snapshot(snapshotParameters, thirdStackPane.snapshot(snapshotParameters, tertiaryWritableImage) );//tertiaryWritableImage);
			bImage = SwingFXUtils.fromFXImage(thirdScene.snapshot( tertiaryWritableImage /*writableImageArray[frameIndex]*/ )/*tertiaryImageView[frameIndex].getScene().snapshot(tertiaryWritableImage)*//*thirdScene.getCamera().snapshot(snapshotParameters, tertiaryWritableImage)*/, bImage );
			switch ( a )
			{
			case 0:	try { File outputFile = new File("C:/BuddhismRegularAboutReversedAndInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 1:	try { File outputFile = new File("C:/BuddhismReversedNoInvert.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 2:	try { File outputFile = new File("C:/BuddhismReversedInvertInsteadOfDeReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 3:	try { File outputFile = new File("C:/BuddhismReversedInvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 4:	try { File outputFile = new File("C:/BuddhismReversedInvertInsteadOfDeReverseAndTheRestInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 5:	try { File outputFile = new File("C:/BuddhismInvertInsteadOfReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 6:	try { File outputFile = new File("C:/BuddhismNonInvertedReversal&InvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 7:	try { File outputFile = new File("C:/BuddhismNoReversalOfAnythingAndWholeThingInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 8:	try { File outputFile = new File("C:/MagiEliteRegularAboutReversedAndInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 9:	try { File outputFile = new File("C:/MagiEliteReversedNoInvert.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 10: try { File outputFile = new File("C:/MagiEliteReversedInvertInsteadOfDeReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 11: try { File outputFile = new File("C:/MagiEliteReversedInvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 12: try { File outputFile = new File("C:/MagiEliteReversedInvertInsteadOfDeReverseAndTheRestInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 13: try { File outputFile = new File("C:/MagiEliteInvertInsteadOfReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 14: try { File outputFile = new File("C:/MagiEliteNonInvertedReversal&InvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 15: try { File outputFile = new File("C:/MagiEliteNoReversalOfAnythingAndWholeThingInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 16: try { File outputFile = new File("C:/FwaLogoSplashRegularAboutReversedAndInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 17: try { File outputFile = new File("C:/FwaLogoSplashReversedNoInvert.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 18: try { File outputFile = new File("C:/FwaLogoSplashReversedInvertInsteadOfDeReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 19: try { File outputFile = new File("C:/FwaLogoSplashReversedInvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 20: try { File outputFile = new File("C:/FwaLogoSplashReversedInvertInsteadOfDeReverseAndTheRestInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 21: try { File outputFile = new File("C:/FwaLogoSplashInvertInsteadOfReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 22: try { File outputFile = new File("C:/FwaLogoSplashNonInvertedReversal&InvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 23: try { File outputFile = new File("C:/FwaLogoSplashNoReversalOfAnythingAndWholeThingInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 24: try { File outputFile = new File("C:/FwaFlagLogoSplashRegularAboutReversedAndInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 25: try { File outputFile = new File("C:/FwaFlagLogoSplashReversedNoInvert.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 26: try { File outputFile = new File("C:/FwaFlagLogoSplashReversedInvertInsteadOfDeReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 27: try { File outputFile = new File("C:/FwaFlagLogoSplashReversedInvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 28: try { File outputFile = new File("C:/FwaFlagLogoSplashReversedInvertInsteadOfDeReverseAndTheRestInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 29: try { File outputFile = new File("C:/FwaFlagLogoSplashInvertInsteadOfReverse.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 30: try { File outputFile = new File("C:/FwaFlagLogoSplashNonInvertedReversal&InvertBothOnly.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }
			case 31: try { File outputFile = new File("C:/FwaFlagLogoSplashNoReversalOfAnythingAndWholeThingInverted.png");	ImageIO.write(bImage, "png", outputFile); }	catch (IOException e) { throw new RuntimeException(e); }			
			}

			if ( videoFrameQuantity > 1 )
				if ( tertiaryXslider < 1 && tertiaryXslider > -1 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
				{
					try {
						File outputFile = new File("C:/TestImage00.png");
						ImageIO.write(bImage, "png", outputFile);
					} catch (IOException eEightOutput) {
						throw new RuntimeException(eEightOutput);
					}
				}
				else
					if ( tertiaryXslider > 288 && tertiaryXslider <= 289 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
					{
						try {
							File outputFile = new File("C:/TestImage01.png");
							ImageIO.write(bImage, "png", outputFile);
						} catch (IOException e) {
							throw new RuntimeException(e);
						}
					}
					else
						if ( tertiaryXslider > 576 && tertiaryXslider <= 577 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
						{
							try {
								File outputFile = new File("C:/TestImage02.png");
								ImageIO.write(bImage, "png", outputFile);
							} catch (IOException e) {
								throw new RuntimeException(e);
							}
						}
						else
							if ( tertiaryXslider > 864 && tertiaryXslider <= 866 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
							{//428 && tertiaryXslider <= 429 For 1/24th Intervals Instead Of 1/7 Like One Line Above
								try {
									File outputFile = new File("C:/TestImage03.png");
									ImageIO.write(bImage, "png", outputFile);
								} catch (IOException e) {
									throw new RuntimeException(e);
								}
							}
							else
								if ( tertiaryXslider > 1153 && tertiaryXslider <= 1154 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
								{
									try {
										File outputFile = new File("C:/TestImage04.png");
										ImageIO.write(bImage, "png", outputFile);
									} catch (IOException e) {
										throw new RuntimeException(e);
									}
								}
								else
									if ( tertiaryXslider > 1441 && tertiaryXslider <= 1442 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
									{
										try {
											File outputFile = new File("C:/TestImage05.png");
											ImageIO.write(bImage, "png", outputFile);
										} catch (IOException e) {
											throw new RuntimeException(e);
										}
									}
									else
										if ( tertiaryXslider > 1730 && tertiaryXslider <= 1731 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
										{
											/*try { tertiaryThread.sleep(8888);
								} catch (InterruptedException e) {
									System.out.println("Interrupted.");
								}// */
											try {
												File outputFile = new File("C:/TestImage06.png");
												ImageIO.write(bImage, "png", outputFile);
											} catch (IOException e) {
												throw new RuntimeException(e);
											}
										}
										else
											if ( tertiaryXslider > 2018 && tertiaryXslider <= 2019 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
											{
												try {
													File outputFile = new File("C:/TestImage07.png");
													ImageIO.write(bImage, "png", outputFile);
												} catch (IOException e) {
													throw new RuntimeException(e);
												}
											}
											else
												if ( tertiaryXslider > 2306 && tertiaryXslider <= 2307 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
												{
													try {
														File outputFile = new File("C:/TestImage08.png");
														ImageIO.write(bImage, "png", outputFile);
													} catch (IOException e) {
														throw new RuntimeException(e);
													}
												}
												else
													if ( tertiaryXslider > 2595 && tertiaryXslider <= 2596 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
													{
														try {
															File outputFile = new File("C:/TestImage09.png");
															ImageIO.write(bImage, "png", outputFile);
														} catch (IOException e) {
															throw new RuntimeException(e);
														}
													}
													else
														if ( tertiaryXslider > 2883 && tertiaryXslider <= 2884 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
														{
															try {
																File outputFile = new File("C:/TestImage10.png");
																ImageIO.write(bImage, "png", outputFile);
															} catch (IOException e) {
																throw new RuntimeException(e);
															}
														}
														else
															if ( tertiaryXslider > 3171 && tertiaryXslider <= 3173 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
															{
																try {
																	File outputFile = new File("C:/TestImage11.png");
																	ImageIO.write(bImage, "png", outputFile);
																} catch (IOException e) {
																	throw new RuntimeException(e);
																}
															}
															else
																if ( tertiaryXslider > 3460 && tertiaryXslider <= 3461 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																{
																	/*try { tertiaryThread.sleep(8888);
														} catch (InterruptedException e) {
															System.out.println("Interrupted.");
														}// */
																	try {
																		File outputFile = new File("C:/TestImage12.png");
																		ImageIO.write(bImage, "png", outputFile);
																	} catch (IOException e) {
																		throw new RuntimeException(e);
																	}
																}
																else
																	if ( tertiaryXslider > 3748 && tertiaryXslider <= 3749 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																	{
																		try {
																			File outputFile = new File("C:/TestImage13.png");
																			ImageIO.write(bImage, "png", outputFile);
																		} catch (IOException e) {
																			throw new RuntimeException(e);
																		}
																	}
																	else
																		if ( tertiaryXslider > 4036 && tertiaryXslider <= 4038 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																		{
																			try {
																				File outputFile = new File("C:/TestImage14.png");
																				ImageIO.write(bImage, "png", outputFile);
																			} catch (IOException e) {
																				throw new RuntimeException(e);
																			}
																		}
																		else
																			if ( tertiaryXslider > 4325 && tertiaryXslider <= 4326 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																			{
																				try {
																					File outputFile = new File("C:/TestImage15.png");
																					ImageIO.write(bImage, "png", outputFile);
																				} catch (IOException e) {
																					throw new RuntimeException(e);
																				}
																			}
																			else
																				if ( tertiaryXslider > 4613 && tertiaryXslider <= 4614 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																				{
																					try {
																						File outputFile = new File("C:/TestImage16.png");
																						ImageIO.write(bImage, "png", outputFile);
																					} catch (IOException e) {
																						throw new RuntimeException(e);
																					}
																				}
																				else
																					if ( tertiaryXslider > 4902 && tertiaryXslider <= 4903 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																					{
																						try {
																							File outputFile = new File("C:/TestImage17.png");
																							ImageIO.write(bImage, "png", outputFile);
																						} catch (IOException e) {
																							throw new RuntimeException(e);
																						}
																					}
																					else
																						if ( tertiaryXslider > 5190 && tertiaryXslider <= 5191 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																						{
																							/*try { tertiaryThread.sleep(8888);
																				} catch (InterruptedException e) {
																					System.out.println("Interrupted.");
																				}// */
																							try {
																								File outputFile = new File("C:/TestImage18.png");
																								ImageIO.write(bImage, "png", outputFile);
																							} catch (IOException e) {
																								throw new RuntimeException(e);
																							}
																						}
																						else
																							if ( tertiaryXslider > 5478 && tertiaryXslider <= 5479 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																							{
																								try {
																									File outputFile = new File("C:/TestImage19.png");
																									ImageIO.write(bImage, "png", outputFile);
																								} catch (IOException e) {
																									throw new RuntimeException(e);
																								}
																							}
																							else
																								if ( tertiaryXslider > 5767 && tertiaryXslider <= 5768 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																								{
																									try {
																										File outputFile = new File("C:/TestImage20.png");
																										ImageIO.write(bImage, "png", outputFile);
																									} catch (IOException e) {
																										throw new RuntimeException(e);
																									}
																								}
																								else
																									if ( tertiaryXslider > 6055 && tertiaryXslider <= 6056 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																									{
																										try {
																											File outputFile = new File("C:/TestImage21.png");
																											ImageIO.write(bImage, "png", outputFile);
																										} catch (IOException e) {
																											throw new RuntimeException(e);
																										}
																									}
																									else
																										if ( tertiaryXslider > 6343 && tertiaryXslider <= 6344 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																										{
																											try {
																												File outputFile = new File("C:/TestImage22.png");
																												ImageIO.write(bImage, "png", outputFile);
																											} catch (IOException e) {
																												throw new RuntimeException(e);
																											}
																										}
																										else
																											if ( tertiaryXslider > 6632 && tertiaryXslider <= 6633 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																											{
																												try {
																													File outputFile = new File("C:/TestImage23.png");
																													ImageIO.write(bImage, "png", outputFile);
																												} catch (IOException e) {
																													throw new RuntimeException(e);
																												}
																											}
																											else
																												if ( tertiaryXslider > 6920 && tertiaryXslider <= 6921 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																												{
																													/*try { tertiaryThread.sleep(8888);
																										} catch (InterruptedException e) {
																											System.out.println("Interrupted.");
																										}// */
																													try {
																														File outputFile = new File("C:/TestImage24.png");
																														ImageIO.write(bImage, "png", outputFile);
																													} catch (IOException e) {
																														throw new RuntimeException(e);
																													}
																												}// */
			try { Thread.sleep(777);//tertiaryThread.sleep(777);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */
			if ( videoFrameQuantity >= 6 )
				try {
					//System.out.println( "bImage Height: " + bImage.getHeight() );
					encoder.encodeImage( bImage );
					//encoder.encodeImage( bImage.getSubimage( 0, 0, 666, 888 ) );
				}
			catch(IOException ie) { ie.printStackTrace(); }
			System.out.println("Finished Encoding Frame(a): " + a );

			thirdScene.setRoot(thirdStackPaneForBasis);
			try { Thread.sleep(3594);//tertiaryThread.sleep(777);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */
			if ( a < 7 )
				tertiaryWritableImage = tertiaryBasisImageView[0].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			else if ( a < 15 )
				tertiaryWritableImage = tertiaryBasisImageView[1].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			else if ( a < 23 )
				tertiaryWritableImage = tertiaryBasisImageView[2].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);
			else if ( a < 31 )
				tertiaryWritableImage = tertiaryBasisImageView[3].snapshot(snapshotParameters, tertiaryBufferPictureForWritableImage);// */

			/*if ( tertiaryXslider != 0 &&  tertiaryXslider / ( sliderInterval * numberOfScrollFrames ) - Math.floor( tertiaryXslider / ( sliderInterval * numberOfScrollFrames ) ) < .0001)//interval * 11->Twice + (int)(tertiaryXslider / ( interval * 11 )) + " );\r\n" + 
				{
					try ( PrintWriter printWriterOut = new PrintWriter(thirdXSliderFile.getPath() ) )
					{
						printWriterOut.println("+" + tertiaryXslider + "d");
						printWriterOut.close();
					}
					catch(IOException ie) { ie.printStackTrace(); }// */
			/*try ( PrintWriter printWriterOut = new PrintWriter(thirdJavaScriptFile.getPath() ) )
					{
						printWriterOut.println("function scrollContinuously( timeInterval )\r\n" + 
								"{\r\n" + 
								"	timeInterval = 444;\r\n" + 
								"	window.setInterval( scrollWin, timeInterval );\r\n" + 
								"}\r\n" + 
								"function scrollWin()\r\n" + 
								"{\r\n" + 
								"    window.scrollBy( 0, 100 )\\r\\n" +
								"}");
						printWriterOut.close();
					}
					catch(IOException ie) { ie.printStackTrace(); }// */
			//scrollHappened = true;
			//}
			//System.out.println("tertiaryXslider: " + tertiaryXslider);
			//tertiaryXslider = tertiaryXslider + sliderInterval;
			try { Thread.sleep(879);//tertiaryThread.sleep(4879);//4879//10000
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			}// */
			Platform.runLater( () -> { try { Thread.sleep(2425);
			} catch (InterruptedException e) {
				System.out.println("Interrupted.");
			} } );// */
		}
		System.out.println("Main Program Loop Over");
		// Finalize the encoding, i.e. clear the buffers, write the header, etc.
		if ( videoFrameQuantity >= 6 )
		{
			try { encoder.finish(); }
			catch(IOException ie1) { ie1.printStackTrace(); }
			finally { NIOUtils.closeQuietly(tertiaryVideoOut); }
		}
		System.exit(0);
		return bImage;
	}
}

