add an option to set jpeg imagemaps quality

This commit is contained in:
Andrey A. Chernov 1999-03-25 03:29:08 +00:00
parent dddb6be03c
commit eb63173e8b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=17392
2 changed files with 60 additions and 10 deletions

View File

@ -1,5 +1,5 @@
--- webmagick.in.orig Sun Dec 20 01:03:12 1998
+++ webmagick.in Sun Feb 21 21:54:48 1999
+++ webmagick.in Thu Mar 25 05:12:58 1999
@@ -128,6 +128,7 @@
$opt_dircolorlink,
$opt_dircolorvlink,
@ -8,7 +8,15 @@
$opt_dirindexname,
$opt_forcecache,
$opt_forcegif,
@@ -268,6 +269,7 @@
@@ -157,6 +158,7 @@
$opt_imgindexname,
$opt_indexname,
$opt_javascript,
+ $opt_jpegquality,
$opt_mapnetscape,
$opt_maptype,
$opt_maxgif,
@@ -268,6 +270,7 @@
$opt_pageindexname = '.index'; # Base name of secondary index files
$opt_dirindexname = '.dirindex'; # Subdirectory Title cross-reference
# dirname Directory Title
@ -16,7 +24,15 @@
$opt_imgindexname = '.imgindex'; # Image name to label cross-reference file
#
@@ -660,6 +662,7 @@
@@ -310,6 +313,7 @@
$opt_forcemontage = 0; # Force montage (default off)
$opt_forcegif = 0; # Force GIF imagemaps (default off)
$opt_forcejpeg = 0; # Force JPEG imagemaps (default off)
+$opt_jpegquality = 70; # Quality for JPEG imagemaps
$opt_help = 0; # Display usage message
$opt_version = 0; # Display version info
$opt_htmlext = '.html'; # Use .shtml for SSI
@@ -660,6 +664,7 @@
'dircolorfore=s' => \$opt_dircolorfore,
'dircolorlink=s' => \$opt_dircolorlink,
'dircolorvlink=s' => \$opt_dircolorvlink,
@ -24,7 +40,15 @@
'dirindexname=s' => \$opt_dirindexname,
'footer=s' => \$opt_footer,
'forcecache!' => \$opt_forcecache,
@@ -936,7 +939,7 @@
@@ -680,6 +685,7 @@
'imgindexname=s' => \$opt_imgindexname,
'indexname=s' => \$opt_indexname,
'javascript!' => \$opt_javascript,
+ 'jpegquality=i' => \$opt_jpegquality,
'mapnetscape!' => \$opt_mapnetscape,
'maptype=s' => \$opt_maptype,
'maxgif=i' => \$opt_maxgif,
@@ -936,7 +942,7 @@
sub wanted {
my($dev,$ino,$mode,$nlink,$uid,$gid);
($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_);
@ -33,7 +57,7 @@
if( $_ ne '.' && get_rc_var('.', 'opt_prune', 0) ) {
$File::Find::prune=1;
# following funny logic is to avoid warnings about $prune
@@ -1426,6 +1429,7 @@
@@ -1426,6 +1432,7 @@
'dircolorfore' => $opt_dircolorfore,
'dircolorlink' => $opt_dircolorlink,
'dircolorvlink' => $opt_dircolorvlink,
@ -41,7 +65,7 @@
'dirindexname' => $opt_dirindexname,
'footer' => $opt_footer,
'framemarginwidth' => $opt_framemarginwidth,
@@ -1695,7 +1699,7 @@
@@ -1695,7 +1702,7 @@
sub writeTopIndexes {
print( STDERR "Writing Index Files ${opt_indexname} & ",
@ -50,7 +74,7 @@
if $opt_debug;
#---- Generate the Variables for Format Options ----
@@ -1806,7 +1810,7 @@
@@ -1806,7 +1813,7 @@
# Pull README into thumbnail frame if it exists, and is
# either marked always visible or there are no images.
#
@ -59,7 +83,7 @@
if( $opt_framefmt_frames{$opt_framestyle} <= 2 ) {
if( $haveReadme && ( $opt_readmevisible || ! $haveImages ) ) {
@@ -1924,8 +1928,8 @@
@@ -1924,8 +1931,8 @@
# ----- Output Frame Directory File (usally ".indexdir.html") ------
#
@ -70,7 +94,25 @@
" for output\n$@\n");
print( INDEX "<HTML>\n<HEAD>\n" );
print( INDEX " <TITLE>${pageTitle}</TITLE>\n" );
@@ -3412,6 +3416,7 @@
@@ -2762,7 +2769,7 @@
$status = $montage->Write(
filename=>"JPEG:$fileNames{'montageJPEG'}",
interlace=>'Plane',
- quality=>70
+ quality=>$opt_jpegquality
);
handleMagickError( __FILE__, __LINE__, $fileNames{'montageJPEG'}, $status) if "$status";
last MONTAGE if "$status";
@@ -3373,6 +3380,8 @@
Montage:
--forcegif Force imagemap to be in GIF format
+ --forcejpeg Force imagemap to be in JPEG format
+ --jpegquality Quality of JPEG imagemaps
--maxgif Maximum size of GIF imagemap before trying JPEG
--columns Montage columns
--rows Montage rows (max)
@@ -3412,6 +3421,7 @@
--dircolorfore Foreground color (directory frame)
--dircolorlink Link (unvisited) color (directory frame)
--dircolorvlink Link (visited) color (directory frame)

View File

@ -1,5 +1,5 @@
--- webmagickrc.in.orig Sun Dec 20 01:03:42 1998
+++ webmagickrc.in Sun Feb 21 21:59:18 1999
+++ webmagickrc.in Thu Mar 25 05:13:47 1999
@@ -41,6 +41,7 @@
# $opt_pageindexname = '.index'; # Base name of secondary index files
# $opt_dirindexname = '.dirindex'; # Subdirectory Title cross-reference
@ -8,3 +8,11 @@
# $opt_imgindexname = '.imgindex'; # Image name to label cross-reference file
#
@@ -83,6 +84,7 @@
# $opt_forcemontage = 0; # Force montage (default off)
# $opt_forcegif = 0; # Force GIF imagemaps (default off)
# $opt_forcejpeg = 0; # Force JPEG imagemaps (default off)
+# $opt_jpegquality = 70; # Quality of JPEG imagemaps
# $opt_help = 0; # Display usage message
# $opt_version = 0; # Display version info
# $opt_htmlext = '.html'; # Use .shtml for SSI