Jump to content

ireallylikepie

Members
  • Posts

    13
  • Joined

  • Last visited

About ireallylikepie

  • Birthday 08/03/1989

Profile Information

  • Gender
    Male
  • Location
    South Africa

ireallylikepie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeah, haha, realized that shortly after replying to the post. (: Thanks again !
  2. Ahh nevermind I've fixed it!(: Was missing the & Thank you so so so much for all your help! I truly appreciate it.
  3. I can't seem to get the variables from one php file to the other. :/ Should I be using include or $_GET ?
  4. No, I created a textbox in which the user could input their desired background color. On mainpage.php, $back = $_GET['backgroundinput'] and then I print <body style='background-color:$back;'></body>
  5. Ahhh! Am I doing something wrong --- now no image shows up!! <?php $im = imagecreatefrompng($_GET['i']); include 'mainpage.php'; $bg = $back; $im = imagerotate($im, $_GET['r'], $bg); header('content-type: image/png'); imagecolortransparent($im, $bg); imagealphablending( $im, false ); imagesavealpha( $im, true ); imagepng($im); imagedestroy($im); ?>
  6. Yes, however, I made it so that the user could choose the background color. Is it possible to use a variable in imagecolorallocate?
  7. Yes. I think I know what the problem is though. I added these two lines as well, to keep the original image background transparent. imagealphablending( $im, false ); imagesavealpha( $im, true ); When I remove those two lines, the image background isn't transparent, but the pink corners are gone.
  8. I must have something else wrong in my code then, because i see this: (Turquoise is the current background of the site)
  9. I've tried : imagesavealpha( $im, true ); and changing the code you've provided with: $im = imagerotate($im, $_GET['d'], 0); but it still doesn't seem to work. D:
  10. The rotating worked! However, my images were basically all in black with a transparent background, but for some reason the rotating cause there to be a white background for each image. I'm guessing that this is from the image colorallocate... so is there someway I can make do without it ? No, I would like each image to rotate by a randomly generated degree. So you're saying I could use a <div style = ""></div> ?
  11. Hmmm, I'm not sure what language this is, and how I would put it into my php loop. Yay! It works now. (: Hmm, but if I want each picture to rotate a different number of degrees, wouldn't I have to put it into the php loop? Could I use: echo file_get_contents('picture.css'); And then in the separate css file would I put in: .image-box img { transform: rotate($degree); -moz-transform: rotate($degree); -webkit-transform: rotate($degree); } I'm not sure if you can put in variables in CSS, or how to put something in php under a class. :/
  12. Hi, New coder here! I'm making a php If loop that will post my image a set number of times (depending on user input in a text box), and I have that all figured out. However, I can't figure out how to rotate the image a random amount of degrees and have a random width/height for each image. Will rand generate new numbers for each time the image is echo-ed, or will it give the same number for all images? This is what I have: <?php function pic($picture) { $degree = rand(0,360) $num = rand(50,250) $total = 0; while ($total < $picture){ echo '<img src=blabla.gif width="$num" height="$num">'; $total = $total + 1; } } $picture = $_GET['input']; $a = pic($picture); } ?> Thanks in advance!
×
×
  • 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.