Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Siggy.php destroys outline. (http://www.mysidiaadoptables.com/forum/showthread.php?t=862)

mattalien 05-28-2009 08:47 AM

RE: Siggy.php destroys outline.
 
Although I know what he means by the transparent outline. In the code for GD images, It makes a black background, then makes the black colour transparent. This also affects the sprites for his adoptables, as they have black outlines.

Hope this clears up any misunderstandings!

:)

trollis76 05-28-2009 09:00 AM

RE: Siggy.php destroys outline.
 
*Her* adoptables. I am a "She".
Do you know where it states that it makes the bg black? 'Cause then I could change it into something else..?

mattalien 05-28-2009 09:06 AM

RE: Siggy.php destroys outline.
 
Sorry.......

And I've tried that, but it didn't work.

the part is:

PHP Code:

      // Lets create the image and save its transparency  
      
$img_old = @imagecreatefromgif($image);  
      
imagealphablending($img_oldtrue);  
      
imagesavealpha($img_oldtrue);
   
     
// Lets copy the old image into the new image with  
     // the given size  
     
ImageCopyResampled(  
         
$img_temp,  
         
$img_old,  
         
0000,  
         
$width,  
         
$height,  
         
$width,  
         
$height  
     
);  
   
    
    
$textheight $width 2;

    
$image $img_temp;

    
$bgi imagecreatetruecolor($newwidth$newheight);

    
$color imagecolorallocate($bgi515151);


    
$str1 "Name: ".$name;
    
$str2 "Owner: ".$owner;
    
$str3 "Click Here to Feed Me!";
    
$str4 "More Adopts at:";
    
$str5 "www.".$domain;


    
imagestring ($image120$textheight,  $str1$color);
    
imagestring ($image120$textheight 13,  $str2$color);
    
imagestring ($image120$textheight 26,  $str3$color);
    
imagestring ($image120$textheight 42,  $str4$color);
    
imagestring ($image120$textheight 55,  $str5$color);

    
$background imagecolorallocate($image000);  
      
ImageColorTransparent($image$background);  
 
    
header("Content-Type: image/GIF");
    
ImageGif ($image);
    
imagedestroy($image);
    
imagedestroy($img_temp);
    
imagedestroy($img_old);
    
imagedestroy($bgi); 

this part: $background = imagecolorallocate($image, 0, 0, 0);, is where it selects the colour.

trollis76 05-28-2009 09:56 AM

RE: Siggy.php destroys outline.
 
Well... Then I need to figure out what those zeros mean. :)
Thank you Mattalien.[hr]
Googled a bit, and found that if you make the first zero a 225 it should be red instead of black... Going to test it though.

Bloodrun 05-28-2009 09:59 AM

RE: Siggy.php destroys outline.
 
Quote:

Originally Posted by trollis76
Well... Then I need to figure out what those zeros mean. :)
Thank you Mattalien.[hr]
Googled a bit, and found that if you make the first zero a 225 it should be red instead of black... Going to test it though.

php.net is your friend:

http://id2.php.net/manual/en/function.imagecolorallocate.php

trollis76 05-28-2009 10:01 AM

RE: Siggy.php destroys outline.
 
Well... That was exactly what I found when I googled. ^^[hr]
I've fiddled a little bit 'round with the numbers, and it goes well except that it won't make it red and then transparent, but black and then keeping it that way. :)


All times are GMT -5. The time now is 11:16 PM.

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