Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

   

Reply
 
LinkBack Thread Tools Display Modes
Old 12-09-2004, 02:27 PM   #1 (permalink)
Contributing Member
 
ATLien's Avatar
 
Join Date: 10-13-03
Location: Atlanta, GA
Posts: 2,279
iTrader: 0 / 0%
ATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really nice
Send a message via AIM to ATLien
ImageMagick Resizing Issue

Code:
$newfilename = $name . "_1" . $ext; $ss1path = "/home/***/public_html/screenshots/"; $res = move_uploaded_file($_FILES['ss1']['tmp_name'], $ss1path . $newfilename); if (!$res) { $errorimage = "There was a problem while trying to upload your image."; echo $errorimage; exit; } $ss1original = "/home/***/public_html/screenshots/$newfilename"; $ss1imagesize = getimagesize($ss1original); $ss1oldwidth = $ss1imagesize[0]; $ss1oldheight = $ss1imagesize[1]; $ss1path_thumb = "/home/***/public_html/screenshots/thumbs/"; $ss1thumbname = $newfilename; $ss1newthumb = '/home/***/public_html/screenshots/thumbs/' . $ss1thumbname; if (!copy($ss1original, $ss1newthumb)){ echo "There was a problem while trying to upload your image."; exit; } if ($ss1oldwidth > $ss1oldheight){ $ss1thumbwidth = "150"; $ss1pct = $ss1thumbwidth / $ss1oldwidth; $ss1thumbheight = round($ss1pct * $ss1oldheight); }else{ $ss1thumbheight = "150"; $ss1pct = $thumbheight / $oldheight; $ss1thumbwidth = round($pct*$oldwidth); } $ss1 = "$newfilename"; $make_magick = system("convert -sample $ss1thumbwidth x $ss1thumbheight $ss1original $ss1newthumb", $retval);
Ok, for some reason, my system command is not working, can anyone see a issue concerning this problem. *** is edited out site specifics. Thanks in advanced.
__________________
ATLien is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-09-2004, 05:27 PM   #2 (permalink)
v7n Mentor
 
fishfreek's Avatar
 
Join Date: 10-13-03
Location: Virginia
Posts: 2,021
iTrader: 0 / 0%
Latest Blog:
None

fishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of light
Send a message via ICQ to fishfreek Send a message via AIM to fishfreek Send a message via MSN to fishfreek Send a message via Yahoo to fishfreek
Um i belive you forgot to edit out one site specific item.
fishfreek is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-09-2004, 06:36 PM   #3 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Can you edit it out for me? It's code for my site
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-10-2004, 06:24 AM   #4 (permalink)
v7n Mentor
 
fishfreek's Avatar
 
Join Date: 10-13-03
Location: Virginia
Posts: 2,021
iTrader: 0 / 0%
Latest Blog:
None

fishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of lightfishfreek is a glorious beacon of light
Send a message via ICQ to fishfreek Send a message via AIM to fishfreek Send a message via MSN to fishfreek Send a message via Yahoo to fishfreek
Im not a code guy in this respect but do you have 777 permissions on the thumbnails and images folder? I dont see where you define the path to the convert utility.
fishfreek is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-10-2004, 09:54 AM   #5 (permalink)
Contributing Member
 
ATLien's Avatar
 
Join Date: 10-13-03
Location: Atlanta, GA
Posts: 2,279
iTrader: 0 / 0%
ATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really nice
Send a message via AIM to ATLien
yes I do have 777 permissions, the problem is not the pah either, I have looked at that already.
__________________
ATLien is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-10-2004, 10:16 AM   #6 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,946
iTrader: 0 / 0%
Latest Blog:
None

imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
Try changing the following line.

$make_magick = system("convert -sample $ss1thumbwidth x $ss1thumbheight $ss1original $ss1newthumb", $retval);

TO

$make_magick = system("/path/to/the/ImageMagick/bin/convert -sample $ss1thumbwidth x $ss1thumbheight $ss1original $ss1newthumb", $retval);

Make sure you replace /path/to/the/ImageMagick/bin/convert with the actual path on your server.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-10-2004, 01:39 PM   #7 (permalink)
Contributing Member
 
ATLien's Avatar
 
Join Date: 10-13-03
Location: Atlanta, GA
Posts: 2,279
iTrader: 0 / 0%
ATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really nice
Send a message via AIM to ATLien
I have already tryed that. I am thinking it could be a issue with (spaces) in the names. Does anyone think that could be a issue?
__________________
ATLien is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-10-2004, 02:32 PM   #8 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,946
iTrader: 0 / 0%
Latest Blog:
None

imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
If you are referring to the images having spaces, yes that is a problem.

Things you want to avoid are:

Don't add extraneous punctuation to the file name.

Good: my_file.jpg
Bad: my/file.jpg

Don't put more than one period in the file name.

Good: very_big_file.jpg
Bad: very.big.file.jpg

Don't omit the 3-letter suffix.

Good: myfile.gif
Bad: my.file
Bad: myfile

Avoid spaces in filenames.

Good: my_big_file.jpg
Bad: my big file.jpg

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-10-2004, 08:50 PM   #9 (permalink)
Contributing Member
 
ATLien's Avatar
 
Join Date: 10-13-03
Location: Atlanta, GA
Posts: 2,279
iTrader: 0 / 0%
ATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really niceATLien is just really nice
Send a message via AIM to ATLien
Ok, I solved. Thanksimagine, but I finshed it before you posted. I had to do a string replace, then a rename.
__________________
ATLien is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ImageMagick] PSD Layered Files Hades Coding Forum 10 02-08-2007 11:32 AM
ImageMagick - Animation Help ToddW Coding Forum 1 01-26-2007 05:26 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:40 AM.
© Copyright 2008 V7 Inc