diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-10-08 11:35:43 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-10-08 11:36:15 -0400 |
commit | c7f4ff94b232adac607f0a8ad4ca00ee619a4bec (patch) | |
tree | 37dc9d913e40bd79e64f8ec68699def7d009c0cb | |
parent | sha256 (2.7.3) (diff) |
texpdf, scaling of images (below the set max size), fix (+changelog)
(requested fix)
-rw-r--r-- | CHANGELOG_v2 | 12 | ||||
-rw-r--r-- | data/doc/sisu/v2/CHANGELOG | 12 | ||||
-rw-r--r-- | lib/sisu/v2/texpdf_format.rb | 4 |
3 files changed, 26 insertions, 2 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2 index 1b2fb3d5..d1fb5136 100644 --- a/CHANGELOG_v2 +++ b/CHANGELOG_v2 @@ -12,6 +12,17 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.7.4.orig.tar.gz (2010-10-08:40/5) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.4.orig.tar.gz + sisu_2.7.4.orig.tar.gz + sisu_2.7.4-1.dsc + sisu_2.7.4-1.diff.gz + + [debian freeze, fix] + + * texpdf, scaling of images (below the set maximum size), fix + (requested fix) + %% 2.7.3.orig.tar.gz (2010-10-06:40/3) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.3.orig.tar.gz 01da42186d8b7381356739ef612221b55e93c9a4f94c431744f8bdb123fd8f15 2744721 sisu_2.7.3.orig.tar.gz @@ -27,6 +38,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.3.orig.tar.gz * dal_images, where image dimensions are set in an object, use those, (rather than those determined by imagemagick or graphicsmagick). [note: all must be set in an object, or none] + (requested fix) * options, a few aliases added (long options) diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG index a0e291f0..9c98d229 100644 --- a/data/doc/sisu/v2/CHANGELOG +++ b/data/doc/sisu/v2/CHANGELOG @@ -12,6 +12,17 @@ Reverse Chronological: %% Development branch UNSTABLE +%% 2.7.4.orig.tar.gz (2010-10-08:40/5) +http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.4.orig.tar.gz + sisu_2.7.4.orig.tar.gz + sisu_2.7.4-1.dsc + sisu_2.7.4-1.diff.gz + + [debian freeze, fix] + + * texpdf, scaling of images (below the set maximum size), fix + (requested fix) + %% 2.7.3.orig.tar.gz (2010-10-06:40/3) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.3.orig.tar.gz 01da42186d8b7381356739ef612221b55e93c9a4f94c431744f8bdb123fd8f15 2744721 sisu_2.7.3.orig.tar.gz @@ -27,6 +38,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.3.orig.tar.gz * dal_images, where image dimensions are set in an object, use those, (rather than those determined by imagemagick or graphicsmagick). [note: all must be set in an object, or none] + (requested fix) * options, a few aliases added (long options) diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb index 8eff07b9..36366c9b 100644 --- a/lib/sisu/v2/texpdf_format.rb +++ b/lib/sisu/v2/texpdf_format.rb @@ -339,7 +339,7 @@ module SiSU_TeX_Pdf image=z[/(\S+?\.(?:png|jpg|gif)\b)/m] image.gsub!(/\\/,'') width=if z =~ /\d+x\d*/ - w=(z[/(\d+)x\d*/,1]).to_i + w=(z[/\s(\d+)x\d*/,1]).to_i w*0.8 else '100' #revisit, is bug for small images/icons end @@ -498,7 +498,7 @@ module SiSU_TeX_Pdf and images_hash[ps]=~/\s+\d+x\d+(\s+|\s*#{Mx[:lnk_c]})/m image,x,y=z.scan(/\S+/) image.gsub!(/\\/,'') - w=((z =~/(\d+)x\d*/) ? z[/(\d+)x\d*/,1] : 200) + w=((z =~/\s(\d+)x\d*/) ? z[/\s(\d+)x\d*/,1] : 200) width={} width['a4'] = ((w.to_i > @dm['a4']) ? @dm['a4'] : w) width['letter'] = ((w.to_i > @dm['letter']) ? @dm['letter'] : w) |