Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

RESIZE AND ROTATE IMAGES USING MOUSE

Posted on 2004-04-16
6
Medium Priority
?
1,271 Views
Last Modified: 2013-12-25
i want the mouse to control the image, and so accordingly it should enlarge an image and rotate it.

How can this be achieved? Please provide samples of code if possible.
0
Comment
Question by:zhussai7
4 Comments
 
LVL 30

Expert Comment

by:weed
ID: 10843744
In...Photoshop? What are you trying to do, in what program, and for what purpose?
0
 
LVL 9

Expert Comment

by:j3one
ID: 10844319
I not sure, but I think you mean that you want people to be able to move or rotate images in your website, right?

-> flash or director will do the trick. if you are wanting to do this with code in the html, the only thing I can think of is dhtml or javscript ->http://www.experts-exchange.com/Web/Web_Languages/JavaScript/
0
 
LVL 4

Accepted Solution

by:
monolith_888 earned 1000 total points
ID: 10844897
Here's a good start:

-monolith_888

==================

<html>
<head>
<title>T2</title>
<style type="text/css">
span {cursor:hand;color:#666;font-family:tahoma;font-weight:bold;font-size:12px;margin-left:10px;margin-right:10px;border:1px solid #000;padding:2px;width:50px;text-align:center;}
</style>
<script type="text/javascript">
<!--
var imgState =
      {
      zoom  : 1,
      flip  : 'fliph'
      };

function rotate( way )
      {
      var theImg = document.getElementById('myImg');
      var theDiv = document.getElementById('flipper');
      imgState.flip  = (imgState.flip == 'fliph') ? 'flipv' : 'fliph';
      theImg.style.filter = imgState.flip;
      }
      
function zoom( which )
      {
      var theImg = document.getElementById('myImg');
      imgState.zoom = (which == 'in') ? imgState.zoom += .1 : imgState.zoom -= .1;
      theImg.style.zoom = imgState.zoom;
      }
// -->
</script>
</head>
<body>
<span onclick="location.reload();" style="border:0px;">reset</span><P>
<span onclick="rotate('cl');">flip</span>
<span onclick="zoom('in');">+</span>
<span onclick="zoom('out');">-</span>
<P></P>
<img src="http://www.blakeanddawn.com/ee/sunset.jpg" id="myImg">
</body>
</html>
0
 
LVL 10

Assisted Solution

by:Havin_it
Havin_it earned 1000 total points
ID: 10858849
Think you'd be better off with a Java applet - a few examples (free) at

http://www.javascriptkit.com/java/

Or this version (very inventive, but requires Perl)

http://www.gifworks.com/

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question