Reply to Re: add a stripe on an image

Your name:

Reply:


Posted by Erwin Moller on 03/02/06 19:40

Bob Bedford wrote:

> I've an image that is 300x225 pixels.
> I've to send this image to mobile phones using the mms. For this the best
> result is given using 120x160 pixels.
> So I may generate a 120 pixels large image, but I've a lot of unused space
> under the image, as scaling proportionally, my image is then 120x90.
>
> how to enlarge the image in order to get the picture 120x90 and then a
> white stripe where I may write the website (or put the logo).
>
> The resulting image should be 120x160, 120x90 used by the picture, 120x70
> a white stripe where I may put the logo or a text.
>
> Thanks
>
> Bob

Hi Bob,

Start reading here:
http://nl2.php.net/manual/en/ref.image.php

It boils down to:
1) Make sure you have GD2-support on your PHP-machine. Check via phpinfo()

2) Open the image (from file eg) with functions like imagecreatefromgif or
imagecreatefromjpg, etc. You can look them up, I don't know your format.

3) Resample your image (resampling is better than resizing) and copy it to
another slightly larger image you first create.
Look at functions like imagecopyresampled()

4) write your text under it.

Good luck.

Regards,
Erwin Moller

[Back to original 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

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