aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG15
-rw-r--r--conf/sisu/version1.yml6
-rw-r--r--lib/sisu/v1/dal_images.rb15
3 files changed, 26 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 34026118..82c5ba59 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,11 +9,20 @@ Reverse Chronological:
%% STABLE MANIFEST
+%% sisu_0.71.3.orig.tar.gz (2009-08-28:34/5)
+http://www.jus.uio.no/sisu/pkg/src/sisu_0.71.3.orig.tar.gz
+ sisu_0.71.3.orig.tar.gz
+ sisu_0.71.3-1.dsc
+ sisu_0.71.3-1.diff.gz
+
+ * fix to use imagemagick directly (when imagemagick is available and rmagick
+ declares versions not in sync)
+
%% sisu_0.71.2.orig.tar.gz (2009-08-02:30/7)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.71.2.orig.tar.gz
- sisu_0.71.2.orig.tar.gz
- sisu_0.71.2-1.dsc
- sisu_0.71.2-1.diff.gz
+ 220199cbc435ec6d246af4ac43a2ef6a3e05f649847c4ee04b831af1e8ad4902 1548875 sisu_0.71.2.orig.tar.gz
+ ec3fae1599112343d69f2843a09acb583653bc174e65589f4c3bbc52ef66d4fb 1151 sisu_0.71.2-1.dsc
+ bbc4264049d4e6c147dd77b9b41774bcb421ce5bffeb5801872f5520f9967fba 151350 sisu_0.71.2-1.diff.gz
* fixes
* html book index, batch processing fix, re-initialize variable after use
diff --git a/conf/sisu/version1.yml b/conf/sisu/version1.yml
index 63106385..b0cb9aee 100644
--- a/conf/sisu/version1.yml
+++ b/conf/sisu/version1.yml
@@ -1,5 +1,5 @@
---
-:version: 0.71.2
-:date_stamp: 2009w30/7
-:date: "2009-08-02"
+:version: 0.71.3
+:date_stamp: 2009w34/5
+:date: "2009-08-28"
:project: SiSU
diff --git a/lib/sisu/v1/dal_images.rb b/lib/sisu/v1/dal_images.rb
index 67893025..1882aea5 100644
--- a/lib/sisu/v1/dal_images.rb
+++ b/lib/sisu/v1/dal_images.rb
@@ -67,7 +67,11 @@ module SiSU_images
@rmgk=false
imagemagick_=SiSU_Env::Info_settings.new.program?('rmagick')
if imagemagick_
- @rmgk=SiSU_Env::Load.new('RMagick').prog
+ begin
+ @rmgk=SiSU_Env::Load.new('RMagick').prog
+ rescue
+ @rmgk=false
+ end
else
if @md.cmd =~/[vVM]/
tell=SiSU_Screen::Ansi.new(@md.cmd,'use of RMagick is not enabled in sisurc.yml')
@@ -81,6 +85,7 @@ module SiSU_images
m=/#{Mx[:lnk_o]}\s*(\S+\.(?:png|jpg|gif))/
if imagemagick_
imgs=para.scan(m).flatten
+ img_col=img_row=nil
images=imgs.each do |image|
dir=SiSU_Env::Info_env.new(@md.fns)
path_image=[dir.path.image_source_local_tex,dir.path.image_source_remote_tex,dir.path.image_source_tex]
@@ -101,19 +106,21 @@ module SiSU_images
img_col,img_row=/(\d+)x(\d+)/m.match(imgsys)[1,2]
img_col,img_row=img_col.to_i,img_row.to_i
end
+ row=(img && defined? img.rows) ? img.rows : img_row
+ col=(img && defined? img.columns) ? img.columns : img_col
if img_col > img_row #landscape
if img_col> 640 #480
img_col=640 #480
- img_row=((1.00*img_col/img.columns)*img.rows).round
+ img_row=((1.00*img_col/col)*row).round
end
else #portrait
if img_col> 640 #480
img_col=640 #480
- img_row=((1.00*img_col/img.columns)*img.rows).round
+ img_row=((1.00*img_col/col)*row).round
end
if img_row > 640
img_row=640
- img_col=((1.00*img_row/img.rows)*img.columns).round
+ img_col=((1.00*img_row/row)*col).round
end
end
para.gsub!(/(#{image})/,"#{image} #{img_col}x#{img_row}")