Thursday, 4 January 2018

How to add an animated GIF to your E2B menu

Here is an example of how to add the 'TeaTime' optical illusion animated GIF to E2B.

It takes about 2 minutes!


Adding animation is really quite easy now...

Preparation

1. Download your animated GIF (e.g. right-click on the GIF above and choose 'Save as...'). Save the file to your Desktop. I used TeaTime.gif from this article on 22 optical illusions.
2. Download KickMyGraphics.exe onto the Desktop (or anywhere convenient)
3. Download and install IrfanView and ImDisk (ImDisk is also in MPI Tool Kit)

Conversion

1. Run KickMyGraphics
2. Click on Add Graphics button and load the GIF file
3. Untick the 'loopback mode' tick-box
4. Click on 'Make Animated GIF' button and save the new file to the Desktop as a different name (e.g. TeaTime1.GIF)
5. Drag-and-drop TeaTime1.GIF onto the \_ISO\docs\E2B Utilities\GIFtoIMA\GIFtoIMA.cmd file.

If you want to have a transparent background (only suitable if the background is all the same colour), you should choose to use .bmp instead of a .jpg (4th question)...

Answer the questions (my answers in red):

        View and Resize
=================================
V = View slideshow in IrfanView
W = Width resize  (X)
H = Height resize (Y)
N = No change

Change Width, Height or View files (V/W/H/N) : W
Width in pixels : 250


Y = JPG = Smaller size (transparent background not supported)
N = BMP = Transparent background supported

Convert to .JPG? (Y/[N]) : y


Note: If too small, press CTRL+C to abort and then increase the size by 2%

.IMA SIZE: ADD APPROX. 2% TO TOTAL SIZE (Total Files=1336KB, .IMA Size=1362KB)

Size required for .IMA file (KB) [1362] :  (press ENTER for default size)


MAKE A NOTE OF THE FIRST FILENAME AND NUMBER OF FILES

E2B will require:

===================================================

    set ANIMFD3=/_ISO/teatime1.ima
    set ANIMATE=0x10=3=50=575=225 (fd3)/E2B/teatime1_frame_0001.JPG

===================================================

    LAST FILE NUMBER IS 50

Dismounting Z:...

C:\Users\Steve\Desktop\teatime1.ima created OK.

C:\Users\Steve\Desktop\teatime1.txt contains these lines for use in \_ISO\MyE2B.cfg file...

===================================================
set ANIMFD3=/_ISO/teatime1.ima
set last=50
# 1st param - use 0x90 for looping+transparent background, use 0x10 for opaque background
# 2nd param is delay (1\18th second), 3rd is last frame number, 4th is x pos, 5th is y pos (in pixels), 6th is path to first frame
set ANIMATE=0x10=3=%last%=575=225 (fd3)/E2B/teatime1_frame_0001.JPG
===================================================


Add lines to end of J:\_ISO\MyE2B.cfg and copy C:\Users\Steve\Desktop\teatime1.ima to J:\_ISO folder? (Y/[N]) : y


250 pixels is a good width to choose so that the animation can be positioned to the right of the menu.

Adjust the position on the display

Now boot to E2B (you can use the \QEMU_MENU_TEST (run as admin).cmd batch file) to see the result.

The \_ISO\MyE2B.cfg file will contain the code lines for the IMA file.
The \_ISO folder should contain the teatime1.ima file.

Edit the \_ISO\MyE2B.cfg file to adjust the x-coordinate (575) and the y-coordinate(225) to change the position of the animation.

Change the menu width too, if required, e.g.
set menuw=60

Once the animation is running, you can press F2 to remove the it and again to start it.

Animation with RandomJokes
Have fun!

No comments:

Post a Comment