Solved

RESIZE AND ROTATE IMAGES USING MOUSE

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

821 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