どうしたらもっと早くできるでしょうか?
#define IMAGE_NAME "img.bmp" exist IMAGE_NAME FileSize = strsize mes "FileSize: " + FileSize + " bytes" sdim buf, FileSize bload IMAGE_NAME, buf mes "--- Read File ---" sdim bfType wpoke bfType, 0, wpeek(buf, 0) bfOffBits = lpeek(buf, 10) bfSize = lpeek(buf, 2) bcWidth = lpeek(buf, 18) bcHeight = lpeek(buf, 22) bcBitCount = wpeek(buf, 28) screen 0, bcWidth, bcHeight mes "bfType: " + bfType mes "bfOffBits: " + bfOffBits mes "bfSize: " + bfSize mes "bcWidth: " + bcWidth mes "bcHeight: " + bcHeight mes "bcBitCount: " + bcBitCount if (bcBitCount != 24) & (bcBitCount != 32) { dialog "24bit, 32bit 以外はサポートされていません" end } wait 200 px = 0 py = bcHeight - 1 index = bfOffBits repeat bcHeight px = 0 repeat bcWidth b = peek(buf, index) g = peek(buf, index + 1) r = peek(buf, index + 2) if (bcBitCount == 24) { index += 3 } else { index += 4 } color r, g, b pset px, py px++ loop py-- loop
私はこの画像を使いました↓
https://www.google.co.jp/search?q=24bit+bmp&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiloJSz167NAhWBpZQKHRjZD5EQ_AUICCgB&biw=1600&bih=746#imgrc=KDfIWgRCrN1J8M%3A