I have a problem regarding the generated thumbnail. I set the width and height already to $thumbnail = new sfThumbnail(100, 100); so it should generate 100px x 100px thumbnails. But what happens is it only generates the width correctly and the height changes depending on the resolution of the images. For example a 2560x1600 file gives me a 100x63 image. Is there any way to force 100px x 100px in sfthumbnail? Thanks!
I have found that you can only specify either the width or the length but you can't do both. I have been specifying the width and doing that with $thumbnail = new sfThumbnail(100, NULL, TRUE). This forces the width of the image and the length is dependent on what is optimal for the image.
Warning: this is just my understanding but I had the same problem and this was the only way that I could get some consitent image sizing.
Has anyone had a problem being able to fill a thumbnail directory with images WITHOUT having to uplaod them. If you have 3 directories of images with various sizes that get filled whenever a person uploads an image and you add a fourth directory and don't want to upload images all over again, how do you get around this problem.
julianstricker Messages: 11 Registered: August 2007 Location: Italy
Junior Member
You can do this with the jsThumbnailPlugin ( "JS", not "SF" ). It has 3 modes: normal (like sfThumbnail), stretch and crop. I think crop is what your need