Reply to Re: <img width > in apache

Your name:

Reply:


Posted by Joseph Melnick on 06/25/05 20:52

Mr. Lisiecki wrote:

"Zbigniew Lisiecki" <zbyszek@evot.org> wrote in message
news:d9ikep$9b7$1@nemesis.news.tpi.pl...
> Joseph Melnick wrote:
>
>> Zbigniew Lisiecki wrote:
>>
>> "Zbigniew Lisiecki" <zbyszek@evot.org> wrote in message
>> news:d9h726$ebv$2@nemesis.news.tpi.pl...
>>> Hi Ervin,
>>>
>>> your wrote:
>>>> Zbigniew Lisiecki wrote:
>>>>> Does the width transformation occur on a client side !!! ?
>>>> yes.
>>>> Are you surpised?
>>>
>>> yes !
>>> I don't see any purpose.
>>> "width" tag asures there will be no other resolution in client,
>>> so it makes no sense to provide it.
>>>
>>>> Tip: do not try to use Apache as a resizingtool. ;-)
>>>
>>> why ?
>>> i tried imagecopyresampled() but it wont' work now. i need some more
>>> work. or some exapmle if you have one
>>>
>>>>> Could somebody help me, please.
>>>> yes.
>>>> But you give too little information.
>>>
>>> I am using apache 2.0 handler with PHP Version 4.3.4 on SuSE 9.1 Linux.
>>> GD Support enabled, GD Version bundled (2.0.15 compatible),
>>> FreeType Support enabled, FreeType Linkage with freetype, T1Lib Support
>>> enabled, JPG Support enabled
>>>
>>> I'd like to provide pictures of some landmaps of 3700 x 4700 pixels
>>> size,
>>> that is up to 5 MB jpg file size. I effectively want to transfer images
>>> to the client in max 700 x 800 pixels resolution.
>>> Also some 1000 x 1000 pixels photos are too big now. jpg files have
>>> 0.5MB, and I'd like to transfer up to 100k for each picture.
>>>
>>> I have a lot of such images, so I'd like to resize them on demand and
>>> keep smaller versions somewhere in the servers cache. I'd like to omit
>>> any macromedia, or other techniques with bigger ressource demands.
>>>
>>>> What OS do you use? *Nix? W$? Mac?
>>>> Do you want to spend $$ on it?
>>>
>>> I hope not !
>>> I could even compile instaed -;)
>>>
>>> best,
>>> zbyszek
>>> --
>>> http://zbyszek.evot.org
>>
>> You would do well to use GD library to batch convert your images to the
>> sizes you require on your server. It requires a fair amount of processing
>> time to resize images and you should only need to do this once and store
>> smaller resampled images in an alternate directory. (I use a thumbs
>> directory to store these types of images.)
>>
>> This type of php script will often require greater than 30 seconds to run
>> therefore you will have to change the default timeout setting at the
>> start
>> of your resizer script.
>
> Hi Joseph,
> do you have a code example ? i try something like this to resize to
> 300x300
>
> $iname= my original jpg file
> $src_im = @imagecreatefromjpg($iname);
> $dst_im = imagecreate(300, 300);
> $icr=imagecopyresampled ($dst_im, $src_im, $dstX, $dstY, $srcX,
> $srcY,
> $dstW, $dstH, $srcW, $srcH);
> $ifile="thumbs/i";
> $ij=imagejpg ($dst_im, $ifile);
>
> but it still won't work for now.
> z
> --
> http://zbyszek.evot.org

Hello Zbigniew,

There is a great example on php.net at the URL shown below provided by Angel
Leon on 31-Mar-2005 09:13

http://ca3.php.net/manual/en/function.imagecreatefromjpeg.php

Joseph Melnick
JM Web Consultants
Toronto, Ontario, Canada
http://www.jphp.com/

[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

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