home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / misc / 37112 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  3.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.misc
  4. Subject: Re: Icon formats, etc.
  5. Keywords: Icon
  6. Message-ID: <1992Nov19.211656.24310@njitgw.njit.edu>
  7. Date: 19 Nov 92 21:16:56 GMT
  8. References: <1992Nov17.193152.24341@nas.nasa.gov>
  9. Sender: news@njit.edu
  10. Organization: New Jersey Institute of Technology, Newark, N.J.
  11. Lines: 71
  12. Nntp-Posting-Host: hertz.njit.edu
  13.  
  14. In article <1992Nov17.193152.24341@nas.nasa.gov> ryan@wk229.nas.nasa.gov (James S. Ryan) writes:
  15. >When editing icons, I find that it is possible to save them in any of
  16. >a number of different formats, and that many combinations of
  17. >resolution and number of colors are possible.
  18.  
  19. Right.  You can vary the device resolution, the pixel size, the number
  20. of pixels, and thenumber of colors.
  21.  
  22. >I tried to learn about these formats in all of the online help, under
  23. >every name I could think of.  No dice.  Can't find anything in the
  24. >FAQ or by lurking in these newsgroups.  If you can help, please answer:
  25. >
  26. >1) If there is more than one format stored, which one will be
  27. >   used in a given situation? (screen resolution/driver, etc.)
  28.  
  29. You can force a certain sized icon to be displayed, but normally you
  30. go with the default, which is hardcoded into the device driver.  The
  31. screen driver will specify a size in pixels normally, while a printer
  32. will specify a size based on its driver.
  33.  
  34. >2) I see that the icons appear to be about the same size regardless
  35. >   of the size of bitmap which is stored.  How is the scaling done?
  36. >   (e.g., if I make a 64x64 icon, and display it on a screen where it
  37. >   covers only 20x20 pixels, does it average color values?  throw
  38. >   pixels away?  what?) 
  39.  
  40. First, it tries to find an exact match from the various sizes in the
  41. file.  Failing that, it picks one and scales it.  I don't know the
  42. algorithm for picking one.  I think it picks one of the "independant"
  43. formats, depending on the color depth of the display device.  It is
  44. scaled up by duplicating columns and rows.  it is scaled down by
  45. throwing away columns and rows.
  46.  
  47. >3) There is the option of storing the icon in (pardon my faulty
  48. >   memory of the terms) forms such as 1.2, 2.0 and 2.0 packed.
  49. >   a) is 2.0 incompatible with 1.2 systems?
  50. >   b) is 2.0 better than 1.2 for 2.0 systems?
  51. >   c) what is "2.0 packed", and why doesn't that button work?
  52.  
  53. 2.0 format can't be called by 16-bit apps.
  54. 2.0 format contains a few extra fields (like printer resolution)
  55. I've no idea what 2.0 packed it.  I have yet to load such an icon.  I
  56. know you can't save one.  I also know that you can't save a 1.1 icon,
  57. although you can load them fine (I've done it)
  58.  
  59. >4) It seems that icons can be stored in files like "myicon.ico"
  60. >   or in some other way (as part of the extended attributes?).
  61. >   how does this work?  I'd just like to know what's going on.
  62.  
  63. The icon editor saves icons in .ICO format.  Icons can be attached to
  64. program code through the resource compiler (RC.EXE).  When WPS sees a
  65. program, it gets the program's icon (either from the code or from the
  66. .ICO file of matching name) and stores it in EA's for quick retrieval
  67. later on.
  68.  
  69. >5) Anything else I should have asked.
  70.  
  71. Not really, but I'll volunteer some more:
  72.  
  73. If you create a custom icon size, the icon editor will make it a
  74. variant of some form based upon the "device resolution".  0x0 will
  75. make it an independant variant, 640x480 will make it a VGA variant,
  76. 1024x768 will make it an 8514 variant.  I believe that the device
  77. resolution (and number of colors) is used in selecting which icons to
  78. scale when an exact match is not available.
  79.  
  80. -- 
  81.   |)  David Charlap          | .signature confiscated by FBI due to
  82.  /|_  dic5340@hertz.njit.edu | an ongoing investigation into the
  83. ((|,)                        | source of these .signature virusses
  84.  ~|~
  85.