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1, 1,
500 static const Prob levels[4][3] = {
501 {{1, 255}, {251, 0}, {4, 251}},
502 {{1, 255}, {200, 0}, {55, 200}},
503 {{33, 223}, {159, 0}, {64, 159}},
504 {{131, 0}, {0, 0}, {125, 131}}
507 static const Prob freqs[16] = {
508 {0, 0}, {38, 0}, {38, 38}, {13, 152},
509 {38, 76}, {13, 165}, {13, 178}, {6, 230},
510 {38, 114}, {13, 191}, {13, 204}, {6, 236},
511 {13, 217}, {6, 242}, {5, 248}, {3, 253}
514 static const char HexDigits[] = "0123456789ABCDEF";
522 class TDE_EXPORT KXFace : public TQObject
534 TQString fromImage( const TQImage &image);
539 TQImage toImage( const TQString &xface);
543 static const int WIDTH = 48;
544 static const int HEIGHT = WIDTH;
545 static const int PIXELS = (WIDTH * HEIGHT);
546 static const int BITSPERWORD = 8;
547 static const int MAXWORDS = ((PIXELS * 2 + BITSPERWORD - 1) / BITSPERWORD);
551 int compface_xbitmap;
554 Prob *ProbBuf[PIXELS * 2];
558 typedef struct bigint
561 unsigned char b_word[MAXWORDS];
566 void RevPush( const Prob *p);
567 void BigPush(Prob *p);
568 int BigPop( const Prob *p);
569 void BigDiv( unsigned char a, unsigned char *r);
570 void BigMul( unsigned char a);
571 void BigAdd( unsigned char a);
574 TQCString WriteFace();
575 void UnCompAll( char *fbuf);
576 void UnCompress( char *f, int wid, int hei, int lev);
577 void BigWrite( char *fbuf);
578 void BigRead( char *fbuf);
579 void ReadFace( char *fbuf);
583 void PopGreys( char *f, int wid, int hei);
584 void CompAll( char *fbuf);
585 void Compress( char *f, int wid, int hei, int lev);
586 int AllWhite( char *f, int wid, int hei);
587 int AllBlack( char *f, int wid, int hei);
588 int Same( char *f, int wid, int hei);
589 void PushGreys( char *f, int wid, int hei);
TDEPIM classes for drag and drop of mails.
|