PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 11, 2022

[FIXED] How can I "flip" an image using PHP?

 October 11, 2022     gd, php     No comments   

Issue

Possible Duplicate:
How to resize an image using PHP?

Here's what I've tried:

$image = "images/20100609124341Chrysanthemum.jpg"; 
$degrees = 40; 
// Content type 
header('Content-type: image/jpeg'); 
// Load 
$source = imagecreatefromjpeg($filename);
// Rotate 
$rotate = imagerotate($source, $degrees, 0);
// Output 
imagejpeg($rotate); 

...But I get no output. Can anyone tell me what's wrong with this?


Solution

Using the image rotate function: http://php.net/manual/en/function.imagerotate.php



Answered By - zaf
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing