The function vmImageTools::resizeImage() is called from two places in ps_product_files:
line 567: vmImageTools::resizeImage( $uploaddir.$d['filename'], $uploaddir.$d['filename'], $width, $height );
line 837: vmImageTools::ResizeImage( $fileName, $fileout, $height, $width );
Spot the difference?
in line 567 the height and width are the wrong way round. The function expects height before width
function resizeImage($sourceFile, $resizedFile, $height, $width, $enlargeSmallerImg=false )
I suspect that this has gone unnoticed because most users set the same value for height and width for resize of thumbnails. I only noticed because I am using the same function to also set max dimensions on the main image, which I have set with different height and width.
Line 567 should be
line 567: vmImageTools::resizeImage( $uploaddir.$d['filename'], $uploaddir.$d['filename'], $height, $width );
J1.5.10, VM 1.1.3 (build 1723)
Regards
Phil
I could be wrong but I think one is for regular image upload.
(http://www.protechsystems.us/stuff/joomla/vm/vm-width-height.gif)
The other or additional image upload.
(http://www.protechsystems.us/stuff/joomla/vm/vm-height-width.gif)
It doesn't matter what it's used for. The parameters are the wrong way round.
If you see the image for additional image height is before width however I will ask Soeren, and fix it if it is a bug.
Thanks for continues support.
Quote from: aravot on May 06, 2009, 00:00:14 AM
I could be wrong but I think one is for regular image upload.
(http://www.protechsystems.us/stuff/joomla/vm/vm-width-height.gif)
I don't have three choices below layout:
Enable Dynamic Thumbnail Resizing...
Thumbnail image...
Thumbnail image
my virtue is 1.1.2
plz guide
Instead of hijacking thread, READ the manual http://virtuemart.net/documentation/User_Manual/Product_Files_and_Images.html#N210B4 please.
In your post the code:
line 567: vmImageTools::resizeImage( $uploaddir.$d['filename'], $uploaddir.$d['filename'], $width, $height );
line 837: vmImageTools::ResizeImage( $fileName, $fileout, $height, $width );
you are right that the variable are in the wrong order and also the function is called by resizeImage in one and ResizeImage in the other, it should be resizeImage in both since the function is named resizeImage.
function resizeImage($sourceFile, $resizedFile, $height, $width, $enlargeSmallerImg=false )
thanks for your fix! I have implemented the change in the latest SVN version.
ciao, Sören