www.pudn.com > src.rar   To Read all the content


[file head]:
/********************************************************************
*
* test
*
********************************************************************/
#include <tina/all_tina.h>
#include "bmp.h"
static int SCRAM_n = 1;
static Tv *tv = NULL;
static Tv *tv1=NULL;

#define R0 2097151
#define LAMBDA 2045
#define MOD 2097152

#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_method = 0;
static int image_choice = 0;

static char filename[MAXPATHLEN];
static Imrect *orig_im =NULL;
static Imrect *dest_im = NULL;


extern void nhwfm_proc(void);



static void scram_choice_proc(int val)
{
scram_method = val;
}
static image_choice_proc(int val)
{
image_choice = val;
}
static Imrect *read_image(void)
{
Imrect *srcIm;
/*----------------Read the image---------------------------*/
(void) strip_spaces(file_name);
(void) strip_spaces(directory_n
... ...

[file tail]:
... ...
/*---------------------------*/
tw_choice("input image choice", image_choice_proc, 0, "BMP","GIF", NULL);
tw_label(" ");
tw_button("push",mypush_proc,NULL);
tw_button("pop",mypop_proc,NULL);
tw_button("save",mysave_proc,NULL);
tw_newrow();
strcpy(filename,"result/test/");
strcat(filename,file_name);
tw_choice("Scrambling Method:", scram_choice_proc, 0,\
"Fibonacci", "Arnold", "QATLIG", "Hilbert", "Convey", "Latin", "GrayCode", "Baker", "Logistic", "Sampling", NULL);
tw_newrow();
tw_iglobal("Scrambling times = ", &amt;SCRAM_n, 5);
tw_newrow();
tw_button("Transformation",Trans_proc,NULL);
tw_button("Contra-Transformation",Contra_Trans_proc,NULL);
tw_button("reset",reset_proc,NULL);
//tw_button("DrawRGB",DrawRGB_proc,NULL);
tw_button("showtv",show_tv_proc,NULL);
tw_newrow();
tw_button("nhwfm", nhwfm_proc, NULL);
tw_button("noise", noise_proc, NULL);
tw_button("compute_p", compute_p_proc, NULL);
tw_newrow();
tw_end_tool();
}