Unstoppable Domains

[Request] Fancy image uploading script

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Ringr

VIP Member
Impact
45
Hey guys,

I would really appreciate some help if someone could write me a script that does the following (unless maybe there is already a script out there somewhere - erm, and please don't say "did you check Hotscripts!?!?!?" or possibly someone here already wrote a script like this).

Anyways, the script I need is for an image uploader.
When you upload the image, I would like the script to slap a specified watermark image on it, in the bottom right hand corner of the uploaded image.

And then the image you uploaded to begin with, will now be uploaded onto the server, plus it will have a specified watermark on the bottom right of it.

After the uploading is finished, the script would then automatically generate a 100x100 (pixel) sized thumbnail of the uploaded image.

It then would provide a quick copy and paste code (like in a textarea box, or something the user can quickly select and copy). The copy and paste code would be the code for the thumbnail image to be shown and link in a new window to the original image (e.g. <a href="image_large.jpg" target="_blank"><img src="image_thumbnail.gif" border="0"></a>)

Is this possible?
I know it's long, but gees, it would help so much.

Please let me know - maybe one of you already wrote something like this, or could write it and give it out publically as you can see how handy it would be;
Thanks,
Andy
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Hey, have you checked out hotscripts.com at all??

Hehe, j/k, I have a script on my website that adds a watermark to an image and also creates a thumbnail.

This is the script I use to create the thumbnail:

PHP:
function image_createthumb($src,$dest,$maxWidth,$maxHeight,$quality) { 
				if (file_exists($src)  && isset($dest)) { 
					// path info 
					$destInfo  = pathInfo($dest); 
					
					// image src size 
					$srcSize   = getImageSize($src); 
					   
					// image dest size $destSize[0] = width, $destSize[1] = height 
					$srcRatio  = $srcSize[0]/$srcSize[1]; // width/height ratio 
					$destRatio = $maxWidth/$maxHeight; 
					if ($destRatio > $srcRatio) { 
						$destSize[1] = $maxHeight; 
						$destSize[0] = $maxHeight*$srcRatio; 
					} 
					else { 
						$destSize[0] = $maxWidth; 
						$destSize[1] = $maxWidth/$srcRatio; 
					} 
					
					// path rectification 
					if ($destInfo['extension'] == "gif") { 
						$dest = substr_replace($dest, 'jpg', -3); 
					} 
					
					// true color image, with anti-aliasing 
					$destImage = imagecreatetruecolor($destSize[0],$destSize[1]); 
					imageantialias($destImage,true); 
					
					// src image 
					switch ($srcSize[2]) { 
						case 1: //GIF 
						$srcImage = imagecreatefromgif($src); 
						break; 
						
						case 2: //JPEG 
						$srcImage = imagecreatefromjpeg($src); 
						break; 
						
						case 3: //PNG 
						$srcImage = imagecreatefrompng($src); 
						break; 
						
						default: 
						return false; 
						break; 
					} 
					
					// resampling 
					imagecopyresampled($destImage, $srcImage, 0, 0, 0, 0,$destSize[0],$destSize[1],$srcSize[0],$srcSize[1]); 
					
					// generating image 
					switch ($srcSize[2]) { 
						case 1: 
						case 2: 
						imagejpeg($destImage,$dest,$quality); 
						break; 
						
						case 3: 
						imagepng($destImage,$dest); 
						break; 
					} 
					return true; 
				} 
				else { 
					return false; 
				} 
			}
			image_createthumb($src,$dest,$wth,$hgt,$quality);

I cant remember if I modified this at all, so let me know if you have any problems.

The script I used for watermarking (I actually used this to add a rounded border to all of my images) can be found here:

http://www.phpgeek.com/articles.php?content_id=6
 
0
•••
Hey Gamex,

Thanks a bunch for getting back to me. :)
I hate to say it, but I know nothing about PHP really, well I mean - the language itself. How exactly would I go about using this script? Would the coding you provided simply go in my "uploader.php" which would then be used as the "action" (action="uploader.php") in the form?

Sorry I am so dull at this,
-Andy M
 
0
•••
Also you can try image host scripts as photopost pro and arbinator.
 
0
•••
Meh, I'm still confused on how I can get it to work.
:$
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back