Problem: Resize large JPG's with PHP memory limit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kenton Smith

    Problem: Resize large JPG's with PHP memory limit

    I am using a shared server and the max PHP memory limit is set at 10MB. I
    can not change this. I would like to resize uploaded JPG images. I have
    tried many different scripts using the GD libs, but they all do not work for
    larger JPGs. I know that the limit is the max PHP memory, but is there
    anything that I can do to get this to work?

    ImageMagick?
    Java?

    Thanks


  • CountScubula

    #2
    Re: Problem: Resize large JPG's with PHP memory limit


    Shell out to imagemagik, such as 'convert' program and pass it the
    parameters to the jpg

    --
    Mike Bradley
    http://www.gzentools.com -- free online php tools
    "Kenton Smith" <smithk1@shaw.c a> wrote in message
    news:Dj30c.6425 25$ts4.629992@p d7tw3no...[color=blue]
    > I am using a shared server and the max PHP memory limit is set at 10MB. I
    > can not change this. I would like to resize uploaded JPG images. I have
    > tried many different scripts using the GD libs, but they all do not work[/color]
    for[color=blue]
    > larger JPGs. I know that the limit is the max PHP memory, but is there
    > anything that I can do to get this to work?
    >
    > ImageMagick?
    > Java?
    >
    > Thanks
    >
    >[/color]


    Comment

    • Sandman

      #3
      Re: Problem: Resize large JPG's with PHP memory limit

      In article <Dj30c.642525$t s4.629992@pd7tw 3no>,
      "Kenton Smith" <smithk1@shaw.c a> wrote:
      [color=blue]
      > I am using a shared server and the max PHP memory limit is set at 10MB. I
      > can not change this. I would like to resize uploaded JPG images. I have
      > tried many different scripts using the GD libs, but they all do not work for
      > larger JPGs. I know that the limit is the max PHP memory, but is there
      > anything that I can do to get this to work?
      >
      > ImageMagick?[/color]

      Yes. :)

      $dir = "/my/img/dir";
      system("convert -resize 400 $dir/image.jpg $dir/image_thumb.jpg ");

      for example.

      --
      Sandman[.net]

      Comment

      Working...