Plan C - Add the C51, Little, and Jack Images

Return to Plan C - Getting the Correct image from the Specified Kind

Plan C - Add the C51, Little, and Jack Images

Add the C51

Create the following file for the C51 train:

c51.rs
/* c51.rs */

pub const C51: &str = r"
'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|==[]=-     ||      ||      |  ||=======_|__'
'/~\____|___|/~\_|   O=======O=======O  |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|===[]=-    ||      ||      |  ||=======_|__'
'/~\____|___|/~\_|    O=======O=======O |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|===[]=- O=======O=======O  |  ||=======_|__'
'/~\____|___|/~\_|      ||      ||      |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|==[]=- O=======O=======O   |  ||=======_|__'
'/~\____|___|/~\_|      ||      ||      |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|=[]=- O=======O=======O    |  ||=======_|__'
'/~\____|___|/~\_|      ||      ||      |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|=[]=-      ||      ||      |  ||=======_|__'
'/~\____|___|/~\_|  O=======O=======O   |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '
"; // end of C51

Now fix the temporary setup we have in the C51 arm in the match statement in "parse_opts()":

parsing.rs
...
 // Set "kind".
    let (kind, image_string) = match (&switches.kind.to_uppercase()).as_str() {
        "D" | "D51" => (String::from("D51"), D51.to_string()),
        "C" | "C51" => (String::from("C51"), DC51.to_string()),
        "L" | "LITTLE" => (String::from("LITTLE"), D51.to_string()),
...

In order for the "parse_opts" function to find the "C51" constant, we'll need to specify the path as we did for the "D51" constant:

parsing.rs
/* parsing.rs */

use crate::c51::C51;
use crate::d51::D51;
...

And in order for the crate to find the C51 module, we have to tell the crate about the C51 module:

main.rs
/* main.rs */

mod c51;
mod d51;
mod parsing;
...

Now when you run the program, specifying the "C51" train, you'll see the six frames of the C51 train displayed instead of the D51 frames.

Add the Little Train

We can add the Little train just as easily. First, create the Little train constant:

little.rs
/* little.rs */

pub const LITTLE: &str = r"
'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--O========O~\-+  |__________________| |__________________| '
'//// \_/      \_/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ ' 
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/O========O\-+  |__________________| |__________________| '
'//// \_/      \_/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~O========O-+  |__________________| |__________________| '
'//// \_/      \_/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~\------/~\-+  |__________________| |__________________| '
'//// \_O========O       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~\------/~\-+  |__________________| |__________________| '
'//// \O========O/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~\------/~\-+  |__________________| |__________________| '
'//// O========O_/       (O)       (O)        (O)        (O)    '
"; // end of LITTLE

Then fix the temporary setup we have in the LITTLE arm in the match statement in "parse_opts()", making sure to provide a path method so the program can find the constant:

parsing.rs
/* parsing.rs */

use crate::c51::C51;
use crate::d51::D51;
use crate::little::LITTLE;

...

 // Set "kind".
    let (kind, image_string) = match (&switches.kind.to_uppercase()).as_str() {
        "D" | "D51" => (String::from("D51"), D51.to_string()),
        "C" | "C51" => (String::from("C51"), C51.to_string()),
        "L" | "LITTLE" => (String::from("LITTLE"), D51LITTLE.to_string()),
...

And add the LITTLE module to the crate:

main.rs
/* main.rs */

mod c51;
mod d51;
mod little;
mod parsing;
...

Give that a try with cargo run -- --kind=little, and you should see the little train displayed.

Before We Add Jumping Jack

Before we add Jack, there are a couple of things that might be worth considering.

First, notice that in "parse_opts()", we're using two different methods to convert a &str to a String. Nothing wrong with that, if that's what we want to do. But it'd be more consistent to pick one method and use that. Any of the following methods would work:

parsing.rs
...
        "D" | "D51" => ("D51".to_string(), D51.to_string()),
        "C" | "C51" => (String::from("C51"), String::from(C51)),
        "L" | "LITTLE" => ("LITTLE".to_owned(), LITTLE.to_owned()),
...

I'll leave the three lines above mixed, just as a reminder that you can often accomplish a task in more than one way.

Another thing is that as we add images, we have to add modules and we have to add use/path statements. This does make the program more modular, but the only modularity that it really adds is that the separate images are all in separate files. Looking at the "sl.h" file in the C-version of "sl", we see that it contains many of the image files in one file. If we were to do that, we could simplify our code a bit (not a lot, but some). Just to try it on for size, and to see if it fits, let's give it a shot.

Combine all the image files into one, and name that file "images.rs". We'll add the images for Jumping Jack while we're at it.

images.rs
/* images.rs  */

pub const D51: &str = r"
'      ====        ________                ___________'
'  _D _|  |_______/        \__I_I_____===__|_________|'
'   |(_)---  |   H\________/ |   |        =|___ ___|  '
'   /     |  |   H  |  |     |   |         ||_| |_||  '
'  |      |  |   H  |__--------------------| [___] |  '
'  | ________|___H__/__|_____/[][]~\_______|       |  '
'  |/ |   |-----------I_____I [][] []  D   |=======|__'
'__/ =| o |=-~~\  /~~\  /~~\  /~~\ ____Y___________|__'
' |/-=|___|=    ||    ||    ||    |_____/~\___/       '
'  \_/      \O=====O=====O=====O_/      \_/           '

'      ====        ________                ___________'
'  _D _|  |_______/        \__I_I_____===__|_________|'
'   |(_)---  |   H\________/ |   |        =|___ ___|  '
'   /     |  |   H  |  |     |   |         ||_| |_||  '
'  |      |  |   H  |__--------------------| [___] |  '
'  | ________|___H__/__|_____/[][]~\_______|       |  '
'  |/ |   |-----------I_____I [][] []  D   |=======|__'
'__/ =| o |=-~~\  /~~\  /~~\  /~~\ ____Y___________|__'
' |/-=|___|=O=====O=====O=====O   |_____/~\___/       '
'  \_/      \__/  \__/  \__/  \__/      \_/           ' 

'      ====        ________                ___________'
'  _D _|  |_______/        \__I_I_____===__|_________|'
'   |(_)---  |   H\________/ |   |        =|___ ___|  '
'   /     |  |   H  |  |     |   |         ||_| |_||  '
'  |      |  |   H  |__--------------------| [___] |  '
'  | ________|___H__/__|_____/[][]~\_______|       |  '
'  |/ |   |-----------I_____I [][] []  D   |=======|__'
'__/ =| o |=-O=====O=====O=====O \ ____Y___________|__'
' |/-=|___|=    ||    ||    ||    |_____/~\___/       '
'  \_/      \__/  \__/  \__/  \__/      \_/           ' 

'      ====        ________                ___________'
'  _D _|  |_______/        \__I_I_____===__|_________|'
'   |(_)---  |   H\________/ |   |        =|___ ___|  '
'   /     |  |   H  |  |     |   |         ||_| |_||  '
'  |      |  |   H  |__--------------------| [___] |  '
'  | ________|___H__/__|_____/[][]~\_______|       |  '
'  |/ |   |-----------I_____I [][] []  D   |=======|__'
'__/ =| o |=-~O=====O=====O=====O\ ____Y___________|__'
' |/-=|___|=    ||    ||    ||    |_____/~\___/       '
'  \_/      \__/  \__/  \__/  \__/      \_/           ' 

'      ====        ________                ___________'
'  _D _|  |_______/        \__I_I_____===__|_________|'
'   |(_)---  |   H\________/ |   |        =|___ ___|  '
'   /     |  |   H  |  |     |   |         ||_| |_||  '
'  |      |  |   H  |__--------------------| [___] |  '
'  | ________|___H__/__|_____/[][]~\_______|       |  '
'  |/ |   |-----------I_____I [][] []  D   |=======|__'
'__/ =| o |=-~~\  /~~\  /~~\  /~~\ ____Y___________|__'
' |/-=|___|=   O=====O=====O=====O|_____/~\___/       '
'  \_/      \__/  \__/  \__/  \__/      \_/           ' 

'      ====        ________                ___________'
'  _D _|  |_______/        \__I_I_____===__|_________|'
'   |(_)---  |   H\________/ |   |        =|___ ___|  '
'   /     |  |   H  |  |     |   |         ||_| |_||  '
'  |      |  |   H  |__--------------------| [___] |  '
'  | ________|___H__/__|_____/[][]~\_______|       |  '
'  |/ |   |-----------I_____I [][] []  D   |=======|__'
'__/ =| o |=-~~\  /~~\  /~~\  /~~\ ____Y___________|__'
' |/-=|___|=    ||    ||    ||    |_____/~\___/       '
'  \_/      \_O=====O=====O=====O/      \_/           '
"; // end of D51

pub const C51: &str = r"
'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|==[]=-     ||      ||      |  ||=======_|__'
'/~\____|___|/~\_|   O=======O=======O  |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|===[]=-    ||      ||      |  ||=======_|__'
'/~\____|___|/~\_|    O=======O=======O |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|===[]=- O=======O=======O  |  ||=======_|__'
'/~\____|___|/~\_|      ||      ||      |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|==[]=- O=======O=======O   |  ||=======_|__'
'/~\____|___|/~\_|      ||      ||      |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|=[]=- O=======O=======O    |  ||=======_|__'
'/~\____|___|/~\_|      ||      ||      |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '

'        ___                                            '
'       _|_|_  _     __       __             ___________'
'    D__/   \_(_)___|  |__H__|  |_____I_Ii_()|_________|'
'     | `---'   |:: `--'  H  `--'         |  |___ ___|  '
'    +|~~~~~~~~++::~~~~~~~H~~+=====+~~~~~~|~~||_| |_||  '
'    ||        | ::       H  +=====+      |  |::  ...|  '
'|    | _______|_::-----------------[][]-----|       |  '
'| /~~ ||   |-----/~~~~\  /[I_____I][][] --|||_______|__'
'------'|oOo|=[]=-      ||      ||      |  ||=======_|__'
'/~\____|___|/~\_|  O=======O=======O   |__|+-/~\_|     '
'\_/         \_/  \____/  \____/  \____/      \_/       '
"; // end of C51

pub const LITTLE: &str = r"
'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--O========O~\-+  |__________________| |__________________| '
'//// \_/      \_/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ ' 
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/O========O\-+  |__________________| |__________________| '
'//// \_/      \_/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~O========O-+  |__________________| |__________________| '
'//// \_/      \_/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~\------/~\-+  |__________________| |__________________| '
'//// \_O========O       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~\------/~\-+  |__________________| |__________________| '
'//// \O========O/       (O)       (O)        (O)        (O)    '

'     ++      +------ ____                 ____________________ '
'     ||      |+-+ |  |   \@@@@@@@@@@@     |  ___ ___ ___ ___ | '
'   /---------|| | |  |    \@@@@@@@@@@@@@_ |  |_| |_| |_| |_| | '
'  + ========  +-+ |  |                  | |__________________| '
' _|--/~\------/~\-+  |__________________| |__________________| '
'//// O========O_/       (O)       (O)        (O)        (O)    '
"; // end of LITTLE

pub const JACK: &str = r"
' \ 0 /   '
'  \|/    '
'   |     '
'  / \    '
'_/   \_  '

'         '
' __0__   '
'/  |  \  '
'  / \    '
' _\ /_   '

'         '
'   o     '
' /\ /\   '
' |/ \|   '
' _\ /_   '
"; // end of JACK

Let's also add some instructions for the ASCII-artist:

images.rs
/* images.rs */

  This project is a conversion of the "sl" application as found in Debian "Bullseye",
  from the C programming language to Rust. The copyright blurb of the original is below:

 *========================================
 *    sl.h: SL version 5.02
 *      Copyright 1993,2002,2014
 *                Toyoda Masashi
 *                (mtoyoda@acm.org)
 *      Last Modified: 2014/06/03
 *========================================

  This conversion is based on a tutorial for this project, written by Kent West, 2023.
  
  To add an art image, just follow the pattern of the images below, making sure to give
  a unique name as the constant value, and making sure to put a blank line between each
  animation frame, and making sure to enclose each side of each line of each frame in
  single-quotes (which will be converted by the program into spaces). Then add an entry
  for your constant in both the documentation string of the "What kind of object" arg
  in the "struct Args" section of the "get_options.rs" file, and in the "Set 'kind'."
  section of the "parse_opts()" function in that same file.
 */

pub const D51: &str = r"
...

Now, in "main.rs", we no longer need to add each module for each image; we can just add one "images" module for all the images:

main.rs
/* main.rs */

mod c51;
mod d51;
mod images;
mod little;
mod parsing;

use d51::*;
use parsing::*;
...

And then in "parsing.rs":

parsing.rs
/* parsing.rs */

use crate::c51::C51;
use crate::d51::D51;
use crate::little::LITTLE;
use crate::images::*;           // or optionally, "use crate::images::{C51,D51,LITTLE,JACK};", but this will add require edits if we add additional images in the future.

Now that we've put all the images in one file, we no longer need the files, "d51.rs", "c51.rs", and "little.rs", and those files can be deleted.

The program should still work, except for Jumping Jack. but we can add him very easily.

Add Jumping Jack

parsing.rs
...
    // Set "kind".
    let (kind, image_string) = match (&switches.kind.to_uppercase()).as_str() {
        "D" | "D51" => ("D51".to_string(), D51.to_string()),
        "C" | "C51" => (String::from("C51"), String::from(C51)),
        "L" | "LITTLE" => ("LITTLE".to_owned(), LITTLE.to_owned()),
        "J" | "JACK" => (String::from("JACK"), JACK.to_string()),
        "J" | "JACK" => (String::from("JACK"), D51JACK.to_string()),
...

And that's it. Give it a try (cargo run -- --kind=jack).

Now, we're ready to Clean Up the Image in preparation to animate it across the screen.