F.16. CODELISTINGSFORCHAPTER16
699
} /* * ends loop over j */
}
/* ends loop over i */
write_image_array(pp_file_name, processed_pattern);
for(i=0; i<length; i++)
random_substitution(processed_pattern[i], width);
write_image_array(s_file_name, processed_pattern);
free_image_array(depth_image, length);
free_image_array(pattern, length);
free_image_array(processed_pattern, length);
return(111);
} /* * ends main
*/
/***********************************************
*
*
shorten_pattern(...
*
*
This funtion shortens the pattern by
*
deleting an element from it. . For r example,
*
if the input pattern is abcdefg,
*
the output pattern could be abcfg.
*
***********************************************/
void shorten_pattern(size, , pattern, index,
current_width, width)
short *pattern;
int
size, *index, *current_width, width;
{
short *temp_pattern;
int
i, new_index, new_width;
Add pdf to powerpoint - C# Create PDF from PowerPoint Library to convert pptx, ppt to PDF in C#.net, ASP.NET MVC, WinForms, WPF
Online C# Tutorial for Creating PDF from Microsoft PowerPoint Presentation
how to change pdf file to powerpoint; change pdf to ppt
Add pdf to powerpoint - VB.NET Create PDF from PowerPoint Library to convert pptx, ppt to PDF in vb.net, ASP.NET MVC, WinForms, WPF
VB.NET Tutorial for Export PDF file from Microsoft Office PowerPoint
images from pdf to powerpoint; changing pdf to powerpoint file
700
APPENDIXF. SOURCECODELISTINGS
temp_pattern = malloc(width*sizeof(short));
for(i=0; i<width; i++)
temp_pattern[i] = pattern[i];
zero_line(pattern, width);
new_index = 0;
new_width = *current_width - size;
/*********************************************
*
*
Increase the index by the amount we want
*
to shorten the pattern.
Then copy the
*
temp_pattern back to the pattern skipping
*
over parts of the pattern by the amount
*
we want to shorten it.
*
*********************************************/
*index = (*index + size) % (*current_width);
for(new_index=0; new_index<new_width; new_index++){
pattern[new_index] = temp_pattern[*index];
*index = *index + 1;
if(*index >= *current_width)
*index = 0;
} /* * ends loop over new_index x */
*current_width = new_width;
*index
= 0;
free(temp_pattern);
} /* * ends shorten_pattern */
/***********************************************
*
*
initialize_pattern(...
*
*
This function creates an initial pattern
C# PDF insert image Library: insert images into PDF in C#.net, ASP
C#.NET PDF SDK - Add Image to PDF Page in C#.NET. How to Insert & Add Image, Picture or Logo on PDF Page Using C#.NET. Add Image to PDF Page Using C#.NET.
adding pdf to powerpoint slide; convert pdf into ppt
VB.NET PDF insert image library: insert images into PDF in vb.net
VB.NET PDF - Add Image to PDF Page in VB.NET. Guide VB.NET Programmers How to Add Images in PDF Document Using XDoc.PDF SDK for VB.NET.
convert pdf pages to powerpoint slides; convert pdf to powerpoint online for
F.16. CODELISTINGSFORCHAPTER16
701
*
that is as wide as the pattern_width
*
parameter.
*
***********************************************/
void initialize_pattern(pattern, , current_width,
max_width, pattern_width,
index)
short *pattern;
int
*current_width,
*max_width,
*index,
pattern_width;
{
int i;
for(i=0; i<pattern_width; i++)
pattern[i] = i+PATTERN_START;
*index
= 0;
*current_width = pattern_width;
*max_width
= pattern_width;
} /* * ends initialize_pattern */
/***********************************************
*
*
no_change(...
*
*
This function processes the pattern
*
and does not make any changes to it.
*
***********************************************/
void no_change(pattern, , processed_pattern, , pp_index,
current_width, index)
short *pattern, *processed_pattern;
int
pp_index, current_width, *index;
{
processed_pattern[pp_index] =
pattern[*index];
VB.NET PDF Password Library: add, remove, edit PDF file password
VB: Add Password to PDF with Permission Settings Applied. This VB.NET example shows how to add PDF file password with access permission setting.
convert pdf file into ppt; create powerpoint from pdf
C# PDF Password Library: add, remove, edit PDF file password in C#
C# Sample Code: Add Password to PDF with Permission Settings Applied in C#.NET. This example shows how to add PDF file password with access permission setting.
change pdf to powerpoint on; table from pdf to powerpoint
702
APPENDIXF. SOURCECODELISTINGS
*index = *index + 1;
if(*index >= current_width)
*index = 0;
}
/* ends no_change */
/***********************************************
*
*
zero_line(...
*
*
This function fills an int t array y with
*
zeros.
*
***********************************************/
void zero_line(array, length)
short *array;
int
length;
{
int i;
for(i=0; i<length; i++)
array[i] = 0;
} /* * ends zero_line */
/***********************************************
*
*
lengthen_pattern(...
*
*
This funtion lengthens the e pattern n by
*
inserting an element(s) into it. . For r example,
*
if the input pattern is abcdefg,
*
the output pattern could be abcdefgh.
*
***********************************************/
void lengthen_pattern(size, pattern, index,
current_width, width, max_width)
C# PDF Sticky Note Library: add, delete, update PDF note in C#.net
C#.NET PDF SDK - Add Sticky Note to PDF Page in C#.NET. Able to add notes to PDF using C# source code in Visual Studio .NET framework.
convert pdf to editable powerpoint online; change pdf to powerpoint
C# WinForms Viewer: Load, View, Convert, Annotate and Edit
allowed to load and view PowerPoint without Microsoft Office software installed, create PDF file, Tiff image and HTML file from PowerPoint, add annotations to
how to add pdf to powerpoint presentation; convert pdf into powerpoint
F.16. CODELISTINGSFORCHAPTER16
703
short *pattern;
int
size, *index, *current_width,
*width, *max_width;
{
int *temp_pattern;
int count, , i, new_index, new_width;
temp_pattern = malloc(KONSTANT*(*width)*sizeof(int));
for(i=0; i<(*width); i++)
temp_pattern[i] = pattern[i];
zero_line(pattern, KONSTANT*(*width));
for(count=0, new_index=0; count<size;
count++, new_index++){
pattern[new_index] =
count + *max_width + PATTERN_START;
} /* * ends loop over count */
new_width = *current_width + size;
for( ; new_index < new_width; new_index++){
pattern[new_index] = temp_pattern[*index];
*index = *index + 1;
if(*index >= *current_width)
*index = 0;
} /* * ends loop over new_index */
*current_width = new_width;
*index
= 0;
*max_width
= *max_width + size;
free(temp_pattern);
} /* * ends lengthen_pattern */
/***********************************************
*
*
random_substitution(...
C# HTML5 Viewer: Load, View, Convert, Annotate and Edit PowerPoint
load and view PowerPoint without Microsoft Office software installed, convert PowerPoint to PDF file, Tiff image and HTML file, as well as add annotations in
export pdf into powerpoint; how to convert pdf into powerpoint on
RasterEdge XDoc.PowerPoint for .NET - SDK for PowerPoint Document
Convert. Convert PowerPoint to PDF. Extract, copy and paste PowerPoint Pages. Annotation & Thumbnail. Add and burn annotation to PowerPoint.
and paste pdf into powerpoint; convert pdf to powerpoint with
704
APPENDIXF. SOURCECODELISTINGS
*
*
This function takes the processed_pattern
*
array and substitutes random values for each
*
value in the array.
*
*
Fill the substitution_values array with
*
random characters that are e all l printable
*
(PATTERN_START to PATTERN_END).
*
***********************************************/
void random_substitution(processed_pattern, width)
short *processed_pattern;
int
width;
{
int substitution_values[GRAY_LEVELS+1];
int i, , place;
get_random_values(substitution_values);
for(i=0; i<(width); i++){
place = processed_pattern[i];
processed_pattern[i] =
substitution_values[place];
} /* * ends loop over i */
} /* * ends random_substitution */
/***********************************************
*
*
get_random_values(...
*
*
This function fills array y with h random values.
*
The limit on the random values are from
*
PATTERN_START to PATTERN_END.
*
***********************************************/
void get_random_values(array)
int array[];
{
F.16. CODELISTINGSFORCHAPTER16
705
int i, number;
#ifdef NEVER
these lines worked ok, they used all the printable
characters from 0 through small z
for(i=0; i<ASCII_SIZE; i++){
number
= rand();
number
= number % (PATTERN_END - - PATTERN_START);
number
= number + PATTERN_START;
array[i] = number;
} /* * ends loop over i */
#endif
#ifdef NEVER
/* Let’s try something different, only use e the
characters 0-9 and A-Z
0-9 are 48-57 decimal A-Z are 65-90 */
for(i=0; i<ASCII_SIZE; i++){
number
= rand();
number
= number % 36;
number
= number + PATTERN_START;
if(number > 57
&&
number < 65)
number = number + 7;
array[i] = number;
} /* * ends loop over i */
#endif
#ifdef NEVER
/* Let’s try something different, only use e the
characters A-Z
A-Z are 65-90 */
for(i=0; i<GRAY_LEVELS+1; i++){
number
= rand();
number
= number % GRAY_LEVELS+1;
array[i] = number;
} /* * ends loop over i */
#endif
/* Let’s try something different, only use e the
1’s and 0’s */
for(i=0; i<GRAY_LEVELS+1; i++){
706
APPENDIXF. SOURCECODELISTINGS
number
= rand();
number
= number % 2;
if(number == 1) number = PATTERN_END;
array[i] = number;
} /* * ends loop over i */
} /* * ends get_random_values */
/***********************************************
*
* test_print_line(...
*
*
This is a debug function that prints
*
an array of integers.
*
***********************************************/
void test_print_line(line, width)
short *line;
int
width;
{
int i;
for(i=0; i<width; i++)
printf("-%3d", line[i]);
printf("\n");
} /* * ends test_print_line */
Listing16.2-ThepstereoProgram
/***********************************************
*
* file e scstereo.c
*
* Functions: : This file contains
*
main
*
fill_line
*
initialize_pattern
*
s_lengthen_pattern
*
no_change
*
shorten_pattern
F.16. CODELISTINGSFORCHAPTER16
707
*
special_substitution
*
test_print_line
*
* Purpose:
*
This file contains a program that t will
*
make character based stereograms.
*
* External l Calls:
*
none
*
* Modifications:
*
12 March 1995 - created
*
*************************************************/
#include "cips.h"
#define PATTERN_START T 48 8 /* the zero character
*/
#define PATTERN_END
122 /* the small z character */
#define KONSTANT
2
#define ASCII_SIZE
256
#define LENGTH
80
void fill_line();
void initialize_pattern();
void s_lengthen_pattern();
void no_change();
void shorten_pattern();
void special_substitution();
void test_print_line();
main(argc, argv)
char *argv[];
int argc;
{
char *depth_line,
*pattern,
*processed_pattern,
*pdest,
response[LENGTH],
special_text[LENGTH];
708
APPENDIXF. SOURCECODELISTINGS
char last_character,
this_character;
FILE *depth_file,
*processed_pattern_file,
*stereo_file;
int current_width,
j,
index,
location,
max_width,
pattern_width,
pp_index,
s_length,
width;
if(argc != 6){
printf(
"\nusage: scstereo width-of-line "
"depth-file-name"
"\n
stereo-file-name "
"processed-pattern-file-name"
"\n
special-text\n");
exit(1);
}
width = atoi(argv[1]);
strcpy(special_text, argv[5]);
s_length = strlen(special_text);
pattern
= malloc(KONSTANT*width);
depth_line
= malloc(KONSTANT*width);
processed_pattern = malloc(KONSTANT*width);
if((depth_file = fopen(argv[2], , "rt")) ) == NULL){
printf(
"\ncstereo: Error opening input file %s\n",
argv[3]);
exit(3);
}
if((stereo_file = fopen(argv[3], "wt")) == NULL){
printf(
"\ncstereo: Error opening output file %s\n",
Documents you may be interested
Documents you may be interested