Changeset 15346 for extensions/Histogram
- Timestamp:
- May 27, 2012, 2:06:02 PM (13 years ago)
- Location:
- extensions/Histogram
- Files:
-
- 1 added
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Histogram/hgram_aip.class.inc.php
r8509 r15346 39 39 $this->tabsheet->add('config', 40 40 l10n('hgram_config'), 41 $this->getAdminLink()." &f_tabsheet=config");41 $this->getAdminLink()."-config"); 42 42 } 43 43 … … 54 54 { 55 55 parent::initEvents(); 56 if($_ REQUEST['f_tabsheet']=='search')56 if($_GET['tab']=='search') 57 57 { 58 58 // load request builder JS only on the search page … … 72 72 $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/hgram_admin.tpl"); 73 73 74 switch($_ REQUEST['f_tabsheet'])74 switch($_GET['tab']) 75 75 { 76 76 case 'config': … … 79 79 } 80 80 81 $this->tabsheet->select($_ REQUEST['f_tabsheet']);81 $this->tabsheet->select($_GET['tab']); 82 82 $this->tabsheet->assign(); 83 83 $selected_tab=$this->tabsheet->get_selected(); … … 97 97 protected function checkRequest() 98 98 { 99 if(!isset($_ REQUEST['f_tabsheet'])) $_REQUEST['f_tabsheet']='config';99 if(!isset($_GET['tab'])) $_GET['tab']='config'; 100 100 101 if(!($_ REQUEST['f_tabsheet']=='config')) $_REQUEST['f_tabsheet']='config';101 if(!($_GET['tab']=='config')) $_GET['tab']='config'; 102 102 } 103 103 -
extensions/Histogram/hgram_histogram.class.inc.php
r8511 r15346 18 18 if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 19 19 20 define('MAX_PIXELS_ANALYZED', 1000000); 20 21 21 22 … … 92 93 $imageHeight=imagesy($image); 93 94 95 96 $ratio=1; 97 $nbPixels=$imageWidth*$imageHeight; 98 if($nbPixels>MAX_PIXELS_ANALYZED) $ratio=$nbPixels/MAX_PIXELS_ANALYZED; 99 100 $imageWorkWidth=round($imageWidth/$ratio,0); 101 $imageWorkHeight=round($imageHeight/$ratio,0); 102 $imageWork=imagecreatetruecolor($imageWorkWidth,$imageWorkHeight); 103 imagecopyresampled($imageWork, $image, 0, 0, 0, 0, $imageWorkWidth, $imageWorkHeight, $imageWidth, $imageHeight); 104 //imagecopyresized($imageWork, $image, 0, 0, 0, 0, $imageWorkWidth, $imageWorkHeight, $imageWidth, $imageHeight); 105 imagedestroy($image); 106 94 107 $i=0; 95 for($px=0;$px<$imageW idth;$px++)96 { 97 for($py=0;$py<$image Height;$py++)108 for($px=0;$px<$imageWorkWidth;$px++) 109 { 110 for($py=0;$py<$imageWorkHeight;$py++) 98 111 { 99 112 $i++; 100 $value=imagecolorat($image , $px, $py);113 $value=imagecolorat($imageWork, $px, $py); 101 114 102 115 $rgb=self::IntToRGB($value); … … 116 129 } 117 130 118 imagedestroy($image );131 imagedestroy($imageWork); 119 132 120 133 self::$fileHistogram=Array( 121 'pixels' => $imageW idth*$imageHeight,134 'pixels' => $imageWorkWidth*$imageWorkHeight, 122 135 'analyzed' => $i, 123 136 'time' => microtime(true)-$time, -
extensions/Histogram/hgram_version.inc.php
r12221 r15346 15 15 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 16 16 17 define('HGRAM_VERSION', '0. 1.1');18 define('HGRAM_VERSION2', '00.0 1.01');17 define('HGRAM_VERSION', '0.2.0'); 18 define('HGRAM_VERSION2', '00.02.00'); 19 19 define('HGRAM_GPC_NEEDED', '3.5.2'); 20 20 ?> -
extensions/Histogram/main.inc.php
r12221 r15346 2 2 /* 3 3 Plugin Name: Histogram 4 Version: 0. 1.14 Version: 0.2.0 5 5 Description: Allow to make stat on pictures colors 6 6 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=393 … … 27 27 | | | . compatibility with Piwigo 2.2 28 28 | | | 29 | 0.2.0 | 2011/09/25 | * mantis feature:2640 30 | | | . compatibility with Piwigo 2.4 29 31 | | | 30 32 | | | -
extensions/Histogram/templates/hgram_picture_histo.tpl
r12221 r15346 1 {combine_script id="jquery" path="themes/default/js/jquery. min.js"}1 {combine_script id="jquery" path="themes/default/js/jquery.js"} 2 2 3 3 4 4 <div id='iHistoContent' style='text-align:center;'> 5 5 {if $histoImg==''} 6 {combine_script id="histogram.histoLoad" path="plugins/Histogram/js/histoLoad. min.js" require="jquery"}6 {combine_script id="histogram.histoLoad" path="plugins/Histogram/js/histoLoad.js" require="jquery"} 7 7 <span id='iHistoTxt'>{'hgram_loading_histo'|@translate}</span> 8 8 <script type='text/javascript'>
Note: See TracChangeset
for help on using the changeset viewer.