home *** CD-ROM | disk | FTP | other *** search
/ Intermedia 1998 January / inter1_98.iso / grafika / emptypic / emptypic.txt next >
Text File  |  1997-06-12  |  6KB  |  127 lines

  1. Dear Friends,
  2.  
  3.      These programs are the beta versions of the programs in the
  4. EMPTY PICTURE system. They can change a  GIF  picture file so it
  5. displays a rectangle filled with a single color. When I first
  6. conceived the system, this was a black rectangle. Then I saw that
  7. I could make this rectangle any of 16 million colors.
  8.  
  9.      Now you must be asking why anyone would want to make a picture
  10. that is all one color. If this were an irreversible process, it
  11. would be completely useless. However, if you can easily restore the
  12. original picture, there are many useful applications on the
  13. Internet. Some of these applications may even be legal.
  14.  
  15.      Most of us have at least one graphic file that we don't want
  16. everyone to see. We can now use MASK.COM to make it a single color
  17. such as black. Then, in the HTML language used in WEB PAGE design,
  18. instead of using a background color we can use this "masked"
  19. graphic. The HTML language will even automatically replicate this
  20. hidden image to fill the desired area.
  21.  
  22.      On the receiving end, selected users know that the background
  23. contains a hidden picture. They can "save background image" with
  24. their right mouse button. They can then use FIXX.COM to restore the
  25. original image. Others who do not know about this system will not
  26. even be aware that the image exists.
  27.  
  28.      To make these concepts work, we need a working knowledge of
  29. some programming language and a basic familiarity with the HTML
  30. structure. We also need a detailed knowledge of the structure of
  31. GIF  files.
  32.  
  33.      The color information in GIF files depends on a "color
  34. palette" that can be from six bytes to 768 bytes. It should always
  35. start with the 13th byte. The 11th byte contains the length of the
  36. color palette. A byte consists of 8 bits. A bit is either 0 or 1.
  37. In the 11th byte we must multiply the sixth bit by 4, add twice the
  38. seventh bit, add the last bit, and add one. We then take this sum
  39. and raise 2 to that power. The length of the color palette in bytes
  40. is 3 times this number.
  41.  
  42.      If the HEX representation of this 11th byte ends in either "7"
  43. or "F" its color palette contains 256 sets with three bytes in each
  44. set. The first byte of each set defines the brightness of the RED
  45. part of that color. It has a range from 000 to 255. The next byte
  46. defines the GREEN part, and the last byte defines the BLUE part.
  47.  
  48.      For example, the triple byte  000,000,000  is black, and 
  49. 255,255,255  is bright white. Bright RED, GREEN, or BLUE, is 
  50. 255,000,000  or  000,255,000  or  000,000,255. A combination like 
  51. 000,150,150  is a soft robins egg blue-green. Every picture element
  52. in a GIF picture is one of the elements in this color palette. A
  53. LZW compression system reduces the size of the file.
  54.  
  55.      My system, in concept, is simple. MASK.COM  stores a copy of
  56. this color palette at the end of the graphic file. To preserve  GIF
  57.  
  58. compatibility, it uses  GIF  "comment extension blocks." It then
  59. overwrites the original color palette. If it uses all zeros, the
  60. image is black, and 255 (HEX  FF ) makes the image white. Any
  61. bounded triplet repeated over the entire palette gives a single
  62. colored image. MASK.COM  stores this triplet internally as 3 bytes
  63. to make a default color. The program  SETCOLOR.COM  simply changes
  64. these three bytes, with several safeguards to insure that the
  65. program does not change any other files.
  66.  
  67.      To recover the original image  FIXX.COM  restores the original
  68. color palette and removes everything that  MASK.COM  added to the
  69. end of the file. It checks to make sure that the object file has a
  70. true  GIF  format. It also looks for several "signatures" left by 
  71. MASK.COM, including the Copyright notice on the alterations. This
  72. "signature" does not include the copyright date. Therefore, future
  73. versions of this system with later Copyright dates will still be
  74. completely compatible with this version. 
  75.  
  76.      This unaltered Copyright notice (except the date) marks the
  77. beginning of the stored copy of the original color palette.
  78. However, it is still in  GIF  extensions, with the  GIF  block
  79. structure. MASK.COM  must find and remove the control bytes before
  80. it restores the original color palette.
  81.  
  82.      This version will not properly process multiple image
  83. (animated)  GIF  files that use local palettes. It will also not
  84. over-ride transparency assignments. Transparency applies to a
  85. palette location, not a color. When operating on masked  GIF 
  86. files, do not let your viewer do a remap on the file. This action
  87. will erase the original image information.
  88.  
  89.      I did not program  MASK.COM  to process  GIF  files with small
  90. color palettes. If there is a need for this, I can add it. I did
  91. program it to recognize them so it would not change them.
  92.  
  93.      There are several opportunities here for customized "private"
  94. versions of this system. The system stops if the notice in the file
  95. differs from the stored version in the  FIXX.COM  program.
  96. Therefore, any matching variation will form a private system.
  97. Simply adding the words "licensed to John Smith." would do the job.
  98. It is a violation of the Copyright Laws to alter a copyright notice
  99. without written permission from the owner of the copyright. Just
  100. tell me how many copies you want to distribute. I am sure we can
  101. work something out.
  102.  
  103.      I am distributing the Standard Version as Shareware. That
  104. means you can try it out for free without any time or use
  105. limitations. If you really like the programs, you might want to
  106. help me make other interesting and useful products. A donation of
  107. $10 or $15 (or any amount) will help me pay my mortgage and grocery
  108. bills. In appreciation I will send you copies of some of my other
  109. programs for your evaluation.
  110.  
  111.  
  112. Robert Wallingford  Prof.  Engineer,  Retired
  113. 310  S.  Vermillion  Street
  114. Streator,  IL  61364-2940
  115. U.S.A.
  116.  
  117. Ph.  (815) - 672 - 2007
  118.  
  119. email at:
  120.  
  121. wallingford@usa.net
  122.      or
  123. prof.engineer@usa.net
  124.  
  125. My Web Site Address is:
  126.       http://www.crtelco.com/~robertw
  127.