Главная страница


ru.cgi.perl

 
 - RU.CGI.PERL ------------------------------------------------------------------
 From : Sergey Smagin                        2:5054/60      14 May 2001  22:21:20
 To : Sergey Krutyko
 Subject : Счетчик
 -------------------------------------------------------------------------------- 
 
 
 11 Май 01 09:28, Sergey Krutyko wrote to Pavel Reich:
 
  PR>> счетчик и нужны ли они? Как несколько картинок склеить в одну
  PR>> средствами Perl/PHP/etc.? То есть вместо
  PR>> <img...></img><img...></img> сделать один тег, например <img
  PR>> src="0012.gif"></img>
  SK>     Изучи формат GIF и рисуй сам картинку на основе шаблонов цифр.
 
 Для счетчика вполне потянет формат .xbm
 
 Вот например графический файл счетчика:
 === Cut ===
 #define count_width 24
 #define count_height 16
 static char count_bits[] = {
 0xff,0xff,0xff,0xff,0xff,0xff,0xff,
 0xff,0xff,0xcf,0xc3,0xc7,0xc7,0x99,
 0xf3,0xcf,0x9f,0xf9,0xcf,0x9f,0xf9,
 0xcf,0xc7,0xc1,0xcf,0x9f,0x99,0xcf,
 0x9f,0x99,0xcf,0x9f,0x99,0xcf,0x99,
 0x99,0xc7,0xc3,0xc3,0xff,0xff,0xff,
 0xff,0xff,0xff,0xff,0xff,0xff};
 === Cut ===
 
 Посмотрите формат здесь, к сожалению, на английском, но не много:
 
 === Cut ===
 Subj : XBM
 Keys : XBM,UNIX,LINUX,XWINDOW,BSD,FILE,FORMAT
 
 XBM - X BitMap Format
 
 XBM  is  a  native file format of The  X  Window  System and is used for
 storing  cursor  and icon bitmaps that are  used in the X GUI. XBM files
 are  quite  different in that they  are actually C language source files
 that  are  created  to be read by  a  C compiler rather than a graphical
 display program.
 
 XBM  data  is typically found in headers  (.h files) and are a series of
 static  unsigned char arrays containing the monochrome pixel data. There
 is one array per image stored in the header.
 
 As an example, the following piece of C code is an X BitMap file:
 
   #define test_width 16
   #define test_height 16
   static unsigned char test_bits[] = {
      0xff, 0xff, 0x01, 0x80, 0xfd, 0xbf, 0x05, 0xa0, 0xf5, 0xaf, 0x15, 0xa8,
      0xd5, 0xab, 0x55, 0xaa, 0x55, 0xaa, 0xd5, 0xab, 0x15, 0xa8, 0xf5, 0xaf,
      0x05, 0xa0, 0xfd, 0xbf, 0x01, 0x80, 0xff, 0xff};
 
 Which defines the 16x16 bitmap that looks like:
 
         ################
         #              #
         # ############ #
         # #          # #
         # # ######## # #
         # # #      # # #
         # # # #### # # #
         # # # #  # # # #
         # # # #  # # # #
         # # # #### # # #
         # # #      # # #
         # # ######## # #
         # #          # #
         # ############ #
         #              #
         ################
 
 -----------
 XBM  was  created  by the X Consortium  as  part of the X Window System.
 Refer  to  the  /bitmaps  directory of  the  X  Window  distribution for
 examples  of XBM files. The central  FTP distribution site for X version
 11 is:
 
   ftp://ftp.x.org
 
 Reference works describing XBM include:
 
 - Xlib-C language X Interface, Gettys, James, and Robert W. Scheiffler,
   Consortium Standard, X Version 11, Release 5, First Revision, August 1991.
 
 - Xlib Programming Manual, Nye, Adrian, third edition, O'Reilly & Associates,
   Inc. Sebastopol, CA, 1992.
 
 -----------
 Remember, at Unix EOL (End of Line) is "0A" (LF/Line Feed), but in a DOS
 compatible system, EOL is "0D 0A" (CR+LF/Carriage Return+Line Feed).
 
 Eduardo Motta Buhrnheim (Mingo)
 mingo@n3.com.br
 P.O.Box, 3159,
 Manaus, Amazonas,
 Brazil, 69001-970.
 
 EXTENSIONS: XBM
 OCCURENCES: PC,SUN
 PROGRAMS: X WINDOW SYSTEM,UNIX,INTERNET BROWSERS
 === Cut ===
 
 В итоге, генерация значений такого счетчика не является особенно сложной.
 
 Sergey [www.gedface.da.ru][//gallerey.ussr.to][www.node.da.ru]
 --- [www.clk.da.ru][www.kamenskii.da.ru][www.kaddr.da.ru][//4.ussr.to]
  * Origin: Я в фидо 885 дней (2:5054/60)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Счетчик   Pavel Reich   09 May 2001 13:08:57 
 Re: Счетчик   Artem Chuprina   10 May 2001 12:51:20 
 RE:Счетчик   Sergey Krutyko   11 May 2001 09:28:06 
 Счетчик   Sergey Smagin   14 May 2001 22:21:20 
 Re: Счетчик   Artem Chuprina   15 May 2001 11:50:03 
 Re: Counter   Alexey Borisov   17 May 2001 23:47:09 
 Счетчик   Alexander Kulik   11 May 2001 16:12:08 
 Re: Счетчик   Andrey Kholyavkin   13 May 2001 21:15:13 
Архивное /ru.cgi.perl/18243b00147d.html, оценка 1 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional