WE Picture Decoder v1.95 --- README

http://dte-ng.issextreme.net http://www.issextreme.net/forums

WE PICTURE DECODER v1.95

1. DESCRIPTION
2. CHANGES
3. IMPORTANT NOTES
4. MENU DESCRIPTION
5. ACKNOWLEDGEMENTS

DESCRIPTION

This software allows the edition of different Renderware-based graphic formats. WEPictureDecoder supports the well-known TXD format found in e.g. Grand Thieft Auto series, as well as another special formats (.TXS,.FLG,.FNT, etc...) used in Winning Eleven/Pro Evolution Soccer games.
These files often contain multiple images, palettes, and even custom data sections.
With WEPictureDecoder you can manage those files, editing their images and/or palettes, with some advanced options designed to optimize the files.
Support is included for importing/exporting from/to BMP and PNG formats. Photoshop's ACT and Microsoft's PLT palette formats are also supported, as well as WEPictureDecoder's specific ALP alpha-data format.

This application is designed to work under Win32 platforms, and has been tested to work under all avalaible 32-bit Windows OSs.

CHANGES

From version 1.90 to version 1.95 | - Increased buffer to compression/decompression operations. Now saving some large image files (e.g.stadiums) won't fail as it happened in v1.90.
- Added support to WE9 and PES5 (PSX2, PC and XBOX) graphic files.
- Added interlacing mode selection.
- Added functions to import/export all images.
- Improved data section detection.

IMPORTANT NOTES

RENDERWARE SUPPORT

Some of the pictures contained in the graphic files may only have palette data or only pixel data.
If this is the case, when working with those pictures, it must taken into account that:

> - To display them, a default pixel data or a default grayscale palette will be used, respectively. You can use the palette functions to test any palette in such palette-less images.

> - Altough it may seem the picture images have been modified after using the input/output options, if you save the graphic file, obviously, that absent data won't be modified.

Take care about the fact that all images contained in a FLG file share the same color and alpha palettes. It also happens with images belonging to the other files types.
BMP SUPPORT
RLE encoded (packed) BMP files are NOT supported.

Please note, BMP specification does not allow alpha values on files other than 24bpp ones.
A hack has been made that allows reading the alpha information in BMPs saved with this app, but you'll lost that data when editing the image with other apps.
You can, however, use ALP (alpha palette) files to store/retrieve alpha channel for one image.
PNG SUPPORT

PNG specification only allows alpha values to be stored as part of the RGB pixel entries on 24bpp images.
As a consequence, as the game files are 8bpp and 4bpp the alpha values can only be saved on a tRNS entry (tag). If the software you use does not support those tags (unfortunately Photoshop doesn't), you'll loss that data.

FILE SIZE REDUCTION
Only those files that are originally compressed can be shorten using color reduction techniques.
Also, remember the color reduction also reduces the visual quality.

MENU DESCRIPTION

1. File
   Rooms the options that allow importing and exporting the games' graphic files.
   Please note, not all files inside the AFS files are graphic files.
   1. Open File...
      Imports a graphic file.
   2. Save file...
      Exports a graphic file.
   3. Configuration
      Allows configuring some parameters.
      ZLIB compression level and application's windows behaviour can be configured here.
   4. Exit
      I think it needs no explanation ;)
2. Input/Output
   The options of this menu provide a way of modifying pictures contained in the graphic files.
   1. Import BMP...
      Replace the selected image by the image contained in a BMP file.
      RLE encoded (packed) BMP files are NOT supported.
      The imported file must have the same bit-depth. If the dimensions are not the same than the currently selected image, it will be resized.
   2. Export BMP...
      Writes the currently selected image into a BMP file.
   3. Import PNG...
      Replace the selected image by the image contained in a PNG file.
      The imported file must have the same bit-depth and dimensions than the currently selected image.
   4. Export PNG...
      Writes the currently selected image into a PNG file.
   5. Import Palette...
      Imports the palette (including alpha levels) of the current picture from a .PLT file.
      Please note, if you are trying to import a palette into a picture with no palette, the new palette will be shown, but obviously won't be of use when saving the game image file.
   6. Export Palette...
      Exports the palette (including alpha levels) of the current picture to a .PLT file.
   7. Import Transparency...
      Updates the alpha levels of the current picture from those at a .ALP file.
   8. Export Transparency...
      Stores the alpha levels of the current picture into a .ALP file.
      Please note, if you are trying to import the alpha levels into a picture with no palette, the new alpha values will be shown, but obviously won't be of use when saving the game image file.
   9. Import ACT...
      Reads a .ACT palette file. This formatt is used by Adobe Photoshop.
      This format does NOT export alpha channel.
   10. Export ACT...
       Writes the palette info into a .ACT file. This formatt is used by Adobe Photoshop.
       This format does NOT export alpha channel.
   11. Import all images from folder
       Load BMP files (named consecutively as 0.bmp, 1.bmp, etc...) from a directory into currently loaded image.
   12. Export all images to folder
       Saves all images in the file as BMP files in selected directory.
   13. Create thumbnail
       Creates small pictures from the selected one.
