Disclaimer: Oh boy, I suck at HTML, CSS, JavaScript and frameworks, you've been warned.
I chose HTML/javascript for this tool to be able to share with the community, as it's the easiest platform
to get something to work on Windows, Mac, Linux, etc. Many will prefer command-line tools (and I agree), still it
can be useful to have a GUI for some features, such as the color drag'n drop. Still, it works, and several demos and games
used it, so I guess it's worth checking. Have fun! - Soundy -
Also check the Atari help page that is also valid for Amiga and is more up to date
Video Introduction
Quick Use
Exporting an image to bitplanes:
Drag'n drop your source image at the top of the page, in the "drag'n drop an image here" panel
Go to the Bitplane Export section at the bottom of the page
Click Save Bitplanes (and tick interleave before if you need interleaved bitplanes)
Exporting an image to multiple Bobs:
Drag'n drop your source image at the top of the page, in the "drag'n drop an image here" panel
Go to the Bob Export section at the bottom of the page
The name prefix box is pre-filled with your image's name. Change that name if you want another label for your Bobs. This label is used in the exported files as a prefix for each Bob's name, as follows: name prefix_Bob number.
The width and height boxes are pre-filled with your image's size (which would lead to a single Bob for your whole image). Enter the dimensions of your Bobs grid. If your Bobs are not organized in a grid and need individual sizes, you're out of the Quick Use scenario, but don't worry, we got you coverd with the Grab feature (see below).
In the count box, indicate how many Bobs of the given width and height you want to export. If this count exceeds the size of the image, it will be automatically clamped to the highest possible value.
Click the Preview button to see your list of Bobs (yes, within the green cells), fine tune your width, height and count values if needed.
The other options are easy to understand. Just click Save when you're happy.
Exporting an image to multiple Sprites:
Drag'n drop your source image at the top of the page, in the "drag'n drop an image here" panel
Go to the Sprite Export section at the bottom of the page
The name prefix box is pre-filled with your image's name. Change that name if you want another label for your Sprites. This label is used in the exported files as a prefix for each Sprite's name, as follows: name prefix_Sprite number.
The height box is pre-filled with your image's height (width is forced to 16 pix). Enter the height of your Sprites grid. If your Spritess are not organized in a grid and need individual sizes, you're out of the Quick Use scenario, but don't worry, we got you coverd with the Grab feature (see below).
In the count box, indicate how many Sprites of the given height you want to export. If this count exceeds the size of the image, it will be automatically clamped to the highest possible value.
Click the Preview button to see your list of Sprites (yes, within the green cells), fine tune your height and count values if needed.
The other options are easy to understand. Just click Save when you're happy.
...and you're done with the Quick Use section, have fun or stay tuned for further details...
Keyboard Shortcuts
0 : Exit grab mode
1 : Grab mode, 1px grid
2 : Grab mode, 2px grid
3 : Grab mode, 4px grid
4 : Grab mode, 8px grid
5 : Grab mode, 16px grid
6 : Grab mode, 32px grid
- : zoom out
+ : zoom in
s : jump to Sprite export section
b : jump to Bob export section
w : jump to Work Bench section
ESC : cancel current operation / close popup boxes
The Grab mode
In the Work Bench section, use the grab combo-box to select a grid alignment for selection.
Select a zone in the image using the mouse (mouse down - drag - mouse up).
A grab box should appear, proposing you the following options:
- Export Sprites will go to the Sprite Export section and fill the height and count info according to your selection. You can still change the height (remember sprites width is always 16), and the count will be updated automatically to fit your selection. Click Preview to see the result, and click Save when you're happy.
- Export Bobs will go to the Bob Export section and fill the width, height and count info according to your selection. You can still change the width & height, and the count will be updated automatically to fit your selection. Click Preview to see the result, and click Save when you're happy.
- Grab Frame Is a way to group together several images that don't necessarily have the same size.
You can press the escape key at anytime to exit the grab mode
Yes, you can use the grab mode to export your image as a single Bob and get the bitplanes for your image. It's the same format, obviously.
The "Original Image" Section
Drag'n drop your source image at the top of the page, in the "drag'n drop an image here" panel
The 'Target Platform' combo-box allows you to choose between Amiga OCS, Atari ST, Atari STE, and PSX
The 'HTML to Platform color conversion' combo-box allows you to choose how the image colors are converted to the Target Platform's palette. Here's the thing: HTML is using 8 bits per component (256 possibilities), while OCS and Atari STe have only 4 bits per component (Atari ST has 3 bits, etc.). There are 2 ways to perform the conversion:
- 'Clamp Color' will just cut the least significant bits, resulting in a slightly darker image.
- 'Nearest Color' will reach to the nearest color (brighter or darker) depending on the lower bits.
Below are the cropping params. By default, the full image is used, but you can work on a sub-section.
Below are the mask params. Use these only if you want to generate a mask for your image.
Below, you'll see the converted image (Cropped, using the Target Platform's colour space).
Everything you change in this section will reset the other sections (palette will be rebuilt from the pixels selected by the crop)
The "Work Bench" section
The left part of this section contains your palette:
- Drag'n drop color entries to change their index in the palettte.
- Click on a color to change its RGB values.
- Two buttons allow you to sort the palette by ascending or descending luminosity. Luminosity is calculated using the standard formula: 0.2126 * R + 0.7152 * G + 0.0722 * B
- A button allows you to load a previously saved palette (useful to make sure exports from different images share the same palette). Pixels will be assigned the nearest value in the new palette. If you import a .bin, the palette must have been exported without the color count (Include color count checkbox NOT ticked). If you choose .asm or clipboard, the palette must be a series of dc.w (same format as the palettes saved by this tool)
- The "lock color 0" checkbox makes sure no pixel is assigned palette index 0. This is useful for example when exporting sprites that have no transparent pixels. When checked, color 0 will NOT be exported when saving the palette (first color in the palette will be color1)
The right part of this section contains the image:
- Sliders allow you to play with zoom and color cycling (no consequence on the image, just for editor visualization)
- The show combo-box will draw lines to show you your current selection as sprites or bobs
- The grab combo-box is already described above in The Grab mode
The "Bitplane Export" section
Click "Save Bitplanes" to save the RAW bitplanes to a file
- The palette is not included.
- (OCS only) RAW bitplanes are saved one after another, except if you ticked the "Interleave bpl" checkbox. In that case, bitplanes will by saved for each line
- (OCS only) Untick one of the "bpl" checkboxes to disable export for the given bitplane
Click "Save RGB" to save a 12 bit per pixel image (stored using 16 bits per pixels, so the 4 top bits are empty)
Click "Save Indexes" to export each pix of the image as its 4bit index into the palette (works only for 16 colors or less images, 2indexes saved per byte)
The "Palette Export" section
The palette export options are pretty self-explanatory
export as.asm will write the palette as a list of DC.W values in a .asm file.
export as.bin will write the palette as a list of words in a .bin file. If include color count is ticked, the palette will be preceeded by a 16 bit color count.
export as.c will write the palette as an unsigned short C array in a .c file.
export ascopperlist $180 (OCS only) - will write the palette as a copperlist starting at $180 within a .asm file.
export ascopperlist $1a0 (OCS only) - will write the palette as a copperlist starting at $1a0 within a .asm file (useful for sprites).
The "Sprite Export" section (OCS only)
Most of it is explained above, see Quick Use. Here's some extra info:
The export as drop-down allows to choose between 'single .asm' (1 single .asm file is generated containing all Sprites), 'single .bin' (1 single .bin file containing all Sprites + 1 FAT file), 'single .c' (1 single .c file is generated containing all Sprites, stored as 1 unsigned short array per Sprite), or 'multiple .bin' (1 binary file is exported per sprite).
The save to drop-down allows to choose between 'clipboard' (string exported directly to the clipboard so that you can paste it in your code) or 'file'. Note that export to clipboard is not allowed for binary formats (works only for .c and .asm, not .bin).
The include palette checkbox will work only if you selected single .asm' export. In that case, you will find the palette in the exported .asm file.
The include header words will include the POS & CTRL words at the beginning of each sprite data. To compute these words, values will be taken from:
- screen X and screen Y, the Sprite's desired screen position. When several sprites are exported together, screen X and screen Y represent the coordinates of the top-left sprite (other sprites coords will be offsetted as in your source image).
- HSTART ofs and VSTART ofs are used to translate sprite coordinates to playfield coordinates (compulsory to compute control words). Default values (128,44) are pre-filled for the good old 320x256 OCS mode, but you can change them if needed.
The skip empty checkbox will avoid saving a Sprite with no data (sprites containing only zeroes will not be exported).
If your palette contains more than 4 colors (up to 16), attached sprites will be saved. The attached sprites will have the suffix '_attached' in their names
The "Bob Export" section (OCS Only)
Most of it is explained above, see Quick Use. Here's some extra info:
The export as drop-down allows to choose between 'single .asm' (1 single .asm file is generated containing all Bobs), or 'single .bin' (1 binary file containing all Bobs + 1 FAT file indicating the offset of each Bob in the binary file), 'single .c' (1 single .c file is generated containing all Bobs, stored as 1 unsigned char array per Bob ), or 'multiple .bin' (1 binary file is exported per Bob).
The save to drop-down allows to choose between 'clipboard' (string exported directly to the clipboard so that you can paste it in your code) or 'file'. Note that export to clipboard is not allowed for binary formats (works only for .c and .asm, not .bin).
The include palette checkbox will work only if you selected single .asm' export. In that case, you will find the palette in the exported .asm file.
The interlace bitplanes will do what you expect it to do: lines will be exported for every bitplane before going to the next line.
The skip empty checkbox will avoid saving a Bob with no data (Bobs containing only zeroes will not be exported).
Grabbed Frames (OCS Only)
When choosing Grab Frame, you see a list of Grabbed Frames appear below the image in the Work Bench. This is useful to group together several images that don't necessarily have the same size. This feature is still a bit limited, not sure people need it so I put less effort on it. Don't hesitate to ask for more (comment on pouet for example).
When you're done grabbing all your frames, you may export them as Sprites or Bobs.
- Export will be automatically performed as a single .asm file (no binary option yet), and palette and control words will be included in the .asm file.