Author: ralfbecker
New Revision: 55186
URL: http://svn.stylite.de/viewvc/egroupware?rev=55186&view=rev
Log:
use svg image itself as thumbnail
Modified:
trunk/etemplate/thumbnail.php
trunk/phpgwapi/js/jsapi/egw_images.js
— trunk/etemplate/thumbnail.php (original)
+++ trunk/etemplate/thumbnail.php Mon Feb 29 14:05:48 2016
@@ -300,9 +300,9 @@
function gd_image_load($file,$maxw,$maxh)
{
// Get mime type
- list($type, $image_type) = explode(’/’, egw_vfs::mime_content_type($file));
- list($type, $image_type) = explode(’/’, $mime = egw_vfs::mime_content_type($file));
// if $file is not from vfs, use mime_magic::filename2mime to get mime-type from extension
- if (!$type) list($type, $image_type) = explode(’/’, mime_magic::filename2mime($file));
-
if (!$type) list($type, $image_type) = explode(’/’, $mime = mime_magic::filename2mime($file));
// Call the according gd constructor depending on the file type
if($type == ‘image’)
@@ -321,6 +321,10 @@
return imagecreatefromgif($file);
case ‘bmp’:
return imagecreatefromwbmp($file);
-
case 'svg+xml':
-
html::content_header(egw_vfs::basename($file), $mime);
-
readfile($file);
-
common::egw_exit();
}
}
else if ($type == ‘application’)
— trunk/phpgwapi/js/jsapi/egw_images.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_images.js Mon Feb 29 14:05:48 2016
@@ -150,6 +150,11 @@
if (_mtime) params.mtime = _mtime;
image = this.link(’/etemplate/thumbnail.php’, params);
}
-
// for svg return image itself
-
else if (type[0] == 'image' && type[1] == 'svg+xml')
-
{
-
image = this.webserverUrl+'/webdav.php'+_path;
-
}
else
{
if ((typeof type[1] == 'undefined' || !(image = this.image('mime'+_size+'_'+type[0]+'_'+type[1], 'etemplate')) &&
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs