Jump to content

Patriot

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Patriot's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks for helping. I'm having trouble with the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php $image = imagecreatefrompng("images/esuom.png"); if(!$image) die("Error loading image."); $text_color = imagecolorallocate($image, 13, 37, 62); $x = 100; $y = 30; $fontsize = 12; $fontfile = "fonts/VAG Rounded BT.ttf"; $text = "Hello World!"; imagettftext($image, $fontsize, 0, $x, $y, $text_color, $fontfile, $text); header('Content-type: image/png'); imagepng($image); imagedestroy($image); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> </body> </html> I have it uploaded here: http://imobworld.com/dynamicsigs/ Does anyone know what's wrong? Thanks, Gil
  2. Haha it worked like a charm. THANK YOU SOOO MUCH!
  3. The gift on the right side is dynamically placed on the background using image copy. Before the copy, the image of the gift looks fine. Now it loses color and turns pinkish. CODE: $banner = imagecreatefromgif("tbg1.gif"); $prizeimage = imagecreatefromgif("tgt1.gif"); $fontcolor = imagecolorallocate($banner, 0, 0, 0); imagettftext($banner, 13, 0, 7, 74, $fontcolor, "myriadregpro.otf", "Stuff: " . $prize); imagecopyresampled($banner, $prizeimage, 312, 4, 0, 0, 84, 97, 84, 97); Does anyone know what is wrong?
  4. Yes, they're both gif's... the other used to be PNG but we changed it (that's just the old version, the messed up images are based on the new version). Any ideas?
  5. It's all .gif... Thanks for the reply! (the top one is now .gif... it just wasn't when I uploaded that) Any idea why it's not working?
  6. What our page does is takes a background and places a picture of a gift on it using imagecopy. We also tried the imagecreatetruecolor function, but that didn't work either; if you know anything about it, please post. Background: .gif, 400 * 105 Gift: .gif, 84 * 97 ================================== Examples: ================================== Separated images: ================================== Does anyone know why the prize is losing color/resolution when placed on the background? Thanks, Gil
  7. The following code: $banner = imagecreatefromgif("backgrounds/sigt" . rand(1,6) . ".gif"); $prizeimage = imagecreatefromgif("prizes/ps3.gif"); $fontcolor = imagecolorallocate($banner, 0, 0, 0); imagettftext($banner, 13, 0, 7, 73, $fontcolor, "MyriadPro-Regular.otf", "Freebie: " . $prize); imagecopy($banner, $prizeimage, 312, 4, 0, 0, 84, 97); Selects a random background and writes text on it. While the text should be black, it is becoming partially transparent on some backgrounds, making it gray or almost invisible. Does anyone know why this is? Thanks!
  8. Thanks for the reply! I'm taking the iPod and placing it on the background. It seems to be losing quality when it is placed on the background, as you can see in the first image. The colors on the iPod have degraded.
  9. Sorry, it got messed up. Here's the image:
  10. The following iPod Touch is placed on the image with imagecopy. The code is: // selectPrizeImage() is a function that tells it which image to use for the freebie, don't worry about that. $prizesimage = imagecreatefrompng(selectPrizeImage($prizenumber)); imagecopy($banner, $prizesimage, 303, 0, 0, 0, 97, 105); Does anyone know why the quality is so poor?
  11. Hey, I saw you were helping people with mod_rewrite and was wondering if you could please help me. This works fine: RewriteEngine On RewriteBase / RewriteRule ([0-9]+).png sig/index.php?g=$1 And this one doesn't... (loads a smarty tpl file for some reason.) RewriteEngine On RewriteBase / RewriteRule ([0-9]+).html tutorials/promo-page.php?p=$1 I have everything placed in the respective folders correctly. Any ideas? Thanks, Gil
  12. Haha thanks everyone! mod_rewrite did the trick! Ex: http://freebiemachine.com/images/sig/100.png Change 100 to whatever you want
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.