Page 1 of 1

[HABBO] Crop?

Posted: Sun Oct 29, 2006 6:57 pm
by Huddle
Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Okay so heres my problem..

Code: Select all

<? 

if($_GET[habboname]) { 
// If the URL is search_habbo.php?habboname=habboname 
echo("<img src=\"http://www.habbohotel.co.uk/habbo-imaging/collagepr?" . "name_2_txt=0&name_2_y=-117&name_2_x=-491&h_2_dir=3&h_2_nam" . "e=0&h_2_frame=5&h_2_gesture=0&h_2_action=0&h_2_y=0&h_2_x=50&" . "name_1_txt=$_GET[habboname]&name_1_y=-597&name_1_x=-471&sta" . "mpY=-1048&stampX=-1019&h_1_dir=right&h_1_name=$_GET[habbonam" . "e]&h_1_frame=0&h_1_y=0&h_1_x=0&overlay=&overlayY=-95&overlayX" . "=-39&logoY=-300&logoX=-300&bkg=&bkgY=-95&bkgX=-39&bkgColor=ff" . "ffff&picH=300&picW=65&quality=5&img-format=png&xml-template=imageCreator_1_name\">"); 
}elseif(!$_POST[submit]) { 
echo(" 
<form method=\"POST\"> 
Your Habbo Name: <input type=\"text\" name=\"habboname\" value=\"$_GET[habboname]\"> 
<br><br> 
<input type=\"submit\" name=\"submit\" value=\"Search\"></form> 
"); 
}else{ 
$habbo = $_POST[habboname]; 
if($habbo == NULL) { 

echo("You did not enter a Habbo name"); 

}else{ 

echo(" 
<img src=\"http://www.habbohotel.co.uk/habbo-imaging/collagepr?name" . "_2_txt=0&name_2_y=-117&name_2_x=-491&h_2_dir=3&h_2_name=0&" . "h_2_frame=5&h_2_gesture=0&h_2_action=0&h_2_y=0&h_2_x=50&nam" . "e_1_txt=$habbo&name_1_y=-597&name_1_x=-471&stampY=-1048&sta" . "mpX=-1019&h_1_dir=right&h_1_name=$habbo&h_1_frame=0&h_1_y=0" . "&h_1_x=0&overlay=&overlayY=-95&overlayX=-39&logoY=-300&logoX=" . "-300&bkg=&bkgY=-95&bkgX=-39&bkgColor=ffffff&picH=300&picW=65&" . "quality=5&img-format=png&xml-template=imageCreator_1_name\"> 
"); 

} 
} 
?>
If you do it and type your Habbo name it displays a live image of your habbo. Can ANYBODY post a php technique that crops the image so it isnt so long in height. A live image can be shown on

http://www.morningsunshine.net/search_habbo.php

I just want it so the image isnt so long. Is it possible to crop live images?

Thanks,
Dan


Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Sun Oct 29, 2006 7:12 pm
by s.dot
It would be easier to just resize the image. You can do it in php (preferred) or change the height="" attribute in the image HTML tag.

Posted: Sun Oct 29, 2006 7:43 pm
by brendandonhue
You can use imagecopyresampled() to crop an image.