]> git.imager.perl.org - imager.git/commitdiff
- added sample code for handling images uploaded via a HTML form.
authorTony Cook <tony@develop=help.com>
Tue, 12 Apr 2005 14:41:28 +0000 (14:41 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 12 Apr 2005 14:41:28 +0000 (14:41 +0000)
Changes
MANIFEST
TODO
lib/Imager/Cookbook.pod
samples/README

diff --git a/Changes b/Changes
index 2c15634291d0fdb9ded07ffa1be4639aaab42f9b..171951fdd1a2c69f590e40707154d77d1ecb0596 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1046,6 +1046,7 @@ Revision history for Perl extension Imager.
   demonstrate displaying a generated image on a HTML page.
 - Makefile.PL now adds rules to generate a suitable META.yml to the
   generated Makefile.
   demonstrate displaying a generated image on a HTML page.
 - Makefile.PL now adds rules to generate a suitable META.yml to the
   generated Makefile.
+- added sample code for handling images uploaded via a HTML form.
 
 =================================================================
 
 
 =================================================================
 
index aa00c1a2c9cc5df50bd05b5ee1b006c1e74e62d1..ecf42e7db915ccf399cd2f503f7b55f143c656fa 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -108,6 +108,10 @@ samples/anaglyph.pl
 samples/interleave.pl
 samples/samp-form.cgi
 samples/samp-image.cgi
 samples/interleave.pl
 samples/samp-form.cgi
 samples/samp-image.cgi
+samples/samp-scale.cgi  Demonstrate image upload via a HTML form
+samples/samp-scale.html Form for samp-scale.cgi
+samples/samp-tags.cgi   Demonstrate image upload via a HTML form
+samples/samp-tags.html  Form for samp-tags.cgi
 spot.perl      For making an ordered dither matrix from a spot function
 stackmach.c
 stackmach.h
 spot.perl      For making an ordered dither matrix from a spot function
 stackmach.c
 stackmach.h
diff --git a/TODO b/TODO
index 5826665bd7d64abd86eaabeee283472e2bfbdecd..936a3710055276ff3785db500c2195a7a7118082 100644 (file)
--- a/TODO
+++ b/TODO
@@ -10,11 +10,11 @@ not commitments.
 - audit pnm.c (done)
 - audit tga.c (done)
 - audit rgb.c and add tests
 - audit pnm.c (done)
 - audit tga.c (done)
 - audit rgb.c and add tests
-- add META.yml (bypass EU::MM's limited mechanism)
+- add META.yml (bypass EU::MM's limited mechanism) (done)
 - implement i_incomplete for bmp files
 - check if freetype 2 is faster/slower than freetype 1 with Imager's glyph
   caching.  If FT1 is faster, add caching as a TODO for FT2.
 - implement i_incomplete for bmp files
 - check if freetype 2 is faster/slower than freetype 1 with Imager's glyph
   caching.  If FT1 is faster, add caching as a TODO for FT2.
-- add sample CGI that handles an uploaded image
+- add sample CGI that handles an uploaded image (done)
 - examples for fountain filter in Imager::Filters
 - allow Imager::Fountain to take color descriptions (eg. blue, FF000)
   instead of color objects for c0 and c1.
 - examples for fountain filter in Imager::Filters
 - allow Imager::Fountain to take color descriptions (eg. blue, FF000)
   instead of color objects for c0 and c1.
index b82f6970c647ce824d55d6961851e9d7854ff85f..6ec76ab980c8151160d0b76852278f7bf69d409a 100644 (file)
@@ -142,6 +142,9 @@ scalar as a buffer:
   binmode STDOUT;
   print $data;
 
   binmode STDOUT;
   print $data;
 
+See C<samples/samp-scale.cgi> and C<samples/samp-image.cgi> for a
+couple of simple examples of producing an image from CGI.
+
 =head2 Inserting a CGI image in a page
 
 There's occasionally confusion on how to display an image generated by
 =head2 Inserting a CGI image in a page
 
 There's occasionally confusion on how to display an image generated by
@@ -220,6 +223,9 @@ have Imager read the image
   }
   # else, the user didn't select a file
 
   }
   # else, the user didn't select a file
 
+See C<samples/samp-scale.cgi> and C<samples/samp-tags.cgi> in the
+Imager distribution for example code.
+
 =head1 DRAWING
 
 =head1 TEXT
 =head1 DRAWING
 
 =head1 TEXT
index 959d2e3bc5fc6f9217ad391ab6d83c5665e84bdb..e2a27e8d7c44399b1106384ee5b37eca8abee190 100644 (file)
@@ -28,3 +28,25 @@ samp-image.cgi
 
   The POD for this sample discusses alternate approaches and security
   considerations.
 
   The POD for this sample discusses alternate approaches and security
   considerations.
+
+samp-scale.html
+samp-scale.cgi
+
+  Example that demonstrates reading an image uploaded via a HTML form.
+
+  Produces an output image scaled to fit inside 200x200.
+
+samp-tags.html
+samp-tags.cgi
+
+  Example that demonstrates reading an image uploaded via a HTML form.
+
+  Produces a text/plain report of the tags that Imager defined for the
+  image.
+
+  This and the previous sample are very similar, the intent is to show
+  the common elements and to demonstrate that the output is independent
+  of the input.
+
+  See the section "Parsing an image posted via CGI" in Imager::Cookbook
+  for cautions and details on reading uploaded images.