Hi,
when I try to load an 8-bit graphic format (gif or bmp), I get the attached error message (PC). This happens only, when I want to draw with drawer.New2 (ImageList1.Item (0), B4PObject (5)) on this image. No problems with 24-bit formats.
__________________
Thanks for all
wolfgang
___________________
Desktop: Dual Core 3.0 GHz, Win7
Device: IPAQ 3970 WM 2003, Asus 632N WM5, HTC 3650 Cruise
GPS: iblue 747
It seems there is a GDI+ Graphics limitation - From MSDN
"Note You can only create Graphics objects from non-indexed .bmp files, such as 16-bit, 24-bit, and 32-bit .bmp files. Each pixel of non-indexed .bmp files holds a color, in contrast to pixels of indexed .bmp files, which hold an index to a color table."
Hi,
thank you all. The good news: This happens only on desktop. On PPC is no error.
The problem is not, that I can’t do this.The problem was that I want to save memory on PPC. But I found, that it doesn’t matter if you load the same file as a bmp (24-bit), jpg or a gif. In comparison to the desktop where the gif files are much smaller in RAM. On my device (ASUS 632N WM5) a 6 MB bmp or the same file as an 800 KB gif takes about 4 MB of memory(?!). But there is still a difference: bmp files can be loaded up to a size of ~ 1700 x 1700 pixels and gif files much bigger e.g. 2400 x 1800 pixels. I didn’t test the maximum.
@Klaus
wonderful software. But you don’t draw on your maps. Add an object named draw and this line of code:
The problem was that I want to save memory on PPC. But I found, that it doesn’t matter if you load the same file as a bmp (24-bit), jpg or a gif.
I'm afraid you can't save memory just by loading a different format. Jpg and gif are compressed formats for storing pictures in files. However pictures are always expanded to full bitmaps when loaded into memory no matter what the format of the source file.