Problem with dzImage library

HARRY

Active Member
Licensed User
Longtime User
Hi everybody,

I need to save images of various dimensions in the size of the PDA display, 320 * 240. To this end I have written a program with does the following:

Create an image control at display size
Load into that control the original picture file
With dzImage Capture the screen 0,0,320,240
Save the screen with SaveImageBMP

The program runs well, but

1) on the PC a picture file is created with a size of 301KB where as 260 KB is expected. The Windows Explorer reports an image of 320 * 240, but displaying the image shows the original picture with at the bottom an extra bar of say 40 lines.

2) On the PDA only the left top of the original image is put in the new file; the file size is correct. Apparently not the screen is captured, but only a part of the underlaying image file.

Attached is a small program which demonstrates my problem.

Am I or is the dzImage library doing something wrong ?

Harry
 

agraham

Expert
Licensed User
Longtime User
The desktop problem occurs because the client area is not the size you expect. This is a long standing "feature" of Basic4ppc on the desktop - it does not correctly take into account the width of the window borders so the actual client area varies according to the OS and the display setting in use. Erel has indicated that this should be fixed in the next version.

On the device I get a totally black bitmap of the correct size. In fact I can't get either of the screen capture methods to work. I'm afraid that I don't know if I'm being stupid and missing something or whether those methods are broken!
 

HARRY

Active Member
Licensed User
Longtime User
Hallo Agraham,

Many thanks. It now works fine with your new library. One of the problems I had with the szImage library was due to the fact that I minimized the demo program too much by ignoring the fact that my new PDA has a higher resolution. Anyhow, I can now work with just the ImageEx library, which makes the code simpeler to understand.

Harry
 
Top