aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2009-07-24 15:40:17 -0400
committerRalph Amissah <ralph@amissah.com>2009-07-24 16:01:13 -0400
commit39e72afa0efa19a0dd94cff40ecd465162c3d379 (patch)
tree2a1b290e1e7b356fe0f984f5b6149cb06bb76495
parentmanifest, include book index if available (diff)
dal images, if no rmagick, system call imagemagick directly if available
-rw-r--r--CHANGELOG14
-rw-r--r--conf/sisu/version1.yml6
-rw-r--r--lib/sisu/v1/dal_images.rb27
3 files changed, 37 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index afb4ce0d..81c56dac 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,7 +9,19 @@ Reverse Chronological:
%% STABLE MANIFEST
-%% sisu_0.71.0.orig.tar.gz (2009-07-09(:27/4)
+%% sisu_0.71.1.orig.tar.gz (2009-07-24:29/5)
+http://www.jus.uio.no/sisu/pkg/src/sisu_0.71.1.orig.tar.gz
+ sisu_0.71.1.orig.tar.gz
+ sisu_0.71.1-1.dsc
+ sisu_0.71.1-1.diff.gz
+
+ * dal images, if no rmagick, system call imagemagick directly if available
+
+ * manifest, include book index if available
+
+ * html scroll css, left margin
+
+%% sisu_0.71.0.orig.tar.gz (2009-07-09:27/4)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.71.0.orig.tar.gz
5fa480544ae30d2e2e21064cb505e3c72a467a4ca8018fd1c51ec485ff5b668e 1548373 sisu_0.71.0.orig.tar.gz
25f9c4109b361153f325b97e6e48baae702cd889aa7535c2efa3070867117243 1151 sisu_0.71.0-1.dsc
diff --git a/conf/sisu/version1.yml b/conf/sisu/version1.yml
index cf07a607..9cc20a57 100644
--- a/conf/sisu/version1.yml
+++ b/conf/sisu/version1.yml
@@ -1,5 +1,5 @@
---
-:version: 0.71.1-pre
-:date_stamp: 2009w29/4
-:date: "2009-07-23"
+:version: 0.71.1
+:date_stamp: 2009w29/5
+:date: "2009-07-24"
:project: SiSU
diff --git a/lib/sisu/v1/dal_images.rb b/lib/sisu/v1/dal_images.rb
index 621ac986..67893025 100644
--- a/lib/sisu/v1/dal_images.rb
+++ b/lib/sisu/v1/dal_images.rb
@@ -65,16 +65,21 @@ module SiSU_images
data=@data
tuned_file=[]
@rmgk=false
- if SiSU_Env::Info_settings.new.program?('rmagick'); @rmgk=SiSU_Env::Load.new('RMagick').prog
- else tell=SiSU_Screen::Ansi.new(@md.cmd,'use of RMagick is not enabled in sisurc.yml')
- tell.warn if @md.cmd =~/[vVM]/
+ imagemagick_=SiSU_Env::Info_settings.new.program?('rmagick')
+ if imagemagick_
+ @rmgk=SiSU_Env::Load.new('RMagick').prog
+ else
+ if @md.cmd =~/[vVM]/
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'use of RMagick is not enabled in sisurc.yml')
+ tell.warn
+ end
end
data.each do |para|
para.strip!
if para =~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\S+|image)/
if para !~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)\s+\d+x\d+\s+/
m=/#{Mx[:lnk_o]}\s*(\S+\.(?:png|jpg|gif))/
- if @rmgk
+ if imagemagick_
imgs=para.scan(m).flatten
images=imgs.each do |image|
dir=SiSU_Env::Info_env.new(@md.fns)
@@ -84,8 +89,18 @@ module SiSU_images
break if FileTest.exist?("#{image_path}/#{image}")
end
if FileTest.exist?("#{image_path}/#{image}")
- img=Magick::ImageList.new("#{image_path}/#{image}")
- img_col,img_row=img.columns,img.rows
+ if @rmgk
+ img=Magick::ImageList.new("#{image_path}/#{image}")
+ img_col,img_row=img.columns,img.rows
+ else
+ if @md.cmd =~/[vVM]/
+ tell=SiSU_Screen::Ansi.new(@md.cmd,'RMagick not present, will attempt to use imagemagick (identify) directly')
+ tell.warn
+ end
+ imgsys=`identify #{image_path}/#{image}`.strip #system call
+ 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
if img_col > img_row #landscape
if img_col> 640 #480
img_col=640 #480