New_g->DrawImage(pImage, 0, 0, bitmap.Width, bitmap.Height) System::Drawing::Drawing2D::InterpolationMode::HighQualityBicubic New_g->SmoothingMode = System::Drawing::Drawing2D::SmoothingMode::HighQuality Graphics^ new_g = Graphics::FromImage(pImage) Private: System::Void OnScale(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e)īitmap bitmap = gcnew Bitmap(pictureBox1->Width,pictureBox1->Height,pImage->PixelFormat) PictureBox1->Image=pImage // put unscaled image into PictureBox-works fine PImage=gcnew Bitmap("C:\\Maps\\Map1.png",true) Private: System::Void OnLoadMap(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) Private: System::Windows::Forms::PictureBox^ pictureBox1 Here is the relevant C code, from Form1.h: I don't know how to do the final step, putting the modified image into the PictureBox. Using Zoom gives a poor-quality image, so I need resampling. I am trying to perform the following task:Ģ) Resample to make the image fit the PictureBox.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |