hardcore Posted October 16, 2007 at 04:08 PM Report Share #140542 Posted October 16, 2007 at 04:08 PM Tenho um ficheiro com o caminho da imagem. Quando o vou buscar para mostrar na PictureBox, a picture box s贸 mostra os primeiros pixeis da imagem de acordo com o seu tamanho. Existe alguma forma para redimensionar a imagem ao tamanho da PictureBox?聽 馃槈 Cumprimentos Link to comment Share on other sites More sharing options...
mobes Posted October 16, 2007 at 09:50 PM Report Share #140595 Posted October 16, 2007 at 09:50 PM Mas queres que tanto mais pequenas como maiores.. fiquem redimensionadas, certo? Eu o c贸digo que tenho num programa que fiz 茅 obter um thumbnail da imagem com o tamanho que tem a minha picturebox. Bitmap bm = new Bitmap(ofd.FileName); // ofd eh um OpenFileDialog Form1.i = (Image)bm.Clone(); // i eh um objecto Image Form1.i = Form1.i.GetThumbnailImage( 100, 100, null, System.IntPtr.Zero); pictureBox1.Image = Form1.i; N茫o sei bem se 茅 isto que queres fazer. Link to comment Share on other sites More sharing options...
hardcore Posted October 18, 2007 at 11:18 AM Author Report Share #141070 Posted October 18, 2007 at 11:18 AM viva, funcionou 馃槢 obrigado聽 馃槢 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now