在Web下如何放大缩小,平移JPG格式图片?

sugengnn 2005-08-23 08:36:51
web方式下:
JPG或TIF图片浏览有什么好的Activex控件或其它好的办法吗?
要求能对图片进行放大缩小,平移
...全文
295 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
sugengnn 2005-08-24
  • 打赏
  • 举报
回复
mapXtream或GDI+ 在网上有没有例子可以看看呀
稍微有点无敌 2005-08-23
  • 打赏
  • 举报
回复
GDI+可以胜任!
我不懂电脑 2005-08-23
  • 打赏
  • 举报
回复
使用mapXtream功能很强大
fphuang 2005-08-23
  • 打赏
  • 举报
回复
用客户端的JS来实现吧,如下面的:

http://www.neau.edu.cn/guoji/bak/pic_manager/Photo_Show.asp?PhotoID=1342

你可以另存下来,看看其中的JS代码或许就可以了
yezhutou 2005-08-23
  • 打赏
  • 举报
回复
mark
jamex 2005-08-23
  • 打赏
  • 举报
回复
mapInfo
adandelion 2005-08-23
  • 打赏
  • 举报
回复
转贴-- zeusvenus(清柳) ( ) 信誉:
---------------------------------------
#1 用鼠标滑轮缩放图片的功能(JS代码)

在<head></head>之间加入
CODE:[Copy to clipboard]
--------------------------------------------------------------------------------

<script language="javascript">
function bb_img_onmousewheel(o){
var zoom = parseInt(o.style.zoom, 10) || 100;

zoom += event.wheelDelta / 12;
if (zoom > 0) o.style.zoom = zoom + '%';

return false;
}
function bb_img_resize(o){
if(o.save_size != true)return false;
var zoom = parseInt(o.style.zoom, 10) || 100;
if(o.resize == null){
o.resize = (o.width != o.org_w || o.height != o.org_h)?true:false;
}
if(!o.resize){
o.width = o.dis_w;
o.height = o.dis_h;
o.resize = true;
}else{
o.width = o.org_w;
o.height = o.org_h;
o.resize = false;
}
o.style.zoom = "100%";
return false;
}
function bb_img_save_size(e, o){
if(o.save_size)return false;
o.org_w = o.width;
o.org_h = o.height;
if(e == "resize"){
if(o.width > screen.height/3){
o.width = screen.height/3;
}
if(o.height > screen.height/3){
o.height = screen.height/3;
}
}else if(e.substr(0, 7) == "resize_"){
var pct = e.substr(7);
if(o.width > screen.height/pct){
o.width = screen.height/pct;
}
if(o.height > screen.height/pct){
o.height = screen.height/pct;
}
}
o.dis_w = o.width;
o.dis_h = o.height;

o.save_size = true;
return false;
}
</script>
在要用这个功能的图片img中加入:
CODE:[Copy to clipboard]
--------------------------------------------------------------------------------

return bb_img_save_size('resize_$width_each_pic',this);" onmousewheel="return bb_img_onmousewheel(this)
例如:
<img src="http://www.uplinux.com/logo.gif" border=0 return bb_img_save_size('resize_$width_each_pic',this);" onmousewheel="return bb_img_onmousewheel(this)>
就改为
<img src="http://www.uplinux.com/logo.gif" border=0 return bb_img_save_size('resize_$width_each_pic',this);" onmousewheel="return bb_img_onmousewheel(this)>
flyboy20 2005-08-23
  • 打赏
  • 举报
回复
帮顶

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