You are here: Re: how to choose the correct height/width for images « PHP Programming Language « IT news, forums, messages
Re: how to choose the correct height/width for images

Posted by Curtis on 02/01/07 05:46

On Wed, 31 Jan 2007 21:15:25 -0800, Kentor <kentor@gmail.com> wrote:

> On Feb 1, 12:10 am, Curtis <dyers...@verizon.net> wrote:
>> On Wed, 31 Jan 2007 20:58:57 -0800, Kentor <ken...@gmail.com> wrote:
>> > Hello,
>> > I have users that submit images to my website. By default I choose to
>> > make the width bigger than the height because usually pictures are
>> > taken horizontally... But in some cases people take pictures
>> > vertically so what I'm getting at is... can I know whether an image
>> > was taken horizontally or vertically so I can make the proper width/
>> > height lengths so that it looks nice and not kinda weird... because if
>> > you make the width bigger than the height of an image that is supposed
>> > to have a bigger height than width, it looks kinda ugly.. And also is
>> > there a way to know when I've enlarged the image too much? because if
>> > an image submitted was small and I make it bigger, then it also
>> > becomes kind of ugly to look at because I guess there aren't enough
>> > pixels... thanks for your help.
>>
>> > Simon
>>
>> If you are using the GD library, have a look at imagecopyresampled:
>>
>> Example: "Example 2. Resampling an image
>> proportionally"http://php.net/imagecopyresampled
>>
>> --
>> Curtis,http://dyersweb.com
>
> Thanks, but this stuff will resize it to 200 by 200 as in the example
> or 50% of the original size... But I would like to have the image
> bigger horizontally if this is the images original setting... but I
> don't want the images original size because someone may upload a huge
> image that will take half the screen... so I need to figure out a way
> to know if the original image has a bigger width or height...
>

That's the whole point, they specify arbitrary maximum size limits. If
someone uploaded a huge image, it would be resampled to 200x200. You can
change those size limits how you want. You can specify that the width is
bigger than the height, if you want.

--
Curtis, http://dyersweb.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация