tn0009.htm 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Creating and converting icons</TITLE>
  4. </HEAD>
  5. <BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#FF0000 VLINK=#000000>
  6. <font face="Arial, Lucida Sans, Helvetica">
  7. <a name="top"></a>
  8. <table align=center width=100% border=4 cellpadding=5 cellspacing=0>
  9. <tr>
  10. <td bgcolor="#660000" align=left colspan=2>
  11. <font size=+1 face="Arial, Lucida Sans, Helvetica" color="#FFFFFF">
  12. Creating and converting icons
  13. </font>
  14. </td>
  15. </tr>
  16. </table>
  17. <P>
  18. Icons are bitmaps that may contain transparency information. Under X, icons are
  19. usually created from XPM files, which may be loaded from a file or created from
  20. data embedded in a C++ source file.<P>
  21. Under Windows, icon files (extension .ico) may contain multiple icons for different sizes and colour
  22. depths, and can be loaded from a file or loaded from the Windows resources compiled
  23. into the executable.<P>
  24. You can decide to use only XPMs on Windows and Unix, or you could use XPMs on Unix and
  25. Windows icons under Windows -- the latter will require some #ifdefs in your code or use of the wxICON macro.<P>
  26. If you are using a compiler such as Borland C++, Visual C++ or Watcom C++, you
  27. can use the provided icon editor. However, if using Cygwin or Mingw32, there
  28. is no icon editor so you must obtain one separately, such as <a href="http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/info.html?fcode=00165P">IconEdit32</a>.<P>
  29. To convert from XPM to BMP (which can be loaded or pasted into an icon editor to save as an ICO file),
  30. you can use Vadim Zeitlin's <a href="ftp://biolpc22.york.ac.uk/pub/support/xpm2bmp.exe">xpm2bmp.exe</a> utility.
  31. To convert from BMP to XPM, you can use <a href="ftp://biolpc22.york.ac.uk/pub/support/bmp2xpm.exe">bmp2xpm.exe</a>
  32. which is actually the old wxWidgets 1.68 utility, xpmshow. You will have to edit the resulting
  33. file since the full path is used as the variable name, plus you may wish to specify a transparent colour e.g.:<P>
  34. <pre>
  35. " s None c None",
  36. </pre>
  37. This will indicate that the space character will be taken as the transparent colour throughout the image.<P>
  38. <!--
  39. Author: JS
  40. -->
  41. </font>
  42. </body>
  43. </html>