harikrishna454 / jquery-rotate

Automatically exported from code.google.com/p/jquery-rotate
0 stars 0 forks source link

Rotation does not work for 'resized' images. #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Include an image with width/height attributes
2. Attempt to rotate it

What is the expected output? What do you see instead?
Expected the image to be properly rotated, instead the image is 
stretched/skewed.

Please provide any additional information below.
A quick fix is to set the oImage width/height attributes when it is 
created. Add
            canvas.oImage.width = p.width;
            canvas.oImage.height = p.height;
after line 31. Some work could be done to check if the width/height is set 
via the style attribute as well. 

Original issue reported on code.google.com by jeff.h...@gmail.com on 30 Mar 2007 at 9:40

GoogleCodeExporter commented 9 years ago
A workaround I'm using is to enclose the image inside a div, set the 
image/canvas have 
width and height to 100%, then resize the containing div.

Original comment by locol...@gmail.com on 3 May 2010 at 2:52

GoogleCodeExporter commented 9 years ago
You can change 

canvas.oImage.width = p.width;
canvas.oImage.height = p.height;

these both values in jquery.rotate.1-1.js to new resized values that will work.

Feel free to contact me if any query.

Prashant Gurav.

Original comment by p.gura...@gmail.com on 1 Jul 2010 at 6:48

GoogleCodeExporter commented 9 years ago
You'll find a patch here 
(http://code.google.com/p/jquery-rotate/issues/detail?id=11) which also seems 
to fix issue 3 

Original comment by carsten....@gmail.com on 6 Jul 2010 at 9:46

GoogleCodeExporter commented 9 years ago
Sorry for this missunderstanding but a jqueryrotate   in a different project 
(and different author) than jquery-rotate that I suppose is no longer supported.

Please check  a http://code.google.com/p/jqueryrotate/ for a different 
implementation that fixes most of problems that jquery-rotate has.

Original comment by wil...@gmail.com on 25 Jan 2011 at 11:34