[wellwell-devel] [SCM] Interchange wellwell catalog branch, master, updated. 17e85881a095d990b6f800fc03629c43ac696a7f

Stefan Hornburg racke at rt.icdevgroup.org
Thu May 6 13:37:14 UTC 2010


       via  17e85881a095d990b6f800fc03629c43ac696a7f (commit)
      from  2af41d33cd91da50e1bebe1e9cd23ffce1194057 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 17e85881a095d990b6f800fc03629c43ac696a7f
Author: Rok Ružič <rok.ruzic at informa.si>
Date:   Thu May 6 15:28:27 2010 +0200

    [image-info]: Colors can be retrieved with hash option as well now.

-----------------------------------------------------------------------

Summary of changes and diff:
 lib/Vend/Picture.pm |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/Vend/Picture.pm b/lib/Vend/Picture.pm
index 6a3a7f2..27cb0f9 100644
--- a/lib/Vend/Picture.pm
+++ b/lib/Vend/Picture.pm
@@ -1,6 +1,7 @@
 # Vend::Picture - Interchange image helper functions
 #
 # Copyright (C) 2004-2009 Stefan Hornburg (Racke) <racke at linuxia.de>.
+# Copyright (C) 2010 Rok Ružič <rok.ruzic at informa.si>.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +53,7 @@ Vend::Config::parse_tag('UserTag', 'image_superscribe MapRoutine Vend::Picture::
 
 sub info {
 	my ($name, $opts) = @_;
-	my ($width, $height, $type);
+	my ($width, $height, $type, $colors);
 	my (@ret, %info);
 
 	if ($opts->{colors}) {
@@ -62,7 +63,8 @@ sub info {
 			return;
 		}
 
-		return $image->Get('colors');
+		$colors = $image->Get('colors');
+		return $colors unless($opts->{hash});
 	}
 	
 	# first retrieve information about the image
@@ -94,6 +96,7 @@ sub info {
 
 	# return requested information
 	if ($opts->{hash}) {
+		$info{colors} = $colors if $opts->{colors};
 		return \%info;
 	}
 	


hooks/post-receive
-- 
Interchange wellwell catalog



More information about the wellwell-devel mailing list