Geoff,
I just loaded a known 24bit .bmp image into 'Image Editor' where it
displayed correctly, then I saved it under a new name. Then when viewing
both images using the 'Picture' Application installed on my iPaq 22xx, the
new image is skewed, whereas the original isn't. Strangely, though, on
reloading the skewed copy to 'Image Editor', it displays correctly, as did
the original.
So it would seem the underlying problem is more complex than I originally
surmised. I still haven't looked at the code in any detail or made any
changes to it , but can see that the saved copy is smaller (45.9K 145w*160h)
than the original (68.4K 145w*160h) and therefore I'm guessing that it has
been saved as a 16 bit colour depth. Maybe the sample just isn't intended
to cope with the above scenario in it's raw state, i.e. load a 24 bit
bitmap, save it as 16 bit.
Now, the next bit of testing I've just done is even more interesting, the
Image viewer portion of the application I'm in the process of writing
displays both the original and the saved 16bit version correctly. So.....
I'm beginning to think that in fact it's the 'Picture' application that
comes installed on the new Windows Mobile 2003 Pocket PCs that doesn't
handle 16bit bitmaps correctly and that both the sample and my code do.
Therefore, (I'm testing as I'm writing this) I apologise, it seems the Image
Editor Sample is in fact fine...... but the installed (in Rom) 'Pictures'
Application, pimg.exe doesn't.... Ouch, sorry I wasted your time checking
the sample, but perhaps you'd better talk to the pimg.exe 'team'.
My apologies, it was a bit late last night (actually early this (or now
yesterday) morning) when I looked at the sample, I should have investigated
more before commenting, but I'd coincidently spent much of the day writing
bitmap saving code and had been using the pimg.exe to test the results,
thinking it must be solid.
Regards
Paul
Geoff Schwab said:
Hi Paul,
I did some testing and cannot seem to reproduce this problem. I tried
images of varying sizes and saved them as 16 and 24 bit bitmaps and they
look fine in the ImageEditor on the device, IE on the device, Paint on the
PC, and Windows Picture Viewer on the PC. I don't think the 32-bit
alignment should be an issue since the bitblt automates that and that would
be the case for 16 bit images as well as 24.
Could you please give me a scenario that causes this problem, including the
size and format of the original image and what changes you made to save it
as 24-bit - I assume just changing the third parameter to
BitampFile.SaveToFile?
Thanks,
Geoff Schwab
Program Manager
Excell Data Corporation
http://msdn.com/mobility
http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
http://msdn.microsoft.com/mobility/...4-9d17-fd6767e66908/SaveBitmapSampleSetup.exe with