aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-08 11:35:43 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-08 11:36:15 -0400
commitc7f4ff94b232adac607f0a8ad4ca00ee619a4bec (patch)
tree37dc9d913e40bd79e64f8ec68699def7d009c0cb /lib
parentsha256 (2.7.3) (diff)
texpdf, scaling of images (below the set max size), fix (+changelog)
(requested fix)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/texpdf_format.rb4
1 files changed, 2 insertions, 2 deletions
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)