/    Sign up×
Community /Pin to ProfileBookmark

RESIZE/CROP images and save them afterwards

Hello all of you,

I hope someone can help me with this. I’m trying to make a php page where you can upload images to the server. The images will be resized and cropped. The resizing, cropping and saving part i already figured out when using an image that is in the same folder on the server as the php page. Now i added the browse option and there it went wrong i don’t know what to do?? Can someone help me with this??

I added the script as zip file.
And the working of it can be seen at: [URL=http://www.ok-parking.nl/Resize/crop.php]http://www.ok-parking.nl/Resize/crop.php[/URL]

[upl-file uuid=826ff020-f869-426f-ada5-93bb1105f524 size=2kB]crop.php.zip[/upl-file]

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@ZiplineMay 04.2006 — It seems as if your image isn't uploading or at least not to the location your script is looking for can you post your PHP code for the upload? I see your script is grabbing the filename of the file I uploaded but your script isn't finding that image on the server so it looks like you have a path mismatch or something.
Copy linkTweet thisAlerts:
@zebdaagauthorMay 04.2006 — I don't have an upload script yet, do i need one, can't i just open an image from the users pc resize and crop it and then save it??
Copy linkTweet thisAlerts:
@ZiplineMay 04.2006 — No, the file will have to be uploaded to the server for the PHP script to resize it. PHP is a server side programming language. If the image was going to be resized on their machine it would be done with local software.
Copy linkTweet thisAlerts:
@zebdaagauthorMay 06.2006 — owkay so what's the plan, upload an file than resize and crop it and than delete uploaded file again..??
Copy linkTweet thisAlerts:
@vwphillipsMay 06.2006 — [URL]http://www.vicsjavascripts.org.uk/ReSizeCropImage/ReSizeCropImage.htm[/URL]
Copy linkTweet thisAlerts:
@bokehMay 06.2006 — First: [URL=https://webdeveloper.com/forum/showthread.php?t=101466]Read the sticky on uploading images![/URL]

Cropping and resizing are two terms that have come to be used interchangeably but in reality they are two completely different processes. A [I]cropped[/I] image retains exactly the same scale and an abstraction is extracted from it whereas with [I]resizing[/I] the scale of the image changes but none of it is lost. You also need to decide how to handle things if the aspect ratio of the source image is different from the desired aspect ratio of the destination image. There are so many variables involved that there is little to no chance you will find a pre-made script that will do things exactly as you might want them.
Copy linkTweet thisAlerts:
@zebdaagauthorMay 06.2006 — First: [URL=https://webdeveloper.com/forum/showthread.php?t=101466]Read the sticky on uploading images![/URL]

Cropping and resizing are two terms that have come to be used interchangeably but in reality they are two completely different processes. A [I]cropped[/I] image retains exactly the same scale and an abstraction is extracted from it whereas with [I]resizing[/I] the scale of the image changes but none of it is lost. You also need to decide how to handle things if the aspect ratio of the source image is different from the desired aspect ratio of the destination image. There are so many variables involved that there is little to no chance you will find a pre-made script that will do things exactly as you might want them.[/QUOTE]


Thank you Bokeh for this explanation but i already know pretty well what the difference is between crop and resize I work with photoshop almost 24/7 so that's not the problem, and I even made the script i added on my first post that does just the thing a want except for uploading images so the thing i have to do now is combining a upload script with my resize and crop script. And that's is what i am going to work on now.

Thanks for all replies!!
Copy linkTweet thisAlerts:
@zebdaagauthorMay 07.2006 — Okay guys it's all done.

My script is working as i wanted it to so here are the final files for who ever wants it. My script now uploads an file than resizes and crops it in 2 different ways. 1 is an thumbnail the other is an big image. These two images are saved in to different folders and the original file that was uploaded is deleted at the end. Thanks for all the help!!

Greetings Zeb

[upl-file uuid=b5cd76a7-c936-44da-868b-8d78a9d68e9c size=6kB]Upload:Crop:Resize?elete.zip[/upl-file]
×

Success!

Help @zebdaag spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...