如果您想了解更多有关散列键,我相信它是在Mage_Catalog_Model_Product_Image类中创建,在setBaseFile功能的底部,它主要负责图像的特性,内爆在一起,并创建一个散列。
// add misk params as a hash
$miscParams = array(
($this->_keepAspectRatio ? '' : 'non') . 'proportional',
($this->_keepFrame ? '' : 'no') . 'frame',
($this->_keepTransparency ? '' : 'no') . 'transparency',
($this->_constrainOnly ? 'do' : 'not') . 'constrainonly',
$this->_rgbToString($this->_backgroundColor),
'angle' . $this->_angle,
'quality' . $this->_quality
);
// if has watermark add watermark params to hash
if ($this->getWatermarkFile()) {
$miscParams[] = $this->getWatermarkFile();
$miscParams[] = $this->getWatermarkImageOpacity();
$miscParams[] = $this->getWatermarkPosition();
$miscParams[] = $this->getWatermarkWidth();
$miscParams[] = $this->getWatermarkHeigth();
}
如果您需要自己生成散列,则可以使用相同的步骤。显然HASH'ing是一个单向过程,所以不可能取值并找出图像属性。
谢谢,在这个方法中也找到了1(数字)。这引用了Mage :: app() - > getStore() - > getId() – davidselo 2012-01-17 15:12:18
在同一个方法中引用了{$ this - > _ width} x {$ this - > _ height} – davidselo 2012-01-17 15:14:30