3. Window
   Allows to show/hide some additional windows.
   1. View Palette
      Shows/Hides the palette of the current image.
      The color entries that are used by the image are marked with a squared point in their middle.
      There are 2 buttons:
      a) "TONE SCALE" which makes a color scale between all colors between two given colors.
      b) "REMOVE USE" which makes the selected palette color not being longer used by the picture.
      If you double-click over a palette entry, Window's default palette edition window will popup to change
      it.
      It also shows the actual number of palette entries the image uses.
   2. View Transparency
      Shows/Hides the alpha (transparency) values of the current image.
      The color entries that are used by the image are marked with a squared point in their middle.
      In the application, a transparency level of 0 means NO TRANSPARENCY at all.
      FLG files use a value of 255 to mark FULL TRANSPARENCY of a color, while the other files use 128 to represent their higher transparency level.
      There are 2 buttons:
      a) "INVERT" which inverts all alpha values.
      b) "SET OPAQUE" which sets all alha values to non-transparent.
   3. View Transparency Mask
      Shows/Hides the "Alpha Picture" window, where the picture is drawn taking into account the alpha values.
      Depending on the mode selected on the "Blending Mode" menu, the display will be differ.
   4. Zoom
      Allows displaying the image at different proportions.
4. Blending Mode
   Allows to select the blending mode to be used on the "Alpha Picture" window.
   1. Grey Levels
      Show the picture as a grayscale image where the gray value of a pixel depends on the alpha value of that pixel's color.
   2. Red (...) Yellow
      Makes a real blending with the pixel's color using the specified color.
5. Pencil size
   Allows selecting the size of the drawing pencil.
6. Betis ( A very special menu this one ;) )
   It rooms some options that will make life easier to patchers.
   The first two options work based on the fact most of game graphic files are compressed using the lossless huffman algorithm, which is more effective as more repeated the data is.
   As a consequence, and because the less palette entries are used the more equal the pixels are, reducing the color usage of an image means reducing the final size of the compressed image files.
   This can be very useful to adjust the file size so it's not necessary to rebuild the AFS files.
   Please note, not all game image files are compressed, so you won't be able to use these functions on all files.
   1. Decrement Color Usage
      Reduces, in 1 color, the color usage of the currently selected picture.
      Uses a custom color reducing technique that seems to work very well ;)
   2. Reduce File Size...
      Opens a window that allows reducing the final size of the game image file to a given lenght.
      Please note, this is an operation that can take long depending on the image file that is currently being edited, as it must be rebuilded each time to see its lenght.
      As an example, there are FNT files needing more than 1000 compressions for each color reduction step...
   3. Edit Data Sections...
      Allows importing and exporting the special data sections some files have.
      Not all game image files contain data sections. Most of them are believed to be 3D model information.
      The imported data can't be bigger than the original data section lenght.
      Data sections are ordered in the order they appear in the file, but they are NOT necessary related to the picture with the same id number (i.e. data section #0 is not necessarily data for picture #0).
   4. Edit image ID...
      Allows modifying the picture IDs in some files that use them.
      Sometimes the game uses those IDs to refer to a picture instead of using the picture ordinal position. Only a few file formats use them, but if they do you should check the IDs before replacing a file with another created from a different file
   5. Get low-resolution from hi-resolution image
      Only avalaible with some files (e.g. stadiums and kit parts), recalculates the lowres image taking the hires image as a source, using only the used colors of the palette to avoid any transparency artifacts.
7. Help
   Info about this software.

ACKNOWLEDGEMENTS

This software uses code from zlib v1.2.1 Copyright (c) 1995-2004 Jean-loup Gailly and Mark Adler
This software uses code from libpng v1.2.5 copyright (c) 1998-2002 by Glenn Randers-Pehrson
Encryption algorithm (de)coding by RCE, WarpXavier and KsChoice

The author would like to thank the following people: Alex, Antiz, Ataru-CrespoGol, Billy, Burgy, d4lton, El_Hacker, Eriol, Evilgab, Goku, Honome, Iori, JeffT, KOC2000, K0H, KsChoice, Mauras, Mephisto, MikeOM, RCE, Reefur, Rh4psody, ShinjiOno, Solidus J2k, TCrew, Txema7, Unreal & WarpXavier. And also to all the other people I've forgotten to mention (sorry if I've done so!)

------------ Tato

IMPORTANT: *** You must own an original copy of the game to use this tool *** *** Use of copies is only allowed to those who own the original ***