www.pudn.com > src.rar
To Read all the content
[file head]:
/*---------------------------------------------------------------------------
* Arnold transformation
* ---------------------------------------------------------------------------*/
#include <tina/all_tina.h>
#include "bmp.h"
#define MAXPATHLEN 64
static char directory_name[MAXPATHLEN];
static char file_name[MAXPATHLEN];
static char pathname[MAXPATHLEN];
static void *pdir=0, *pfile=0;
static int SCRAM_n = 1;
static Tv *tv = NULL;
static Tv *tv1=NULL;
/*---------------------------------------------------------------------------
To generate the scrambling mapping-matrix of arnold transformation.
---------------------------------------------------------------------------*/
void qatlig_matrix(int** r, int** c, int height, int width)
{
int i, j, x1, y1, x2, y2, x3, y3, x, y;
/*
double a_QATLIG = 9.14849113758545604e+002;
double b_QATLIG = 1.13322919891824768e+004;
double c_QATLIG = 5.17813914782433339e+003;
double d_QATLIG = 8.11207945415277645e+004;
double e
... ...
[file tail]:
... ...
id tv_choice_proc();
if (tool)
{
tw_show_tool(tool);
return;
}
tool = (void *)tw_tool("Qatlig Scrambling tool", x, y);
/* Initialise pathname from environment variable (or #define) */
(void) environ_pathname_get(directory_name, file_name,
"TINA_IMAGE_DEFAULT",
"/home/wzz/newimscramdegree/result/Qatlig/Lena.gif");
tv = tv_create("Qatlig original");
tv1 = tv_create("Qatlig scrambled");
tw_choice("Tv choice", tv_choice_proc, 0, "original","scrambled", NULL);
tw_newrow();
tw_newrow();
/*---------------------------*/
pdir = (void *) tw_sglobal("Directory:", directory_name, 32);
tw_button("scan", scan_proc, NULL);
tw_newrow();
pfile = (void*) tw_sglobal("File:", file_name, 32);
tw_newrow();
/*---------------------------*/
tw_iglobal("Scrambling times = ", &amt;SCRAM_n, 5);
tw_newrow();
tw_button("Qatlig", Qatlig_Trans,NULL);
tw_button("R_Qatlig", R_Qatlig_Trans,NULL);
tw_newrow();
tw_newrow();
tw_end_tool();
}