This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » General plug-ins » SfThumbnail problem
SfThumbnail problem [message #46869] Sun, 02 March 2008 12:46 Go to next message
j3poysy  is currently offline j3poysy
Messages: 30
Registered: November 2007
Member
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!
Re: SfThumbnail problem [message #47047 is a reply to message #46869 ] Tue, 04 March 2008 19:25 Go to previous messageGo to next message
ice_j7  is currently offline ice_j7
Messages: 116
Registered: February 2008
Location: Arequipa - PerĂº
Senior Member
Surely your thumbnails will look a litle bad if you do that, better show them like 100x100 instead of saving thus.


Search in the code, find wisdom.
Re: SfThumbnail problem [message #68528 is a reply to message #47047 ] Wed, 24 December 2008 04:19 Go to previous messageGo to next message
Russpd  is currently offline Russpd
Messages: 104
Registered: September 2008
Senior Member
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.
Re: SfThumbnail problem [message #68537 is a reply to message #46869 ] Wed, 24 December 2008 10:23 Go to previous message
julianstricker  is currently offline 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
Previous Topic:[sfXSLTViewPlugin] First release
Next Topic:Table inheritance with Propel
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software