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

  • SEARCH
  • Home
  • 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 3394710
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:12:10+00:00 2026-05-18T04:12:10+00:00

So I rotate an image with php and make the background transparent. The problem

  • 0

So I rotate an image with php and make the background transparent. The problem is that I get jagged edges. Is there any way to like anti-alias the edges?

I’m using http://www.exorithm.com/algorithm/view/rotate_image_alpha It was the only code i could find that would let me have transparency for the background

  • 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-05-18T04:12:10+00:00Added an answer on May 18, 2026 at 4:12 am

    I don’t have a solution for the jaggies produced by PHP’s rotation, but….

    You haven’t stated what you’re doing with the rotated images once they’ve been rotated? Are you just displaying them like that on the web site?

    If that’s all you’re doing, may I suggest you consider letting the browser do the rotation for you with CSS.

    The following stylesheet code will work with ALL current browsers (including older versions of IE):

    .tilted {
      transform: rotate(45deg);  /* CSS3 (for when it gets supported) */
      -ms-transform: rotate(45deg);
      -moz-transform: rotate(45deg);  /* FF3.5+ */
      -o-transform: rotate(45deg);  /* Opera 10.5 */
      -webkit-transform: rotate(45deg);  /* Saf3.1+, Chrome */
      font-weight:bold;
      filter: progid\:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476); /* IE6,IE7 */
      -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; /* IE8 */
    }
    

    (that’s a 45 degree tilt; feel free to modify it for other angles, though you’ll have to recalculate the radians for the IE6/7/8 filters yourself!). You may need to make other tweaks to get it working for yourself, like setting the height and width, etc, but all other CSS styles should continue to work as normal with this.

    Now you don’t need to have PHP do the hard work; the browser can do it. Even better, because it’s in the browser, you can do stuff like change the rotation on the fly with Javascript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://chrishorsnell.co.uk/emblem/rotate.php I am trying to make an image rotate. The jquery rotate plugin (
When you rotate an image using canvas, it'll get cut off - how do
How do you rotate an image with the canvas html5 element from the bottom
How do you rotate an image using jQuery-rotate plugin? I have tried the following
I'm looking for an algorithm that rotates an image by some degrees (input). public
I have a simple 3D cube that I can rotate using the following code:
I have a 3d object that I wish to be able to rotate around
rotate image on canvas around its center . i tried some example from net
Simple easy one. I am trying to rotate image inside divs and cycle back
I try to make following: Horizontal list of images, that I can select and

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.