F.13. CODELISTINGSFORCHAPTER13
639
float
x_stretch, y_stretch;
int
bilinear;
long
tmp_length, tmp_width;
long
length, width;
struct bmpfileheader
bmp_file_header;
struct bitmapheader
bmheader;
struct bitmapheader
bmheader2;
struct tiff_header_struct tiff_file_header;
struct tiff_header_struct tiff_file_header2;
/******************************************
*
* Interpret t the command line parameters.
*
*******************************************/
if(argc < 6 || argc > 6){
printf(
"\n"
"\n usage: stretch in-file out-file x-stretch "
"y-stretch bilinear (1 or 0)"
"\n");
exit(0);
}
strcpy(in_name, argv[1]);
strcpy(out_name, argv[2]);
x_stretch = atof(argv[3]);
y_stretch = atof(argv[4]);
bilinear = = atoi(argv[5]);
if(does_not_exist(in_name)){
printf("\nERROR input file %s does not t exist",
in_name);
exit(0);
}
/********************************************
*
*
Create an output file different t in n size
*
from the input file.
*
How to convert pdf into powerpoint on - 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
convert pdf slides to powerpoint online; changing pdf to powerpoint
How to convert pdf into powerpoint on - 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
converter pdf to powerpoint; pdf to ppt
640
APPENDIXF. SOURCECODELISTINGS
********************************************/
get_image_size(in_name, &length, &width);
tmp_length = ((float)(length)*y_stretch);
tmp_width = = ((float)(width)*x_stretch);
create_resized_image_file(in_name, out_name,
tmp_length, tmp_width);
the_image = allocate_image_array(length, width);
out_image = allocate_image_array(tmp_length, tmp_width);
read_image_array(in_name, the_image);
stretch(the_image, out_image,
x_stretch, y_stretch,
bilinear,
tmp_length,
tmp_width,
length,
width);
write_image_array(out_name, out_image);
free_image_array(out_image, tmp_length);
free_image_array(the_image, length);
} /* * ends main n */
/*******************************************
*
*
stretch(..
*
*
This routine performs the image
*
stretching. If bilinear r == = 0, it uses
*
the roundoff approach for enlarging
*
an area. If bilinear == = 1, , it calls the
*
bilinear_interpolate routine to get
*
the value of a pixel that lies
*
between pixels.
*
********************************************/
stretch(the_image, out_image,
Online Convert PowerPoint to PDF file. Best free online export
Convert a PPTX/PPT File to PDF. Just upload your file by clicking on the blue button or drag-and-drop your pptx or ppt file into the drop area.
changing pdf to powerpoint file; convert pdf document to powerpoint
C# PDF insert text Library: insert text into PDF content in C#.net
Parameters: Name, Description, Valid Value. value, The char wil be added into PDF page, 0
convert pdf to powerpoint; create powerpoint from pdf
F.13. CODELISTINGSFORCHAPTER13
641
x_stretch, y_stretch,
bilinear,
out_rows, out_cols,
in_rows, in_cols)
float x_stretch, , y_stretch;
int
bilinear;
short **the_image,
**out_image;
long
out_cols, out_rows;
long
in_cols, in_rows;
{
double tmpx, tmpy;
float fi, , fj;
int
i, j, new_i, new_j;
/**************************
*
*
Loop over image array
*
**************************/
printf("\n");
for(i=0; i<out_rows; i++){
if( (i%10) == 0) printf("%d ", i);
for(j=0; j<out_cols; j++){
fi = i;
fj = j;
tmpx = fj/x_stretch;
tmpy = fi/y_stretch;
new_i = tmpy;
new_j = tmpx;
if(bilinear == 0){
if(new_j < 0
||
new_j >= in_cols
||
new_i < 0
||
new_i >= in_rows)
out_image[i][j] = FILL;
else
out_image[i][j] =
the_image[new_i][new_j];
C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net
with specified zoom value and save it into stream The magnification of the original PDF page size Description: Convert to DOCX/TIFF with specified resolution and
convert pdf into ppt; convert pdf file to powerpoint online
RasterEdge XDoc.PowerPoint for .NET - SDK for PowerPoint Document
Convert. Convert PowerPoint to PDF. Convert PowerPoint to ODP/ ODP to PowerPoint. Document & Page Process. PowerPoint Page Edit. Insert Pages into PowerPoint File
how to convert pdf to ppt for; convert pdf to editable ppt
642
APPENDIXF. SOURCECODELISTINGS
} /* * ends if bilinear */
else{
out_image[i][j] =
bilinear_interpolate(the_image,
tmpx, tmpy,
in_rows, in_cols);
} /* * ends bilinear if */
} /* * ends loop over j */
} /* * ends loop over i */
} /* * ends stretch */
Listing13.3-ThestretchProgram
F.14 CodeListingsforChapter14
/***********************************************
*
*
file warpsubs.c
*
*
Functions: This file contains
*
warp
*
warp_loop
*
bi_warp_loop
*
object_warp
*
full_warp_loop
*
bi_full_warp_loop
*
get_warp_options
*
*
Purpose:
*
These functions performs different
*
geometric operations.
*
*
External Calls:
*
geosubs.c - bilinear_interpolate
*
*
Modifications:
*
20 October 1993- created
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
with specified zoom value and save it into stream The magnification of the original PDF page size Description: Convert to DOCX/TIFF with specified resolution and
converting pdf to ppt; change pdf to powerpoint online
C# PDF insert image Library: insert images into PDF in C#.net, ASP
Import graphic picture, digital photo, signature and logo into PDF document. Merge several images into PDF. Insert images into PDF form field.
and paste pdf into powerpoint; pdf to powerpoint slide
F.14. CODELISTINGSFORCHAPTER14
643
*
27 August 1998 - modified to work on
*
entire images at once.
*
*************************************************/
#include "cips.h"
#define FILL 150
/*******************************************
*
*
warp(..
*
*
This routine warps a rowsxcols section
*
of an image. . The e il, ie parameters
*
specify which rowsxcols section of
*
the image to warp. . The e x_control l and
*
y_control parameters are the control
*
points inside that section. . Therefore,
*
x_control and y_control will always be
*
less the cols and rows.
*
*
The point coordinates are for the e four
*
corners of a four side figure.
*
x1,y1
x2,y2
*
*
x4,y4
x3,y3
*
*******************************************/
warp(the_image, out_image,
x_control, y_control,
bilinear,
rows, cols)
int
bilinear, x_control, y_control;
long
cols, rows;
short **the_image,
**out_image;
{
int
cols_div_2, extra_x, extra_y, i, , j,
rows_div_2, x1, x2, x3, x4, y1, , y2, , y3, y4;
cols_div_2 = cols/2;
rows_div_2 = rows/2;
C# PDF File Split Library: Split, seperate PDF into multiple files
Divide PDF File into Two Using C#. This is an C# example of splitting a PDF to two new PDF files. Split PDF Document into Multiple PDF Files in C#.
how to change pdf to powerpoint; how to change pdf file to powerpoint
C# PDF Page Insert Library: insert pages into PDF file in C#.net
from the ability to inserting a new PDF page into existing PDF or pages from various file formats, such as PDF, Tiff, Word, Excel, PowerPoint, Bmp, Jpeg
convert pdf back to powerpoint; how to convert pdf into powerpoint slides
644
APPENDIXF. SOURCECODELISTINGS
/***********************************
*
*
1 - upper left quarter
*
***********************************/
x1 = 0;
x2 = cols_div_2;
x3 = x_control;
x4 = 0;
y1 = 0;
y2 = 0;
y3 = y_control;
y4 = rows_div_2;
extra_x = 0;
extra_y = 0;
if(bilinear)
bi_warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols);
else
warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols);
/***********************************
*
*
2 - upper right quarter
*
***********************************/
x1 = cols_div_2;
x2 = cols-1;
x3 = cols-1;
x4 = x_control;
y1 = 0;
F.14. CODELISTINGSFORCHAPTER14
645
y2 = 0;
y3 = rows_div_2;
y4 = y_control;
extra_x = cols_div_2;
extra_y = 0;
if(bilinear)
bi_warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols);
else
warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols);
/***********************************
*
*
3 - lower right quarter
*
***********************************/
x1 = x_control;
x2 = cols-1;
x3 = cols-1;
x4 = cols_div_2;
y1 = y_control;
y2 = rows_div_2;
y3 = rows-1;
y4 = rows-1;
extra_x = cols_div_2;
extra_y = rows_div_2;
if(bilinear)
bi_warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
646
APPENDIXF. SOURCECODELISTINGS
rows, cols);
else
warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols);
/***********************************
*
*
4 - lower left quarter
*
***********************************/
x1 = 0;
x2 = x_control;
x3 = cols_div_2;
x4 = 0;
y1 = rows_div_2;
y2 = y_control;
y3 = rows-1;
y4 = rows-1;
extra_x = 0;
extra_y = rows_div_2;
if(bilinear)
bi_warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols);
else
warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols);
} /* * ends warp */
F.14. CODELISTINGSFORCHAPTER14
647
/*******************************************
*
*
warp_loop(..
*
*
This routine sets up the coefficients
*
and loops through a quarter of the
*
rowsxcols section of the image that
*
is being warped.
*
*******************************************/
warp_loop(the_image, out_image,
x1, x2, x3, x4,
y1, y2, y3, y4,
extra_x, extra_y,
rows, cols)
int
extra_x, extra_y,
x1, x2, x3, x4,
y1, y2, y3, y4;
long
cols, rows;
short **the_image,
**out_image;
{
int
cols_div_2, denom, i, j, rows_div_2,
xa, xb, xab, x_out, ya, yb, yab, , y_out;
cols_div_2 = cols/2;
rows_div_2 = rows/2;
denom
= cols_div_2 * rows_div_2;
/***********************************
*
*
Set up the terms for the
*
spatial transformation.
*
***********************************/
xa = = x2 - x1;
xb = = x4 - x1;
xab = x1 - x2 + x3 - x4;
ya = = y2 - y1;
yb = = y4 - y1;
yab = y1 - y2 + y3 - y4;
648
APPENDIXF. SOURCECODELISTINGS
/***********************************
*
*
Loop through a quadrant t and
*
perform the spatial
*
transformation.
*
***********************************/
/* NOTE a=j b=i */
printf("\n");
for(i=0; i<rows_div_2; i++){
if( (i%10) == 0) printf("%d d ", , i);
for(j=0; j<cols_div_2; j++){
x_out = x1 + (xa*j)/cols_div_2 +
(xb*i)/rows_div_2 + + (xab*i*j)/(denom);
y_out = y1 + (ya*j)/cols_div_2 +
(yb*i)/rows_div_2 + + (yab*i*j)/(denom);
if(x_out < 0
||
x_out >= cols
||
y_out < 0
||
y_out >= rows)
out_image[i+extra_y][j+extra_x] = FILL;
else
out_image[i+extra_y][j+extra_x] =
the_image[y_out][x_out];
} /* * ends loop over j */
} /* * ends loop over i */
}
/* ends warp_loop */
/*******************************************
*
*
bi_warp_loop(..
*
*
This routine sets up the e coefficients
*
and loops through a quarter of the
Documents you may be interested
Documents you may be interested