Looking For the Best Way to Rotate an Image: JavaScript, PHP, HTML etc


 
Thread Tools Search this Thread
Top Forums Programming Looking For the Best Way to Rotate an Image: JavaScript, PHP, HTML etc
# 1  
Old 10-13-2011
Looking For the Best Way to Rotate an Image: JavaScript, PHP, HTML etc

Hey All,
What I'm looking for is a way to rotate an image by non 90 degree angles (ie 90, 180, 270, 360). I am able to do it in PHP, but there are errors in the image, some pixels end up colored incorrectly and the image ends up resized and I lose transparency. I've done my share of searching on Google and now I'm looking for a real solution. The icon that I'm trying to rotate is being generated in PHP, so a means of transforming the coordinates used in creating the image would work as well. Just wondering if there is a more reliable way of rotating an image (its a simple icon on a transparent background) in JavaScript or PHP or Perl or whatever. Ideally, just need to be able to send a query string to a web page so I can dynamically create and rotate an image by n degrees.
Any help will be appreciated.
# 2  
Old 10-13-2011
What did you try in PHP?

What kind of image is it? For best results when doing complicated things like rotation, it should be 24-bit color with alpha channel, not 8-bit color with a transparent color.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Web Development

Web development learning thread(Javascript, HTML, CSS, angular, vue.js).

Hello All, After getting inspired from Neo, I have started a bit of JS learning these days. Whenever I learn something I will try to post it here(as of now my learning is NOT exactly bookish where I am going chapter by chapter etc, it could be more like small-small project vice kind of), I... (25 Replies)
Discussion started by: RavinderSingh13
25 Replies

2. Shell Programming and Scripting

Embed image to the html script

hi, trying to embed an image to the html file to send out as an email. img src="data:image/jpeg;base64,$(base64 /home/test/abc.jpg but getting error as file not found after it aplies base64 on the file. (8 Replies)
Discussion started by: ATWC
8 Replies

3. Shell Programming and Scripting

Insert an image in HTML mail sent from Shell script

Hi Shell Experts I am trying to insert an image into HTML email through shell script send mail, I have the email text file which included body and the images included in it in html format. Through my Shell script, I am calling the text file and send it through email so it it sends the email with... (21 Replies)
Discussion started by: anji009
21 Replies

4. Shell Programming and Scripting

Download dynamic generated image from HTML page

I've an HTML page where the pie chart is generated with google java code with the required input values in UNIX. The HMTL page is generated in UNIX and then when it loads in browser, the code is interpreted thought internet and the pie chart is generated. This is done by the java code in the... (4 Replies)
Discussion started by: Amutha
4 Replies

5. Programming

Javascript question: using the image button

I have javascript that I want to use to build up a dynamic array: the user clicks on one or more images and when clicking the Show button, the list of image names is displayed that the user clicked. <script type="text/javascript"> var images = ; images =... (0 Replies)
Discussion started by: figaro
0 Replies

6. Shell Programming and Scripting

Javascript or HTML to retrieve apache username

I have a internal wesbite set up and any visitor must enter username / passwd as defined in apache (I've set these up using htpasswd) I use cgi scripts set up using ksh or javascript to populate pages / tables etc. I want to be able to get the apache username that the used authorised... (3 Replies)
Discussion started by: frustrated1
3 Replies

7. Web Development

Help with passing HTML values in to JavaScript

Not sure if this is the right place to ask this but here goes. I am creating a cheat sheet for co-workers. The concept is that you pick wire size and conduit size and the amount of wires that will fit is displayed. I haven't used alot of drop downs and can't quite figure out the way the get id... (3 Replies)
Discussion started by: zero3ree
3 Replies

8. Shell Programming and Scripting

Send mail with rich text / HTML with image

Hi, Is it possible to send mail from my HP-Ux system with images, rich text? I would like to program in such a way that I have my company's logo(.jpg) image attached in the mail geeting triggered. I would like to send a rich text/HTML email instead of plain text mail to the recipients. Is it... (2 Replies)
Discussion started by: rythym05
2 Replies
Login or Register to Ask a Question