fix a bug in creating scaled images. If the original image is the correct

size and in the correct format, it is not re-encoded (losing quality)
anymore but just copied.

Problem noted by Jeff McMahill.  Andrew Brown and Jaromir Dolecek helped
me with perl.

Bump PKGREVISION.
This commit is contained in:
dmcmahill 2002-07-31 14:34:01 +00:00
parent 91094709a0
commit 7b4a6cfcb5
3 changed files with 17 additions and 12 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.4 2002/07/30 09:46:32 dmcmahill Exp $
# $NetBSD: Makefile,v 1.5 2002/07/31 14:34:01 dmcmahill Exp $
#
DISTNAME= bins-1.1.10
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= www graphics
MASTER_SITES= http://jsautret.free.fr/BINS/
EXTRACT_SUFX= .tar.bz2

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.3 2002/07/30 09:46:32 dmcmahill Exp $
$NetBSD: distinfo,v 1.4 2002/07/31 14:34:01 dmcmahill Exp $
SHA1 (bins-1.1.10.tar.bz2) = 7ed3889654cefa264d22e3b136669701c5f3a9d3
Size (bins-1.1.10.tar.bz2) = 98777 bytes
SHA1 (patch-aa) = b524283550d5c29bbb1a7621951ea392faa0983c
SHA1 (patch-aa) = 290d84dfcb8c57e4da0528d845f27f2350ec0008
SHA1 (patch-ab) = 3109680a859da8499a6b14406aeddbb06536c0fa

View file

@ -1,18 +1,15 @@
$NetBSD: patch-aa,v 1.2 2002/07/30 09:46:33 dmcmahill Exp $
$NetBSD: patch-aa,v 1.3 2002/07/31 14:34:02 dmcmahill Exp $
--- bins.orig Sun Jun 9 15:54:12 2002
+++ bins
@@ -218,7 +218,7 @@
# any new options need corresponding new documentation.
+++ bins Wed Jul 31 10:27:02 2002
@@ -219,5 +219,5 @@
# The following parameters cannot be set in config files for now :
- globalConfigDir => "/etc/bins", # System wide
+ globalConfigDir => "@pkgsysconfdir@/bins", # System wide
# configuration directory.
userConfigDir => "~/.bins", # User configuration directory
configFileName => "binsrc", # Configuration file.
@@ -237,13 +237,14 @@
@@ -238,11 +238,12 @@
);
-# normally, you don't have to touch that...
@ -32,4 +29,12 @@ $NetBSD: patch-aa,v 1.2 2002/07/30 09:46:33 dmcmahill Exp $
+# }
my $local2htmlConverter;
if ($defaultConfig{defaultEncoding} ne $defaultConfig{htmlEncoding}){
$local2htmlConverter = Text::Iconv->new($defaultConfig{defaultEncoding},
@@ -2369,6 +2370,7 @@
warn "$x" if "$x";
+ my($srcformat) = $preview->Get("magick");
if (!$configHash->{scaleIfSameSize}
- and grep (/^$preview->Get("magick")$/, @webFormats ) ) {
+ and grep (/^$srcformat$/, @webFormats ) ) {
my ($width, $height) = $preview->Get("width", "height");
if ($width == $newWidth && $height == $newHeight) {