Hi everybody,

I try to load a bitmap image 24bit color 4000x4000
pixel.
I always get an error after API LoadBitmap.
Also LoadImage do not work.

I try it by hand with DC's and CreateDIBitmap
getting the BitmapFileHeader ....
It also failed, but maybe I make an error here.


I want scroll the big bitmap in a 1024x768 window.
If I use a 1600x1600 pixel bitmap everything
works fine.

Any help or solution avaible ?


Thank you TD
Posted on 2002-01-11 07:37:04 by Test Department
maybe a silly question but have you tried opening in a simple program like paint? (just to see wether windows can do it) I've never even seen that large a bitmap before :-/
Posted on 2002-01-11 08:17:13 by Hiroshimator
Posted on 2002-01-11 08:21:25 by Hiroshimator
Hi Hiro,

?h, yes I try it with Irfanview and Paintshop.

The only hint I found at microsoft that
LoadBitmap fails if there is insuffuicent memory.

Hm, but I have 256 MByte ...
Do they mean my 4MB Graphic Ram ?
But 1600x1600x3=7680000 byte and that works.

Thanks for the microsoft link, I found some infos
about jpg and png !

TD
Posted on 2002-01-11 08:43:50 by Test Department
since you use LoadImage, do you have the bitmap as binary resource in your exe?

Maybe the linker or the resource compiler have build in some bugs?

If you can extract the bitmap correctly with any resource tool, its possibly ok.

Otherwise, there should be no limitation on 4000 Pixels (earliest at 16768 or 32768 Pixels)
Posted on 2002-01-11 09:08:36 by beaster
What are you using Win9X, or Win2K/Xp/Nt

I=on Win9X there is a control/Bitmap memory restriction. On my machine its around 2048x2048 in size for controls and bitmaps

On my Win2K machine its around 16384x16384

and this is at 32 bit depth
Posted on 2002-01-11 09:40:14 by Rockinronstar
Hi everybody,

yes beaster, a very clever idea.
unfortunatly, I can extract the big bitmap.

Ah rockin,
yes, I thought about the OS version.
But I was to lazy to switch my removable HDD ...
OK, now I test it.


bye TD
Posted on 2002-01-11 09:45:59 by Test Department
win95 has a 64k limit for resources, I don't know about the other 9x :-/
Posted on 2002-01-11 09:54:50 by Hiroshimator
Hi all,

Hiro, I also read that at microsoft.
That is not the solution.
I can't realize this hint now.
They speak about Win95 but I think they mean 3.11

Rockin,
Yeah, I test it with win2k.
Everything works fine now with 4000x4000 pixel.
So, you are right, there is a Limit on win9x !!!

Also the scroller routine works much better now.


Thank you all very much

TD
Posted on 2002-01-11 10:19:33 by Test Department
glad to be of help :)
Posted on 2002-01-11 10:32:42 by Rockinronstar
Loading bitmap files on your own is not that hard after all, just a simple header parser...

And do not forget i still use win98 :)

Besides LoadImage and GDI (SelectObject, CreatCompatibleBitmap etc) stuff will do color matching and conversions to curent display resolution, and this is not what you want if you want to process tha igame in some ways.

For example IfranView gives me the pixel from the screen when o use color picker, so i get wrong values for 16 bit color resolutions...i guess they fall for this and assumed everybody is in 32 bits resolution :(
Posted on 2002-01-11 12:27:18 by BogdanOntanu
TD,

I found some time ago that win95b that I use has some limitations in resource size. I found it with binary resources when I tried to include files over a meg or so and I ended up doing it a different way.

Regards,

hutch@movsd.com
Posted on 2002-01-11 16:19:03 by hutch--