NEW: The video above is now outdated - there is a much easier way to convert an animated GIF using KickMyGraphics.exe and the GIFtoIMA.cmd script - see below!
Stamps, Animation and Tunes
About transparent backgrounds
# Type: 0x00=opaque, 0x80=transparent background
The stamp graphics files can be compressed using GZip or Encode_LZMA.cmd and can have any name or file extension (but the contents must be in jpg or bmp format).
Tip: Use Microsoft Paint to re-save them as .jpg or .bmp if they do not appear to work in E2B.
If type=0x80 (transparent) instead of 0x00 (opaque) is used, the bottom-left corner pixel will be used to determine the transparent colour rgb value - any pixel of this same colour value (anywhere in the stamp) will not be displayed.
Tip: If you want to make text stamps (perhaps with a large, fancy font syle?) and with a transparent background, use Microsoft Paint to make a 2-colour (black&white) .bmp file containing your text. This will create a non-dithered image with just two colours. When you are happy with your text, re-load and re-save it as a 24-colour bmp and then change the colour of the letters to whatever colour you want. This will leave a plain background which is suitable for using with transparency. Make sure the corner pixel (bottom-left) contains the rgb value that you want to be transparent. Any pixels colours of this same rgb value will then not be written to the display.
Use a different 'stamp' for each menu
If you use stamps of the same size and position, you can use a different stamp to 'brand' each submenu.
For instance, when we load the Antivirus submenu, we could display an antivirus logo stamp at the top-right of the menu but use a different stamp for the Main menu.
Make two new .mnu files as follows (0x00=opaque or 0x80=transparent):
splashimage --offset=0x00=680=10 /_ISO/MMStamp.bmp
splashimage --offset=0x00=680=10 /_ISO/AVStamp.bmp
We use a folder called $$$$CONFIG because it must be the first alphabetically-sorted folder or file to be enumerated by E2B. Note that if you had a file called \_ISO\MAINMENU\$$$$$special.ISO, then the $$$$CONFIG folder would not be the first file/folder and so the MMStamp.mnu file would not work! Instead of using a $$$$CONFIG folder, you could just use a \_ISO\MAINMENU\$$$$MMStamp.mnu file - as long as it is enumerated first by E2B.
You can define only one animation sequence using the ANIMATE variable in the MyE2B.cfg file.
The sequence will either play for 1-15 times during E2B start-up and before the E2B Main Menu is displayed, OR it can be continuously displayed on the background wallpaper when the menu is displayed.
An animated GIF file must be split into multiple 24-bit colour .bmp or .jpg files (frames). E2B will load each frame one after the other with a delay between each one.
The easiest way to create an animation is use Google to find an Animated GIF, then convert it using KickMyGraphics and then make it into an .IMA file using GIFtoIMA.cmd (see 'How to make animated frames for E2B' below).
See here for a blog 'How to' article.
Rules for animation files
- Extracted .BMP frames must be in 24/32-bit colour depth (not 256 colour).
- Extracted .JPG frames can be used but they do not support transparent backgrounds well.
- The dimensions of each .bmp/.jpg frame (Width x Height) must be identical - otherwise you get jitter and remnants on the screen.
- Animated GIFs which only store differences are in a special format and must be converted using KickMyGraphics.
- When you play animations using a transparent setting, the bottom-left corner pixel RGB colour value is used as the transparent colour.
- Maximum of 255 frames supported.
- If the last frame is the same as the first frame, reduce 'last' number by one so there is no 'pause' in the animation when it loops
- You can either loop it 1-15 times or play it continuously in the menu.
- The file frame name must be one or more characters and the file extension must end in nnn.eee where nnn is 01-99 or 001-255 and eee is any three letters (typically .bmp or .jpg) - e.g. fred01.bmp or a001.jpg (not 01.bmp or 001.bmp).
- Use the free app KickMyGraphics to convert a GIF into the correct format (loopback mode=off) then use GIFtoIMA.cmd to convert it to a .IMA file.
- When positioning the frame on the display, do not exceed the 800x600 or 1024x768 display area or screen corruption may be seen.
Tip: Try the DNA Animation .mnu file (in Alternate Downloads - Other Files area) for a 120-frame rotating transparent DNA model...
or maybe display a wavy flag on your menu.
The F2 key will stop/start the animation (as long as the F2 key has not been already defined as a menu hotkey).
Avoid positioning an 'infinite-play' animation inside the E2B Menu area or where text may be located (e.g. avoid the menu area, menu help text area under the menu or the 'footer' help text area under the menu).
You can specify a transparent background (the bottom-left pixel is regarded as the transparent pixel RGB value).
If the 'type' includes %infinite% then it will play the sequence continuously on the wallpaper when the menu is displayed.
If you specify the number of cycles (1-15), then the background wallpaper will be displayed and the animation will play the specified number of cycles during E2B start-up and before the E2B menu is displayed.
Grub4dos only supports one animated sequence on the display at any one time.
Display animation n times before menu is displayed
Infinite animation on the menu (.IMA file)
It is better for performance reasons, to use uncompressed .bmp files or .jpg files for the frames but you can compress the final .ima file using Encode_LZMA.cmd.
Really fast animation (E2B v1.99+)Instead of specifying a delay in tick units (1 tick=55ms), you can specify a delay in units of milliseconds using a syntax of xxx:ms, e.g.set ANIMATE=0x90=10:ms=9=650=40 (fd3)/frame_0001.bmpUse .bmp (not .jpg) for fast-playing or large-frame animations to avoid delays.
How to make animated frames for E2B using GIFtoIMA.cmd
First install IrfanView and ImDisk (ImDisk is also in MPI Tool Kit) onto your Windows system, then...
GIFs which only store differences or which contain frames of different sizes are not suitable unless converted first using KickMyGraphics. I suggest you always save the .GIF file using KickMyGraphics.
To trim (delete) selected frames use Trim selected frames.
- Convert your GIF first, using KickMyGraphics.
- Drag-and-drop the converted GIF file onto the GIFtoIMA.cmd file (must be the one on your E2B drive, not in the download).
- GIFtoIMA.cmd will output an .IMA file and a .txt file containing example code lines and optionally update your E2B drive's MyE2B.cfg file for you.
- GIFtoIMA.cmd will extract the .bmp files from a GIF and then make a IMA file (it uses IrfanView and ImDisk which must be pre-installed).
- GIFtoIMA.cmd allows you to change the size of the frames (and maintain aspect ratio).
- GIFtoIMA.cmd can convert to JPGs for smaller size but the transparent background option will not work well with JPG files. Only use .jpg format if transparency is not required - use .bmp if background transparency for the GIF is required.
- GIFtoIMA.cmd allows you to specify a transparent background or opaque background if you choose .bmp format.
- You can check a GIF using the View Slideshow option and the < > cursor keys.
Tip: Drive Z: must be unused in Explorer. If one of the partitions on your USB drive has a drive letter of Z: already and Windows Disk management does not allow you to change it, you can change the drive letter using "\_ISO\docs\Make_E2B_USB_Drive\ChangeDriveLetter\ChangeLetter.cmd".
Note: if you don't specify a large enough size for the .IMA virtual floppy drive (Z:), you will get an error, press CTRL+C to abort and try again with a larger size. The size entered should be in KB and 2% is automatically added to the suggested size (E2B v1.96+).
Optional: Once the .IMA file is made, you can then compress the IMA file using LZMA_Encode if it is in .bmp format, if you wish. Drag-and-drop the IMA file onto the \_ISO\docs\E2B Utilities\LZMA\LZMA_Encode.cmd file. This will compress the file for faster loading, but it will not change the .IMA file extension. There is no advantage in compression if using jpg frames because .jpg files are already compressed.
GIFtoIMA will offer to modify your \_ISO\MyE2B.cfg file and copy across the .IMA file if you run it from your E2B drive.
GIFtoIMA also saves a .txt file which contains an example of the required code lines (\_ISO\MyE2B.cfg must always start with !BAT on first line), e.g.
# 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/horsedrawingKMG_frame_0001.bmp
You will probably need to change the numbers in bold - type (0x10=opaque or 0x90=transparent), delay (1-99) and position (x=575, y=225) parameters. For more details see blog post here.
The delay between frames is specified in 1/18 second units (ticks), E2B v1.99+ allows you to specify the delay in milliseconds using the syntax nnn:ms (e.g. 15:ms), however some systems may play the animation slower, depending on the CPU and graphics speed.
Add a Powerpoint Help slideshow
Multiple animations sequences
Play animation 3 times with a different background, before displaying the menu
Manual method (or doing it the hard way!)
Example (using multiple .bmp files)
The example below displays 9 individual frames - 530791_frame_0001.bmp to 530791_frame_0009.bmp - the last frame is 09 so last=9.
However, usually you would use a .IMA file (floppy image) which would contain all the frame files (see below).
Bitmap files can be compressed using GZip or LZMA. If there are more than 99 frames, the file name should end in 001.bmp or 001.jpg (max=255). The filename specified in the command line for 'FILE' should always be the first frame (e.g. abc01.bmp or abc001.bmp).
Note: All individual frames must be the same x,y dimensions or the image will jitter and may leave remnants on the screen during animation.
Also, they each frame must contain a complete image (you can check by viewing the extracted .bmp files). Some GIFS use a 'differences only' encoding format - KickMyGraphics will convert an animated GIF into the correct format.
A sample of some animation code for the MyE2B.cfg file is shown below:
Tip: If you want to make animated text, use Microsoft Paint to make a 2-colour (black&white) .bmp file. This will create a non-dithered image with just two colours. Then re-load and re-save it as a 24-colour bmp and change the colour of the letters to whatever colour you want. This will leave a plain background which is suitable for using with transparency.
Tip: You can use Google to find animated GIFs. Use Images - Tools - Size - Icon to find suitable ones
IMPORTANT: Many animated GIFs do not extract to the same size .bmp frames. After you extract the .bmp files, check that all frames are exactly the same dimensions or else the animation will jitter, leave remnants on the screen and won't work properly.
If you are going to make a .ima floppy disk image file (recommended - see below), then do not compress the .bmp files.
WinImage (max 2.88MB)
ImDisk (for images larger than 2.88MB)
- Use the free app KickMyGraphics to save a GIF in the correc format.
Write text strings to the menu
You can write text strings to the menu by adding lines to MyE2B.cfg, e.g.
# Write text to the menu (grub4dos 0.4.6a only) - --string=x=y=colour="text"
Here is a table using closest whole integers for Frequency (262Hz = C4 = Middle C):
Example 1: Simple tune examples
Example 2: Simple tune repeated 3 times
Example 3: Longer tune played in menu
Example 4: Very long tune (>126 notes)
This code must be used within a batch file because of the use of labels (:FINBP).
e.g. in your \_ISO\MyE2B.cfg, add
Tip: Use 'goto :EOF' (goto End Of File) instead of 'goto :FINBP' to exit from the whole batch file. The label :EOF does not need to be specified in the batch file.
If you want a certain tune to play when the user selects a certain menu - e.g. Memory Test menu
Create a file \_ISO\UTILITIES_MEMTEST\$$$$Tune.mnu containing the text:
Note that filename must begin with $$$$ so that it is added to the beginning of E2B menu.
Virtual Machines and tunes
Virtual Box and QEMU do not support a PC Speaker function, but VMware does, so you can test tunes out when booting from an E2B USB drive using VMWare.
Recommended for Easy2Boot (fastest!) - SanDisk Extreme SDCZ880-128G-G46