Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8907523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:56:19+00:00 2026-06-15T02:56:19+00:00

I have a function that generates text that fits the lower part of a

  • 0

I have a function that generates text that fits the lower part of a circle. Because I do not know any other way that I can make the function fit the upper part of the circle so that it faces me, I want to rotate the image, write on it, rotate it back and again write on it. How can I do that without changing the name of the image?

I have tried something like this :

<?php
function  create_image()
{

$im = @imagecreate(140, 140)or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 255, 255, 255);

imageellipse ( $im , $cx , $cy , $size*2 , $size*2 , $black );

write($im,$cx,$cy,$size,$s,$e,$black,$text1,$font,$size,$pad);
imagerotate($im, 180,0);
write($im,$cx,$cy,$size,$s,$e,$black,$text2,$font,$size,$pad);
imagerotate($im, 180,0);

imagepng($im,"image.png");
imagedestroy($im);  

}
?>

<?php
create_image();
print "<img src=image.png?".date("U").">";
?>

But it doesn’t work. It doesn’t rotate the image.

Can you please help me?

Thanx !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:56:20+00:00Added an answer on June 15, 2026 at 2:56 am

    Not sure why you need to rotate twice .. but this is what your code should look like

    function create_image($img) {
        $im = @imagecreatefrompng($img) or die("Cannot Initialize new GD image stream");
        $rotate = imagerotate($im, 180, 0);
        imagepng($rotate);
        imagedestroy($rotate);
        imagedestroy($im);
    }
    
    header('Content-Type: image/png');
    $image = "a.png";
    create_image($image);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple service that generates a PNG image of any text, using
I have a function that generates a key of 4 characters that has to
I have a function that generates normal random number matrix having normal distribution using
I'll start off with a solid example: I have a function that generates hashes
I have a function that generates XML from a source. It works perfectly however,
I have a function that accepts a string and generates an email attachment based
I have a javascript function being called by an input type=image tag that generates
I have a function that generates a BouncyCastle RSA key pair. I need to
I have a jquery form spinner script that generates text fields based on user
I am trying to create a function that generates an rectangle with some text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.