本帖最后由 myownroc 于 2015-1-27 01:04 编辑
楼主这是我用脚本做的,是真的用脚本做的哦~
再来一张免得被认为是手绘的
干脆源代码都放出来好了(注意:不能在RM里用)
pWidth = 320 pHeight = 200 head = [] info = [] head = "BM".unpack("C*") + [pWidth * pHeight * 3 + 54].pack("L*").unpack("C*") + [0, 0].pack("S*").unpack("C*") + [54].pack("L*").unpack("C*") info = [40, pWidth, pHeight, 1, 24, 0, pWidth * pHeight * 3 + 4 - (pWidth * pHeight * 3) % 4, 0, 0, 0, 0].pack("LLLSSLLLLLL").unpack("C*") bmHeader = head + info bmClrTable = [] (pWidth * pHeight).times{bmClrTable += [random(256), random(256), random(256)]} bmFile = bmHeader + bmClrTable file = File.open(File.dirname(__FILE__) + "\\result.bmp", "wb") bmFile.each{|x| file.print [x].pack("C*")} file.close
pWidth = 320
pHeight = 200
head = []
info = []
head = "BM".unpack("C*") + [pWidth * pHeight * 3 + 54].pack("L*").unpack("C*") + [0, 0].pack("S*").unpack("C*") + [54].pack("L*").unpack("C*")
info = [40, pWidth, pHeight, 1, 24, 0, pWidth * pHeight * 3 + 4 - (pWidth * pHeight * 3) % 4, 0, 0, 0, 0].pack("LLLSSLLLLLL").unpack("C*")
bmHeader = head + info
bmClrTable = []
(pWidth * pHeight).times{bmClrTable += [random(256), random(256), random(256)]}
bmFile = bmHeader + bmClrTable
file = File.open(File.dirname(__FILE__) + "\\result.bmp", "wb")
bmFile.each{|x| file.print [x].pack("C*")}
file.close
|