Forum Moderators: coopster

Message Too Old, No Replies

image size problem

digital cameras produce large files and large dimensions - causing problems

         

davidascher

8:38 pm on Aug 19, 2005 (gmt 0)

10+ Year Member



I have been working on a system for allowing a photographer I'm working with to upload files to a web site using a php-based page I'm developing. When the file gets there I generate a resized (resampled) and trimmed version of the image with a maximum edge size of 400 pixels (either height or width, depending on the images orientation). I trim off approximately 1% of the image from each edge to deal with mis-aligned scanned images. I also generate an 80X80 thumbnail which contains the 'middle' of the image. So far so good.

She is now starting to use a digital camera and her image files are becoming an issue because they a) are too large for me to upload - I'm limited to (I think) 2MB by the web server's settings and b) they have very large dimensions - way too large for the GD library to process them.

Any suggestions as to what I can do to deal with the problem? I know I can have her run the images through IrfanView to resample/resize them (smaller dimensions and lower dpi => smaller files and dimensions that GD can handle plus faster uploads) before uploading them, but I'd really rather not get involved in trying to teach her how to use that - and it seems that there really ought to be some way to deal with this without having to put the burden on the end user.

thanks in advance for any (reasonable) suggestions.

Aleister

3:18 am on Aug 21, 2005 (gmt 0)

10+ Year Member



Well only a couple of options come to mind..

You could find an image program which can have macros set up, so she could just press a button and it would do what it needs and process all the files. I know photoshop can do it, but if she does not have it, I would not know what other software to suggest that could handle it.

The best solution may be to use FTP. You could setup an account for her to use, (which would not be hard to teach her I don't think... The client side could have all the settings saved for easy access). She could simply upload them to the directory.

If you do that, you have a couple of choices. You could setup a script that will process them all - that is IF they are not to big - which she would then run after uploading, or you could process them yourself manually. FTP would at least be faster than email.

I have even seen scripts floating around to make it easy to initialize an FTP connection through forms. So everything would look the same to her, only your upload problems would be gone.

davidascher

11:45 am on Aug 22, 2005 (gmt 0)

10+ Year Member



I guess I was not as clear about the problem as I should have been... There are really multiple problems
* file size limits. I should probably switch from http to ftp uploads. That should overcome these, I think.

* skill issues. She's a mac user. She has photoshop and is familiar with its basic use from a photographer's point of view. I could put together a photoshop macro to preprocess the images but I am not particularly familiarly with Photoshop and its macro capabilities and limitations. Also I would like to find a solution I could use with other photographers who may not have photoshop.

* image dimension limits imposed by php-GD library. This is the number 1 issue with my current implementation. I can't find any clear explanation of what causes the dimensionial limit and if there is any way to overcome it.

Stooshie

10:06 am on Aug 23, 2005 (gmt 0)

10+ Year Member



Hi there,

The file upload size can be changed in the php.ini file, if you have accecss to that. (Look for the line "upload_max_filesize = 2M" and change it to the size you requqire).

Because graphic manipulation can take large amounts of memory, the gd module will limit the size of the images. There may be a config file somewhere for the gd module that allows larger files, but I don't know enough to comment.

Hope it helps.

Andrew.

DaButcher

11:22 am on Aug 23, 2005 (gmt 0)

10+ Year Member



There will be an issue with timeout too!
I would guess that an ftp-upload would be better.

no input on the image size though, sorry.
did you try googling?

Stu_Rogers

12:07 pm on Aug 23, 2005 (gmt 0)

10+ Year Member



As Stooshie says, this is really a memory issue. You simply cannot expect your server to automatically manipulate such large images. I appreciate that you would prefer a server-side solution but the processing really needs to be done locally. Just think how much time and bandwidth you will save uploading them! All pro-photographers have Photoshop so I suspect macros are the way to go.