Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   Display Clicks and level in Sig image (http://www.mysidiaadoptables.com/forum/showthread.php?t=1145)

exdiogene 10-24-2009 02:55 PM

RE: Display Clicks and level in Sig image
 
what do you mean the fonts get pretty ugly?

gabeki 10-24-2009 03:02 PM

RE: Display Clicks and level in Sig image
 
it gets kinda square x_x

--

here's another thing you can do..
since the level 0 of my adoptables are eggs, there's no pointing of showing 'level 0'
PHP Code:

    if($currentlevel == 0){
        
$str2 "Help me Hatch!";
    } 

now I'm trying to resize the image x_x
if i change the newwidth, the image gets cropped, but I want to resize it, so all images are the same size independent of the adoptable... any ideas? '-'

- edit -

I found a way to do it :D
if someone wants to know...

you have to change this part:

ImageCopyResampled(
$img_temp,
$img_old,
0, 0, 0, 0,
$width,
$height,

$width,
$height
);

I wanted all my images to be 140 x 150 max (with text), so here's what I did

PHP Code:

if($width 140 AND height 120){
    
$wresized $width;
    
$hresized $height;
    }
    else{
        
$div $width 140;
        
$wresized $width $div;
        
$hresized $height $div;
        
        if(
$hresized 120){
        
$div $height 120;
        
$wresized $wresized $div;
        
$hresized $hresized $div;
        }
    } 

first verifies if the image is bigger than 140x120 (the text is 30 pixels height). if it is not, than the new WxH is the same of the original... if it is bigger, we resize it.. I used that $div so it will be resized and maintain the porpotion of the sides..

and you have to change those parts also

PHP Code:

$newwidth $wresized;
$newheight $hresized 30;

      
$img_temp imagecreatetruecolor($newwidth$newheight); 

PHP Code:

     ImageCopyResampled(  
         
$img_temp,  
         
$img_old,  
         
0000,  
         
$wresized,  
         
$hresized,  
         
$width,  
         
$height  
     
); 

PHP Code:

    $textheight $hresized 2


johnreet 12-17-2010 01:23 PM

RE: Display Clicks and level in Sig image
 
It is possible, but since I did not use the text (it is difficult to load the server) I can not advise you on this. I removed the code Mystic Grove. I'm sure Brandon or Bloodrun could you explain it.


All times are GMT -5. The time now is 10:35 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.