From: ..:: Kevin ::.. on 26 Sep 2005 08:37 If I load a PictureBox image from an embedded resource within my application it works fine but if I load the same image from a file using OpenFileDialog (as an ImageStream or using the file name) the background color is not masked out. Any ideas?
From: Herfried K. Wagner [MVP] on 26 Sep 2005 08:52 "..:: Kevin ::.." <Kevin(a)discussions.microsoft.com> schrieb: > If I load a PictureBox image from an embedded resource within my > application > it works fine but if I load the same image from a file using > OpenFileDialog > (as an ImageStream or using the file name) the background color is not > masked > out. Which image format does the image have? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
From: ..:: Kevin ::.. on 26 Sep 2005 09:06 I have tried with a bmp image and a gif image and the problem is the same for both formats "Herfried K. Wagner [MVP]" wrote: > "..:: Kevin ::.." <Kevin(a)discussions.microsoft.com> schrieb: > > If I load a PictureBox image from an embedded resource within my > > application > > it works fine but if I load the same image from a file using > > OpenFileDialog > > (as an ImageStream or using the file name) the background color is not > > masked > > out. > > Which image format does the image have? > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> > >
From: Cor Ligthert [MVP] on 26 Sep 2005 10:42 Kevin, There seems something very special in you code. The OpenFileDialog is only giving a string to use in the by instance image.fromstream command. I hope this helps, Cor "..:: Kevin ::.." <Kevin(a)discussions.microsoft.com> schreef in bericht news:2DD847E9-36C0-4F81-BCE4-9A54A3803A85(a)microsoft.com... > If I load a PictureBox image from an embedded resource within my > application > it works fine but if I load the same image from a file using > OpenFileDialog > (as an ImageStream or using the file name) the background color is not > masked > out. > > Any ideas?
From: ..:: Kevin ::.. on 26 Sep 2005 11:02
Cor, The code I am using is as follows: Dim ImageStream As System.IO.Stream If openFileDialog1.ShowDialog() = DialogResult.OK Then ImageStream = openFileDialog1.OpenFile() If Not (ImageStream Is Nothing) Then picImage.Image = Image.FromStream(ImageStream) End If End If "Cor Ligthert [MVP]" wrote: > Kevin, > > There seems something very special in you code. The OpenFileDialog is only > giving a string to use in the by instance image.fromstream command. > > I hope this helps, > > Cor > > > "..:: Kevin ::.." <Kevin(a)discussions.microsoft.com> schreef in bericht > news:2DD847E9-36C0-4F81-BCE4-9A54A3803A85(a)microsoft.com... > > If I load a PictureBox image from an embedded resource within my > > application > > it works fine but if I load the same image from a file using > > OpenFileDialog > > (as an ImageStream or using the file name) the background color is not > > masked > > out. > > > > Any ideas? > > > |