NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page [Request] Fancy image uploading script

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-28-2005, 04:18 PM THREAD STARTER               #1 (permalink)
Senior Member
 
Ringr's Avatar
Join Date: Jul 2004
Posts: 1,383
Ringr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to behold
 



[Request] Fancy image uploading script


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).
????: NamePros.com http://www.namepros.com/programming/102578-request-fancy-image-uploading-script.html

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
Ringr is offline  
Old 06-28-2005, 04:57 PM   #2 (permalink)
NamePros Regular
Join Date: Feb 2004
Location: Student @ UConn
Posts: 411
gamex has a spectacular aura aboutgamex has a spectacular aura about
 



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 Code:
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
????: NamePros.com http://www.namepros.com/showthread.php?t=102578
                    } 
                    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$srcImage0000,$destSize[0],$destSize[1],$srcSize[0],$srcSize[1]); 
                    
                    
// generating image 
                    
switch ($srcSize[2]) { 
                        case 
1
                        case 
2
                        
imagejpeg($destImage,$dest,$quality); 
                        break; 
????: NamePros.com http://www.namepros.com/showthread.php?t=102578
                        
                        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
__________________
Joe
gamex is offline  
Old 06-28-2005, 06:47 PM THREAD STARTER               #3 (permalink)
Senior Member
 
Ringr's Avatar
Join Date: Jul 2004
Posts: 1,383
Ringr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to behold
 



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
Ringr is offline  
Old 06-28-2005, 11:19 PM   #4 (permalink)
Account Suspended
Join Date: May 2005
Location: Earth
Posts: 178
mosaic is an unknown quantity at this point
 



Also you can try image host scripts as photopost pro and arbinator.
mosaic is offline  
Old 07-04-2005, 07:30 PM THREAD STARTER               #5 (permalink)
Senior Member
 
Ringr's Avatar
Join Date: Jul 2004
Posts: 1,383
Ringr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to behold
 



Meh, I'm still confused on how I can get it to work.
:$
Ringr is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
What Keywords? spy69 Search Engines 5 06-28-2005 09:05 PM
Image hosting script for sale axilant Scripts For Sale 19 12-28-2004 11:20 AM
60.000 Templates, scripts, fonts, banners etc. $9.95 atkims Web Development Wanted 19 11-16-2004 10:48 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:01 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger