Making GD2 faster

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • no@email.supplied

    Making GD2 faster

    I'm using PHP with GD2 to create image thumbnails, but it gets
    extremely slow when processing large images (1600x1200 or more). I
    had to raise max_execution_t ime to more than 120 secs and I don't
    think my client is going to like that :( I guess I could switch to
    bilinear resizing but it looks really awful.

    Are there any tricks to speed up GD2 a little?

    Thanks in advance!
  • James Smith

    #2
    Re: Making GD2 faster

    I'm also interested, I found a faster CPU helped, and a little more ram,
    but don't know if there is any tricks to it.



    no@email.supplied wrote:
    [color=blue]
    >I'm using PHP with GD2 to create image thumbnails, but it gets
    >extremely slow when processing large images (1600x1200 or more). I
    >had to raise max_execution_t ime to more than 120 secs and I don't
    >think my client is going to like that :( I guess I could switch to
    >bilinear resizing but it looks really awful.
    >
    >Are there any tricks to speed up GD2 a little?
    >
    >Thanks in advance!
    >
    >[/color]

    Comment

    • Chung Leong

      #3
      Re: Making GD2 faster

      <no@email.suppl ied> wrote in message
      news:sk52e0dkh4 0grcasm2gtjrbsl slhtjgn9a@4ax.c om...[color=blue]
      > I'm using PHP with GD2 to create image thumbnails, but it gets
      > extremely slow when processing large images (1600x1200 or more). I
      > had to raise max_execution_t ime to more than 120 secs and I don't
      > think my client is going to like that :( I guess I could switch to
      > bilinear resizing but it looks really awful.
      >
      > Are there any tricks to speed up GD2 a little?
      >
      > Thanks in advance![/color]

      Try using imagecopyresize () instead of imagecopyresamp led().


      Comment

      • mikele

        #4
        Re: Making GD2 faster

        On Tue, 29 Jun 2004 19:57:34 -0400, "Chung Leong"
        <chernyshevsky@ hotmail.com> wrote:
        [color=blue]
        ><no@email.supp lied> wrote in message
        >news:sk52e0dkh 40grcasm2gtjrbs lslhtjgn9a@4ax. com...[color=green]
        >> I'm using PHP with GD2 to create image thumbnails, but it gets
        >> extremely slow when processing large images (1600x1200 or more). I
        >> had to raise max_execution_t ime to more than 120 secs and I don't
        >> think my client is going to like that :( I guess I could switch to
        >> bilinear resizing but it looks really awful.
        >>
        >> Are there any tricks to speed up GD2 a little?
        >>
        >> Thanks in advance![/color]
        >
        >Try using imagecopyresize () instead of imagecopyresamp led().
        >[/color]

        Yeap, that's what I meant about bicubic/bilinear resize. I'm using
        bilinear now (imagecopyresiz ed()) but of course quality is poor. I
        guess that the GD2 libraries are not optimized at all cause Photoshop
        or even Irfanview, Acdsee, etc. are a lot faster at bicubic resizing.

        Comment

        • Andy Hassall

          #5
          Re: Making GD2 faster

          On Tue, 29 Jun 2004 07:19:42 GMT, no@email.supplied wrote:
          [color=blue]
          >I'm using PHP with GD2 to create image thumbnails, but it gets
          >extremely slow when processing large images (1600x1200 or more). I
          >had to raise max_execution_t ime to more than 120 secs and I don't
          >think my client is going to like that :( I guess I could switch to
          >bilinear resizing but it looks really awful.
          >
          >Are there any tricks to speed up GD2 a little?[/color]

          Consider using imagemagick instead. It's considerably faster for generating
          thumbnails.

          See Michael Rostkowski's informative speed comparison post:


          --
          Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
          http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

          Comment

          Working...