khchen / wNim

Nim's Windows GUI Framework
MIT License
327 stars 17 forks source link

Large Bitmap creation issue #100

Open dinau opened 3 years ago

dinau commented 3 years ago

This is simplest program,

import wNim/[wBitmap] 
let bmp = Bitmap(2447,6000) 

This program emits wBitmapError exception when on execution, but change bitmap width to 2446 as follows,

import wNim/[wBitmap] 
let bmp = Bitmap(2446,6000)

is no problem. I don't know why the reason.

My environment: Window10 32bit wNim 0.13.1 nim-1.4.8 gcc version 10.3.0 (Rev5, Built by MSYS2 project)

khchen commented 2 years ago

I don't know why, your code works on my computer. wBitmap only use Windows system API. Maybe there is some reason lead your system don't support it? You can try different depth, for example: Bitmap(2447, 6000, 32), or even wImage.