Copyright statement: Reprinted with a hyperlinkArticleSource and author information and this statement
Http://chenet.blogbus.com/logs/28263560.html
Remote Desktop recentlyTo transmit images between the server and the client. Because the image is in the BMP format and the image size is large, you need to compress it into JPG format for transmission. I found a method to call the external library (jpgdll. dll) after finding it online for a long time. However, errors often occur during use.
I was notified later that the cimage class exists!
Example of the cimage class in msdn2005:
MS-help: // Ms. VSCC. v80/ms. msdn. v80/ms. visualstudio. v80.chs/dv_vcsample/html/4b6a0e30-5e37-4ef2-ae84-061540fa80e2.htm
To use this class, add # include <atlimage. h> to stdafx. h.
Save BMP as JPG:
Cimage image;
Image. Load (text ("E: // images // 1.bmp"));// Load the image
Image. Save (text ("E: // images // 1.jpg"));// Save as image
Display jpg:
Cimage image;
Crect zcrect;
Getclientrect (& zcrect );
Image. Load (text ("E: // images // 1.jpg"));
Image. Draw (getdc ()-> m_hdc, zcrect. Left, zcrect. Top, zcrect. Width (), zcrect. Height ());// Display the image
Other similarities.