[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[工具合集] cmd窗口显示图片

这个我开始也感到意外,但是确实做到了;

用法: 程序名 参数

第一个参数为位图文件的路径

大家可以找一个bmp图片拖放到cmd窗口试试,哈哈,有惊喜!

送三方命令行程序如下:
(请保存下面代码为test.vbs,桌面双击它获得改程序)
  1. bs=_
  2. "NpFkAMAAAAABAAAA//PAAgLAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYDAAA4wH66AA0mQzhgbAM1cIUhWazBCcy92ZyFWbgMWYu52b0BiYlBic15GIp5GIE90Ug02bkVmLN0gCkAAAAAAAAAwz"+_
  3. "nhQjLagZevoBm59iGYm3pnRde3oBm5N5Zwm3AagZejgGo5tiGYm3knhYejoBm59iGcm3TagZe3LIt5tiGYm3Sl2YotoBm5NAAAAAAAAAAAAAAAAAAAAAQVEAAwUADAwBBcXTAAAAAAAAAAA4A8QALEgBAAAEAAAAQAAAAAEAAA6U"+_
  4. "AAAAQBAAAAGAAAAAABAAQAAAAIAAAQAAAAAAAAAAEAAAAAAAAAAAwBAAAABAAAAAAAwAAAAAAAAEAAAEAAAAAABAAABAAAAAAAAEAAAAAAAAAAAAAAAAgBAA0EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+_
  5. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQVQhFMAAAAAAAQAAAAQAAAAAAAAAABAAAAAAAAAAAAAAAAAAAgAAA4VBFWxAAAAAAAQAAA"+_
  6. "AAFAAAgBAAAAEAAAAAAAAAAAAAAAAAA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FhXa0Blc"+_
  24. "vNWZzNHAAAgQpRnQsRHAAUGepRHAAcUZ0R0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+_
  25. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"+_
  26. "":set rs=CreateObject("ADODB.Recordset")
  27. set ado=CreateObject("ADODB.Stream")
  28. l=len(bs):ss="":for k=1 to l step 4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)
  29. rs.fields.append "b",205,l/2:rs.open:rs.addnew:rs("b")=ss+chrb(0):rs.update
  30. ado.mode=3:ado.type=1:ado.open:ado.write rs("b").getchunk(l/2)
  31. ado.savetofile "bmp.exe",2:ado.close
  32. function ub64(s):dim t(4),b(3):ub64="":n=len(s):r=2
  33. if n mod 4<>0 then exit function:end if:for i=1 to n step 4:for j=0 to 3
  34. a=asc(mid(s,i+j,1)):if a=43 then:a=62:else if a=47 then:a=63:else if a>47 and a<58 then:_
  35. a=a+4:else if a=61 then:a=0:if r=2 then r=j-2:end if:else if a>64 and a<91 then:_
  36. a=a-65:else if a>96 and a<123 then:a=a-71:else:exit function:_
  37. end if:end if:end if:end if:end if:end if:t(j)=a:next
  38. b(0)=t(0)+t(1)*64 mod 256:b(1)=t(1)\4+t(2)*16 mod 256:b(2)=t(2)\16+t(3)*4
  39. for j=0 to r:if b(j)<16 then ub64=ub64+"0":end if:ub64=ub64+hex(b(j))
  40. next:next:end function
复制代码

[ 本帖最后由 plp626 于 2011-3-9 12:38 编辑 ]
6

评分人数

    • kdXiaoyi: 牛!但是有个小BUG:Win7x64只能显示部分图 ...技术 + 1
    • qc5111: good技术 + 1
    • tmplinshi:PB + 10 技术 + 1
    • zm900612: 我想知道怎么给别人PB+1?技术 + 1
    • foxJL: 重大发现PB + 10

回复 38# cmd1152

图片太大,缩小就能显示全了
为什么说我在做无用的东西呢

TOP

这个网上也用,但没有这里早,我试过了,不过为什么图片显示不全呢???

TOP

十年前的帖子啊

TOP

回复 28# wangchao 修改颜色,再改回来就清除了,亲测有效
@echo off
color 1f
bmp.exe name.bmp
pause>nul
color 1a
color 1f
pause

TOP

显示出来 有啥实际用处?

TOP

太厉害了,只是怎么改变图片所在位置,大神能给讲一下吗

TOP

鄙人不才,问点问题。
我想说的是:为什么只显示左上角?用它能够显示全吗?

TOP

这个强悍!!!
如果能显示除bmp之外的其他图片格式就爽了~
echo hello

TOP

顶。、  楼主了不得
莫求昨天无悔,但愿今日无愧。

TOP

强悍!!
楼主太厉害了~~

TOP

这个想法不错,创意很好,可惜我完全看不懂。

TOP

而且用鼠标拖拽cmd窗口的大小时会使图片消失
批处理,纯净的技术天地

TOP

cls无法清掉图片
批处理,纯净的技术天地

TOP

捷克這真是太神奇了! 讚一個!!

TOP

返回列表