App hangs on LoadPicture when file is corrupt
Good morning, group.
I was wondering if anyone else has noticed that if you try to use the
LoadPicture method for a Picture Box, and the file you are trying to load is
corrupt in any way, that the application hangs indefinitely.
Has anyone else experienced this? Have you found a way to trap for corrupt
As always, all help is greatly appreciated.
Re: App hangs on LoadPicture when file is corrupt
> I was wondering if anyone else has noticed that if you try to use the
> LoadPicture method for a Picture Box, and the file you are trying to load
> corrupt in any way, that the application hangs indefinitely.
> Has anyone else experienced this? Have you found a way to trap for
I've experienced the same problem too only in some situations though (And
annoyingly I can't determine what the cause of those situations are so I've
no idea of how to detect it) however I've only experienced it (As far as I
can remember) on bad JPEG images.
I ended up spending a long time adding a new image import system to my
application using a combination of different methods to load various
different images; using my own libraries for BMP (For better support of RLE
compressed images, LoadPicture() will often just throw large 8-bit RLE
images out and seldom even attempts 4-bit RLE) and a few other formats.
Then IJL for JPEG's and finally LoadPicture() for GIF's only (To avoid some
licensing issues with the format).
At some point I may get round to releasing the image import/export OCX
however at the moment there's still a lot of work to be done on it. You'll
find information on each format over on www.wotsit.org if you want to give
it a shot yourself though.
Hope this helps,
-- EDais --
- Microsoft Visual Basic MVP -
Work E-Mail: EDais@btclick.com
Other E-Mail: Mike.Sutton@btclick.com
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center