| java.lang.Object org.eclipse.pde.internal.swt.tools.IconExe
IconExe | public class IconExe (Code) | | Customize the icon of a Windows exe
WARNING! This class is not part of SWT API. It is NOT API. It is an internal
tool that may be changed or removed at anytime.
Based on MSDN "An In-Depth Look into the Win32 Portable Executable File Format"
|
Inner Class :public static class IconResInfo | |
Inner Class :public static class IMAGE_DOS_HEADER | |
Inner Class :public static class IMAGE_FILE_HEADER | |
Inner Class :public static class IMAGE_DATA_DIRECTORY | |
Inner Class :public static class IMAGE_OPTIONAL_HEADER | |
Inner Class :public static class IMAGE_NT_HEADERS | |
Inner Class :public static class IMAGE_SECTION_HEADER | |
Inner Class :public static class IMAGE_RESOURCE_DIRECTORY | |
Inner Class :public static class IMAGE_RESOURCE_DIRECTORY_ENTRY | |
Inner Class :public static class IMAGE_RESOURCE_DATA_ENTRY | |
Inner Class :public static class NEWHEADER | |
Inner Class :public static class ICONRESDIR | |
Inner Class :public static class CURSORDIR | |
Inner Class :public static class RESDIR | |
Inner Class :public static class BITMAPINFOHEADER | |
Inner Class :static class RGBQUAD | |
Inner Class :static class BITMAPINFO | |
Inner Class :static class RGB | |
Inner Class :static class PaletteData | |
Inner Class :static class ImageLoader | |
Inner Class :static class ImageData | |
Inner Class :static class LEDataInputStream extends InputStream | |
Inner Class :abstract public static class FileFormat | |
Inner Class :static class WinBMPFileFormat extends FileFormat | |
Inner Class :static class WinICOFileFormat extends FileFormat | |
Inner Class :static class SWT | |
Method Summary | |
static byte[] | bitInvertData(byte[] data, int startIndex, int endIndex) | final static byte[] | convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) | static void | copyFile(String src, String dst) | void | dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root) | static void | flipScanLines(byte[] data, int stride, int height) | IconResInfo[] | getIcons(RandomAccessFile raf) | static byte[] | loadData(BITMAPINFOHEADER bih, RandomAccessFile raf) | static byte[] | loadData(BITMAPINFOHEADER bih, RandomAccessFile raf, int stride) | static ImageData[] | loadIcons(String program) Retrieve the Desktop icons provided in the Windows executable program.
These icons are typically shown in various places of the Windows desktop.
Note. | static PaletteData | loadPalette(BITMAPINFOHEADER bih, RandomAccessFile raf) | public static void | main(String[] args) Replace the Desktop icons provided in the Windows executable program
with matching icons provided by the user.
Takes 2 arguments
argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
argument 1: The .ico file to write to the given executable e.g. | static PaletteData | paletteFromBytes(byte[] bytes, int numColors) | static byte[] | paletteToBytes(PaletteData pal) | static ImageData | parseIcon(RandomAccessFile raf, int offset, int size) | static void | read(RandomAccessFile raf, BITMAPINFOHEADER bih) | static void | read(RandomAccessFile raf, BITMAPINFO bi) | static void | read(RandomAccessFile raf, IMAGE_DOS_HEADER idh) | static void | read(RandomAccessFile raf, IMAGE_FILE_HEADER ifh) | static void | read(RandomAccessFile raf, IMAGE_DATA_DIRECTORY idd) | static void | read(RandomAccessFile raf, IMAGE_OPTIONAL_HEADER ioh) | static void | read(RandomAccessFile raf, IMAGE_NT_HEADERS inh) | static void | read(RandomAccessFile raf, IMAGE_SECTION_HEADER ish) | static void | read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY ird) | static void | read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY_ENTRY irde) | static void | read(RandomAccessFile raf, IMAGE_RESOURCE_DATA_ENTRY irde) | static void | read(RandomAccessFile raf, NEWHEADER nh) | static void | read(RandomAccessFile raf, ICONRESDIR i) | static void | read(RandomAccessFile raf, CURSORDIR c) | static void | read(RandomAccessFile raf, RESDIR rs) | static int | read4(RandomAccessFile raf) | static boolean | readIconGroup(RandomAccessFile raf, int offset, int size) | static int | readU2(RandomAccessFile raf) | static void | unloadIcon(RandomAccessFile raf, ImageData icon) | static int | unloadIcons(String program, ImageData[] icons) Replace the Desktop icons provided in the Windows executable program
with icons provided by the user.
Note 1. | static void | unloadMaskData(RandomAccessFile raf, ImageData icon) | static void | unloadShapeData(RandomAccessFile raf, ImageData icon) | static void | write4(RandomAccessFile raf, int value) | static void | writeU2(RandomAccessFile raf, int value) |
BMPHeaderFixedSize | final static int BMPHeaderFixedSize(Code) | | |
DEBUG | final static boolean DEBUG(Code) | | |
IMAGE_DIRECTORY_ENTRY_RESOURCE | final static int IMAGE_DIRECTORY_ENTRY_RESOURCE(Code) | | |
IMAGE_DOS_SIGNATURE | final static int IMAGE_DOS_SIGNATURE(Code) | | |
IMAGE_NT_SIGNATURE | final static int IMAGE_NT_SIGNATURE(Code) | | |
RES_ICON | final static int RES_ICON(Code) | | |
RT_GROUP_ICON | final static int RT_GROUP_ICON(Code) | | |
RT_ICON | final static int RT_ICON(Code) | | |
iconInfo | IconResInfo[] iconInfo(Code) | | |
bitInvertData | static byte[] bitInvertData(byte[] data, int startIndex, int endIndex)(Code) | | |
convertPad | final static byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad)(Code) | | |
dumpResourceDirectory | void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root) throws IOException(Code) | | |
flipScanLines | static void flipScanLines(byte[] data, int stride, int height)(Code) | | |
loadIcons | static ImageData[] loadIcons(String program) throws FileNotFoundException, IOException(Code) | | Retrieve the Desktop icons provided in the Windows executable program.
These icons are typically shown in various places of the Windows desktop.
Note. The Eclipse 3.1 launcher returns the following 6 images
1. 32x32, 4 bit (Windows 16 colors palette)
2. 16x16, 4 bit (Windows 16 colors palette)
3. 16x16, 8 bit (256 colors)
4. 32x32, 8 bit (256 colors)
5. 48x48, 4 bit (Windows 16 colors palette)
6. 48x48, 8 bit (256 colors)
Parameters: program - the Windows executable e.g c:/eclipse/eclipse.exe |
main | public static void main(String[] args) throws Exception(Code) | | Replace the Desktop icons provided in the Windows executable program
with matching icons provided by the user.
Takes 2 arguments
argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
Note 1. Write access to the executable program is required. As a result, that
program must not be currently running or edited elsewhere.
Note 2. The Eclipse 3.1 launcher requires a .ico file with the following 6 images
1. 32x32, 4 bit (Windows 16 colors palette)
2. 16x16, 4 bit (Windows 16 colors palette)
3. 16x16, 8 bit (256 colors)
4. 32x32, 8 bit (256 colors)
5. 48x48, 4 bit (Windows 16 colors palette)
6. 48x48, 8 bit (256 colors)
A user icon matching exactly the width/height/depth of an executable icon will be written
to the executable and will replace that executable icon. If an executable icon
does not match a user icon, it is silently left as is.
Note 3. This function modifies the content of the executable program and may cause
its corruption.
|
paletteFromBytes | static PaletteData paletteFromBytes(byte[] bytes, int numColors)(Code) | | |
paletteToBytes | static byte[] paletteToBytes(PaletteData pal)(Code) | | |
unloadIcons | static int unloadIcons(String program, ImageData[] icons) throws FileNotFoundException, IOException(Code) | | Replace the Desktop icons provided in the Windows executable program
with icons provided by the user.
Note 1. Write access to the executable program is required. As a result, that
program must not be currently running or edited elsewhere.
Note 2. Use loadIcons to determine which set of icons (width, height, depth)
is required to replace the icons in the executable program. A user icon
matching exactly the width/height/depth of an executable icon will be written
to the executable and will replace that executable icon. If an executable icon
does not match a user icon, it is left as is. Verify the return value matches
the number of icons to write. Finally, use loadIcons after this operation
to verify the icons have changed as expected.
Note 3. The Eclipse 3.1 launcher requires the following 6 images (in any order).
1. 32x32, 4 bit (Windows 16 colors palette)
2. 16x16, 4 bit (Windows 16 colors palette)
3. 16x16, 8 bit (256 colors)
4. 32x32, 8 bit (256 colors)
5. 48x48, 4 bit (Windows 16 colors palette)
6. 48x48, 8 bit (256 colors)
Note 4. This function modifies the content of the executable program and may cause
its corruption.
Parameters: program - the Windows executable e.g c:/eclipse/eclipse.exe Parameters: icons - to write to the given executable the number of icons from the original program that were not successfully replaced (0 if success) |
|
|