Jump to content

batch processing images using php


jwmstudios

Recommended Posts

Hello everyone  ;D

 

I have built a photo gallery application, but i would like to add a feature where i can manually create a folder within a directory and php is able to detect the files for me and also generate thumbs (previews). I can then choose which file i want to include in my database eg album, category etc.

 

I sort of want it to function like coppermine photo gallery admin tools.

 

Is there any code that i can start with?

Link to comment
Share on other sites

You are asking for a lot. There are many photo galleries out there that have these functions. You can go review those and try to reengineer the code to fit you or you can break down the functionality you want into specific requirements: 1) Allow user to browse to and select a folder. 2) Allow user to specify which photos to include in "album" 3) Create thumbs of the photos.

4) Process allt he selected images to a) Create thumbs and b) save to database

 

Etc., Etc.

 

Then just tackle one task at a time. In some instances you will probably be able to find some existing code or you can proably get some help here for specific pieces of functionality. But, I think the only placve you are going to find all of that type of functionality already existing together is in applications that already exist.

Link to comment
Share on other sites

The Problem with those applications the code seem complex as they use complex classes with xml and they don't comment on functionality within their code, but i created this thread with the hope that someone out there has been through this roadblock before and have useful code.

 

I will post my findings to this thread when i get through.

Link to comment
Share on other sites

Yes, I understand the difficulty in trying to reverse engineer someone elses poorly documented code. And, I think building your own solution is a good idea. I would just limit your request to a single piece of functionality instead of a blanket statement for a lot of functionality. For example, if you wanted a piece of code that would "scan" a folder for all images you would probably get several solutions. But, I know I as well as others like to at least see a person make an attempt instead of just handing them code. I wish you all the luck.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.