<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 13, 2016 at 3:23 PM, David Christensen <span dir="ltr"><<a href="mailto:interchange-cvs@icdevgroup.org" target="_blank">interchange-cvs@icdevgroup.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">commit c5ee9b0690521ccf54c6a186b9841a868a018b92<br>
Author: David Christensen <<a href="mailto:david@endpoint.com">david@endpoint.com</a>><br>
Date: Fri May 13 14:22:48 2016 -0500<br>
<br>
Revert "Add image file check mechanism to verify file type before passing to"<br>
<br>
Per discussion, this is not Interchange's responsibility.<br>
<br></blockquote><div><br></div><div>Since the image tag does call "mogrify", I would argue that it is the Image tag's responsibility. <br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This reverts commit 68d34396df797232e005e5bd164a1b8e72779bb6.<br>
<br>
code/SystemTag/image.tag | 29 +++--------------------------<br>
1 files changed, 3 insertions(+), 26 deletions(-)<br>
---<br>
diff --git a/code/SystemTag/image.tag b/code/SystemTag/image.tag<br>
index f7ec938..6d4de2a 100644<br>
--- a/code/SystemTag/image.tag<br>
+++ b/code/SystemTag/image.tag<br>
@@ -9,15 +9,13 @@ UserTag image Order src<br>
UserTag image AttrAlias geometry makesize<br>
UserTag image AttrAlias resize makesize<br>
UserTag image AddAttr<br>
-UserTag image Version 1.27<br>
+UserTag image Version 1.26<br>
UserTag image Routine <<EOR<br>
sub {<br>
my ($src, $opt) = @_;<br>
my ($image, $path, $secure, $sku);<br>
my ($imagedircurrent, $imagedir, $imagedirsecure);<br>
<br>
- use Image::Size;<br>
-<br>
my @descriptionfields = grep /\S/, split /\s+/,<br>
$opt->{descriptionfields} || $::Variable->{DESCRIPTIONFIELDS} || $Vend::Cfg->{DescriptionField};<br>
@descriptionfields = qw( description ) if ! @descriptionfields;<br>
@@ -30,22 +28,6 @@ sub {<br>
my $filere = qr/\.\w{2,4}$/;<br>
my $absurlre = qr!^(?i:https?)://!;<br>
<br>
- my $verify_image = sub {<br>
- my $file = shift;<br>
-<br>
- return unless -f $file;<br>
-<br>
- my ($imgx, $imgy, $error) = imgsize($file);<br>
-<br>
- if(! $imgx) {<br>
- ::logError("Image::Size error on verify-image: $error");<br>
- return undef;<br>
- }<br>
-<br>
- return 1 if ($error =~ /(jpg|jpeg|gif|png|bmp|tif|ico|xbm)/i);<br>
- return undef;<br>
- };<br>
-<br>
if ($opt->{ui}) {<br>
# unless no image dir specified, add locale string<br>
my $locale = $Scratch->{mv_locale} ? $Scratch->{mv_locale} : 'en_US';<br>
@@ -240,12 +222,6 @@ sub {<br>
}<br>
}<br>
last MOGIT unless $exec;<br>
-<br>
- unless ($verify_image->($newpath)){<br>
- logError("Image file not valid image:%s", $newpath);<br>
- last MOGIT;<br>
- }<br>
-<br>
system qq{$exec -geometry "$siz" '$newpath'};<br>
if($?) {<br>
logError("%s: Unable to mogrify image '%s'", 'image tag', $newpath);<br>
@@ -265,7 +241,8 @@ sub {<br>
<br>
if ($opt->{getsize} and $path) {<br>
eval {<br>
- my ($width, $height) = imgsize($path);<br>
+ require Image::Size;<br>
+ my ($width, $height) = Image::Size::imgsize($path);<br>
$opt->{height} = $height<br>
if defined($height) and not exists($opt->{height});<br>
$opt->{width} = $width<br>
<br>
_______________________________________________<br>
interchange-cvs mailing list<br>
<a href="mailto:interchange-cvs@icdevgroup.org">interchange-cvs@icdevgroup.org</a><br>
<a href="http://www.icdevgroup.org/mailman/listinfo/interchange-cvs" rel="noreferrer" target="_blank">http://www.icdevgroup.org/mailman/listinfo/interchange-cvs</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">The problem with Internet quotations is that many of them<br>are not genuine. -- Abraham Lincoln<br></div>
</div></div>