Changeset 122
- Timestamp:
- 02/07/06 01:24:34 (3 years ago)
- Files:
-
- fastphoto/trunk/fastphoto.1 (modified) (2 diffs)
- fastphoto/trunk/src/cgi.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fastphoto/trunk/fastphoto.1
r117 r122 17 17 desired size, and avoids colorspace conversions (unless converting color 18 18 images to grayscale). 19 .PP 20 fastphoto preserves the aspect of the original file unless both width and 21 height options are specified. 19 22 20 23 .SH "COMMANDLINE OPTIONS" … … 58 61 .SH "SERVER CONFIGURATION" 59 62 fastphoto can be installed as a handler for files of type image/jpeg. 60 The following configuration directive is for Apache httpd:63 The following configuration directives are for Apache httpd. 61 64 62 65 ScriptAlias /fastphoto /usr/bin/fastphoto 63 66 Action image/jpeg /fastphoto 64 67 68 .SH "CGI PARAMETERS" 69 .TP 70 \fB\?x\fR, \fB\?width\fR 71 \fB\?y\fR, \fB\?height\fR 72 \fB\?s\fR, \fB\?scale\fR 73 \fB\?q\fR, \fB\?quality\fR 74 \fB\?g\fR, \fB\?gray\fR 75 76 .SH "EXAMPLES" 77 http://www.example.com/photo.jpg?scale=10% 78 http://www.example.com/photo.jpg?x=120 79 http://www.example.com/photo.jpg?x=120&y=10 80 http://www.example.com/photo.jpg?q=20 81 http://www.example.com/photo.jpg?x=120&q=20 82 http://www.example.com/photo.jpg?gray 83 http://www.example.com/photo.jpg?x=120&gray 65 84 .SH "SEE ALSO" 66 85 httpd(8), apache(8) fastphoto/trunk/src/cgi.c
r120 r122 13 13 set_param (fastphoto_t * params, char * key, char * val) 14 14 { 15 if (!strcmp ("x", key)) params->x = atoi(val); 16 if (!strcmp ("y", key)) params->y = atoi(val); 17 if (!strcmp ("scale", key)) params->scale = atoi(val); 18 if (!strcmp ("gray", key)) params->gray = 1; 19 if (!strcmp ("quality", key)) params->quality = atoi(val); 20 if (!strcmp ("q", key)) params->quality = atoi(val); 15 if (!strncmp ("x", key, 2)) params->x = atoi(val); 16 if (!strncmp ("width", key, 6)) params->x = atoi(val); 17 18 if (!strncmp ("y", key, 2)) params->y = atoi(val); 19 if (!strncmp ("height", key, 7)) params->y = atoi(val); 20 21 if (!strncmp ("s", key, 2)) params->y = atoi(val); 22 if (!strncmp ("scale", key, 6)) params->scale = atoi(val); 23 24 if (!strncmp ("g", key, 2)) params->gray = 1; 25 if (!strncmp ("gray", key, 5)) params->gray = 1; 26 27 if (!strncmp ("quality", key, 8)) params->quality = atoi(val); 28 if (!strncmp ("q", key, 2)) params->quality = atoi(val); 21 29 } 22 30
