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


             1,JS處理.(火狐不支持),是通過圖片的style.filter來控制.
             具體代碼
          <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è),外國做的,可以在火狐用,但是圖片過大也不行,JS會(huì)變慢.
          大家可以參考一下,
          3.已經(jīng)在服務(wù)器已經(jīng)生成了,只需要調(diào)用了,我在項(xiàng)目是用的Jmagick(功能很強(qiáng)大,有生成的縮略圖.加水印,旋轉(zhuǎn)....)
          下篇文章介紹.
                                                                                                                                                                                                                                                      青菜貓

          posted on 2008-04-08 22:51 青菜貓(孫宇) 閱讀(656) 評(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/
          主站蜘蛛池模板: 黎平县| 红河县| 阿拉善盟| 耒阳市| 潞城市| 嘉善县| 安乡县| 天柱县| 汕头市| 都江堰市| 永昌县| 富蕴县| 德昌县| 宜城市| 化州市| 凌源市| 泾川县| 古交市| 万州区| 甘肃省| 萍乡市| 北流市| 余江县| 甘泉县| 衡山县| 武宣县| 白山市| 齐河县| 探索| 闸北区| 鹤庆县| 台东市| 长白| 汪清县| 星子县| 诏安县| 太康县| 江津市| 庆云县| 南陵县| 武邑县|