发布时间: 2012-07-19 16:02:19 作者: rapoo
等比例缩放边框函数等比例缩放边框:function DrawImage(ImgD,iwidth,iheight){ //参数(图片,允许的宽度,允许的高度) var image=new Image(); image.src=ImgD.src; if(image.width>0 && image.height>0){ if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } }else{ if(image.height>iheight){ ImgD.height=iheight; ImgD.width=(image.width*iheight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } } } }
JAVA基础-java中ET的差异
ByteBuffer跟String的互相转换
vim 编辑器的三种模式怎么切换
电脑编码
地图reduce编程模型介绍
Java基础java缓存读写资料小例子
学习jar下令 创建和解压jar文件包
java生成随机数、四舍五入、当前时间的
[猖獗Java讲义精粹] 第十一章|多线程
Java Thread 小结