Reply to Re: add a stripe on an image

Your name:

Reply:


Posted by NC on 03/02/06 19:36

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).

1. Create a blank 120x160 image with imagecreate().
2. Open the existing 120x90 image with imagecreatefromX().
3. Copy the existing 120x90 image opened in Step 2 into
the blank image created in Step 1 with imagecopy().
4. Output the newly generated 120x160 image with imageX().

X, of course, stands for the image type (gif, jpeg, png, etc.)

Cheers,
NC

[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

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