How to show JPG fast?

  • Thread starter Thread starter Sven Sauter
  • Start date Start date
S

Sven Sauter

Hi!

How can I show a JPG image in a Picturebox in a fast way? Using the Bitmap
constructor is very slow on my device (200k picture takes about 2 seconds)?

Any sample code how using the imgdecmp.dll to do this?

Thanks
Sven
 
You can try to "pre-load" your image first by creating a Bitmap object and
then use it when it's needed. Something like that:

Bitmap image = new Bitmap("/image.jpg");

.....

pictureBox.Image = image ;
Any sample code how using the imgdecmp.dll to do this?

The usage of this dll requires callbacks which are not supported in .NetCF
v1. You can try to write a native wrapper that will expose it for CF.
 
Dear Alex

Thanks for your answer. If the images were static, this is a fine solution,
but my images are coming from a Ethernet Web-CAM, so I need the re-build the
bitmap every time I get a new picture.

Sven
 
Back
Top