青菜貓(孫宇博客),青菜貓(孫宇博客),青菜貓(孫宇博客)http://www.javasdc.cn/
          posts - 29,  comments - 63,  trackbacks - 0


             1,JS處理.(火狐不支持),是通過圖片的style.filter來(lái)控制.
             具體代碼
          <html>
          <head>
          <title> </title>
          <script type="text/javascript">
          function rotateImage() {
          imageToRotate = document.getElementById('imgRotate');          
          imageToRotate.style.filter= "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')";
          rotate()
          }
          var imageToRotate;
          //定義旋轉(zhuǎn)度數(shù),圖片太大,建義不要用
          var degreeToRotate=360;
          function rotate(){
          var deg2radians = Math.PI * 2 / 360;
          degreeToRotate++;
          degreeToRotate=degreeToRotate%360;                 
          rad = degreeToRotate * deg2radians ;
          costheta = Math.cos(rad);
          sintheta = Math.sin(rad);
          imageToRotate.filters.item(0).M11 = costheta;
          imageToRotate.filters.item(0).M12 = -sintheta;
          imageToRotate.filters.item(0).M21 = sintheta;
          imageToRotate.filters.item(0).M22 = costheta;
          }
          </script>
          </head>
          <body onload="rotateImage();">
          <br /> 
          <img id="imgRotate" src="test.JPG" />
          </body>
          </html>
          2.也是JS處理
          http://www.walterzorn.com/rotate_img/rotate_img.htm?A=90可以看看這個(gè),外國(guó)做的,可以在火狐用,但是圖片過大也不行,JS會(huì)變慢.
          大家可以參考一下,
          3.已經(jīng)在服務(wù)器已經(jīng)生成了,只需要調(diào)用了,我在項(xiàng)目是用的Jmagick(功能很強(qiáng)大,有生成的縮略圖.加水印,旋轉(zhuǎn)....)
          下篇文章介紹.
                                                                                                                                                                                                                                                      青菜貓

          posted on 2008-04-08 22:51 青菜貓(孫宇) 閱讀(660) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          <2008年4月>
          303112345
          6789101112
          13141516171819
          20212223242526
          27282930123
          45678910

          青菜貓(孫宇)結(jié)交天下朋友,在網(wǎng)上吸取知識(shí)..

          常用鏈接

          留言簿(16)

          隨筆分類

          隨筆檔案

          文章分類

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          青菜貓(孫宇博客),青菜貓(孫宇博客),青菜貓(孫宇博客)http://www.javasdc.cn/
          主站蜘蛛池模板: 那坡县| 都安| 东丰县| 崇左市| 临澧县| 连江县| 潮州市| 阿鲁科尔沁旗| 涟水县| 偃师市| 东城区| 宁化县| 荆州市| 嘉鱼县| 湘潭市| 万州区| 龙门县| 天长市| 闽清县| 开化县| 应用必备| 边坝县| 上栗县| 河西区| 阳西县| 余江县| 泽普县| 廉江市| 湟源县| 金门县| 久治县| 竹溪县| 丁青县| 彩票| 怀宁县| 民县| 芒康县| 丰原市| 集安市| 乾安县| 潜江市|