Batch process of Image (resizing)

  • SpooF
  • Ice Cream
  • Bronze Member
  • User avatar
  • Joined: 22 May 2004
  • Posts: 2799
  • Loc: Richland, WA
  • Status: Offline

Post June 26th, 2008, 4:53 pm

I'm looking into making a script that will batch process a large amount of images, anything from 10 to 200 or so pictures at a time. I haven't worked with PHP in this form to much and was wondering if a single PHP script could do this? I know it really depends on the server, but in general how long do you think it would take? Should I instead look into something like python? Image sizes will range from 1mb to 5mb each.
College Taught Me - And we're not talking about the classes!
@travisperson
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 26th, 2008, 4:53 pm

  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: 10 Sep 2004
  • Posts: 2206
  • Loc: Canada
  • Status: Offline

Post June 26th, 2008, 5:45 pm

I don't see why there'd be a problem as long as you raised the default 30 second timeout limit.
  • joebert
  • S.T. Manager
  • Genius
  • User avatar
  • Joined: 10 Feb 2004
  • Posts: 11002
  • Loc: Clearwater, FL
  • Status: Offline

Post June 26th, 2008, 8:02 pm

The batch processor I use (Phatch) is written in Python. I don't know whether it's because Python is being used, but it's many times faster than the Imagemagick script I tried.

I realize Phatch is a desktop application and you're looking for PHP, but in all actuality the PHP script I was using shelled the image work out to the Imagemagick command like client, which seems to be the norm.
The squeaky wheel gets the grease, but the whining wheel gets replaced.
Picksel: Ubuntu/Gnome alternative to Colorpix
  • SpooF
  • Ice Cream
  • Bronze Member
  • User avatar
  • Joined: 22 May 2004
  • Posts: 2799
  • Loc: Richland, WA
  • Status: Offline

Post June 26th, 2008, 8:36 pm

The limit is some reason I might just write a python script to do it for me. I have 60mb of memory allocated to me on my server.
College Taught Me - And we're not talking about the classes!
@travisperson

Post Information

  • Total Posts in this topic: 4 posts
  • Moderator: Moderator Team
  • Users browsing this forum: No registered users and 65 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.