summaryrefslogtreecommitdiff
path: root/downImg.cgi
diff options
context:
space:
mode:
authoryo mama <pepper@scannerjammer.com>2015-02-12 19:33:18 -0800
committeryo mama <pepper@scannerjammer.com>2015-02-12 19:33:18 -0800
commit57ad852b6e7e337b7a86d2f85ac95b480898b057 (patch)
treee5192eb68c0e929ca276f821756b4952727c2787 /downImg.cgi
parent7270ca308cad6dd87744472a8bfe37ab9d342bf0 (diff)
working
Diffstat (limited to 'downImg.cgi')
-rw-r--r--downImg.cgi56
1 files changed, 0 insertions, 56 deletions
diff --git a/downImg.cgi b/downImg.cgi
deleted file mode 100644
index 8eb37a1..0000000
--- a/downImg.cgi
+++ /dev/null
@@ -1,56 +0,0 @@
-my $outputDir="d:/Programe/Apache Server/htdocs/landscape/img";
-##---------------------------------------------------------------------------------------
-##GET THE URLS FROM THE HTTP POST REQUEST
-##---------------------------------------------------------------------------------------
-my $query = new CGI;
-##Get texture url
-my $texture = $query->param("texture");
-if ( !$texture )
- {
- ##Problem retrieving the data
- print $query->header ( );
- print "no";
- exit;
- }
-##Get heigthmap url
-my $heightmap = $query->param("heightmap");
-if ( !$heightmap )
- {
- ##Problem retrieving the data
- print $query->header ( );
- print "no";
- exit;
- }
-
-##---------------------------------------------------------------------------------------
-##DOWNLOAD THE PICTURES TO THE OUTPUT DIR
-##---------------------------------------------------------------------------------------
-##Get texture
-getstore($texture, "$outputDir/Texture_orig.jpg");
-
-##Resize texture to 256x256
-my $image = Image::Resize->new("$outputDir/Texture_orig.jpg");
-my $gd = $image->resize(256, 256);
-open(IMG,">$outputDir/Texture.jpg");
-binmode IMG;
-print IMG $gd->jpeg;
-close IMG;
-
-##Get heightmap
-getstore($heightmap, "$outputDir/Heightmap_orig.jpg");
-
-##Resize heightmap to 256x256
-my $image = Image::Resize->new("$outputDir/Heightmap_orig.jpg");
-my $gd = $image->resize(256, 256, 0);
-open(IMG,">$outputDir/Heightmap.jpg");
-binmode IMG;
-print IMG $gd->jpeg;
-close IMG;
-
-
-##---------------------------------------------------------------------------------------
-##PRINT SUCCESS IN HTML FORMAT
-##---------------------------------------------------------------------------------------
-print $query->header ( );
-print "yes";
-exit;