// Ipicture * ppicture = NULL; uploaded Image
Ccomptr <istream> pfilestram;
Createstreamonhglobal (null, true, & pfilestram );
Long size;
HR = ppicture-> saveasfile (pstream, true, & size );
Char pathbuf [1024];
Cfile iconfile;
Iconfile. Open (text ("C: // bb.bmp"), cfile: modecreate | cfile: modewrite );
Large_integer Li;
Li. highpart = 0;
Li. lowpart = 0;
Ularge_integer ulnewpos;
Pstream-> seek (Li, stream_seek_set, & ulnewpos );
Ulong ureadcount = 1;
While (ureadcount> 0)
{
Pstream-> Read (pathbuf, sizeof (pathbuf), & ureadcount );
If (ureadcount> 0)
Iconfile. Write (pathbuf, ureadcount );
}
//*****************************
The ipicture render method can be used to display the stretch image. The question is, how can we save the stretch image?
How to Use the ipicture interface to enlarge the image and save it? solution: 1,
Please note
2,
Important
3,
Gzb
4,
How to Use the ipicture interface to enlarge images and save them:
Save the enlarged size. I have used it. It is 100% feasible.
5,
Csize Cs;
CS. x = picturerect. Width ();
CS. Y = picturerect. Height ();
Then save the CS
When reading... Next you should know. Storage is structured.
6,
Hbitmap hbmret = NULL;
Ole_handle HPIC = NULL;
Int newwidht;
Int newheight;
If (succeeded (pipic-> get_handle (& HPIC)
{
Hbmret = (hbitmap) copyimage (handle) HPIC,
Image_bitmap, newwidht, newheight, lr_createdibsection );
}
If (hbmret! = NULL)
{
Pictdesc pictd;
Pictd. cbsizeofstruct = sizeof (pictdesc );
Pictd. pictype = pictype_bitmap;
Pictd.bmp. hbitmap = hbmret;
// Create a new ipicture
Olecreatepictureindirect (...);
// Call ipicture-> saveasfile (...)
}
7,
Csize Cs;
CS. x = picturerect. Width ();
CS. Y = picturerect. Height ();
8,
Thank you, harry202 (Harry). The score has been given.
//************************************** *****