VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: emicoma on August 05, 2013, 23:25:21 PM

Title: Thumbnail resize
Post by: emicoma on August 05, 2013, 23:25:21 PM
Hi
I set the thumbnail image to square values, but resize does not create square image
Is it the normal way of behavior or I have  a bug somewhere ?
I would like to have images fitted in a white suare..
thanks for your help
(I know i can trick in css, but i really want my square resized..)
Title: Re: Thumbnail resize
Post by: Maxim Pishnyak on August 06, 2013, 13:05:18 PM
Be more specific pls. Dimensions of both pictures?
Title: Re: Thumbnail resize
Post by: emicoma on August 06, 2013, 14:05:52 PM
Both pictures ? i have only one / product
I set 200px x 200 px for thumbnails size
Title: Re: Thumbnail resize
Post by: Maxim Pishnyak on August 06, 2013, 19:18:58 PM
During resizing you have to work with two pictures: original and resized ones.
Title: Re: Thumbnail resize
Post by: emicoma on August 06, 2013, 19:42:34 PM
Could you please give more details ?
I want change on thumbnail product only, not on original image
The dynamic thumbanil resizing is supposed to work only for thumbnail isn't it ?
I want to know it is normal and not a bug of my configuration
If not a bug, i guest this is the img2thumb.php file to modify ?
thanks
Title: Re: Thumbnail resize
Post by: Maxim Pishnyak on August 08, 2013, 23:28:22 PM
Link?
Title: Re: Thumbnail resize
Post by: romeof1980 on August 15, 2013, 00:45:40 AM
hi Emicoma,

I would try to use a square pic before trying to mess with php.
when I need square thumb I usually cut/resize the pictures with Gimp or, if you have to work on more pictures, sometimes phatch works fine too.
If I remember correctly the way VM resize the imagine to a thumbnail is like that:
400*400, 399*399, ..., 350*350 and so on
or
400*200, ..., 200*100, 100*50 and so on

thus if with an original pic 400*200px you set, i.e., 100*100 I guess you'll get a thumb 100*50

in a nutshell.. you can't cut only one side, thus you'll set one and the other will be resized proportionally.

for my experience, it's not a bug, it's the very normal way it works ;D

cheers,
romeo