Solved

RESIZE AND ROTATE IMAGES USING MOUSE

Posted on 2004-04-16
6
1,221 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
6 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 250 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 250 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn how to dynamically set the form action using jQuery.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now