Can't open GIF file with Image.FromFile

mcerk

Well-known member
Joined
Nov 1, 2004
Messages
78
Hi. This is strange. I can not open this image in visual studio.

Id like to manipulate with this image in run time, therefore I need to open image and load it into variable type Image.

Code:
here I load an image from file
dim img as Image = Image.FromFile(myFile)
image is not loaded completely. Size of image is correct, but content is white. There is no image displayed!!!???!??!??!

Can anyone figure out, why?

If I convert Image using some other graphics program, and then try to open it in VS it works.

But this will be automatic task, so I cant change source image format.

PS: Ive attached source image, so you guys can play with.

PSS: image format is GIF, 585x630x32


tx


matej
 
Hmm... that is very odd indeed, but its not only VB that cant load it properly, if I save that image to my desktop then double click on it, a blank square is displayed. So my Windows XP SP2 cant see it properly either.
 
585x630x32... you dont mean 32 bpp, do you, cause last I knew gifs couldnt do that. My best guess is that what ever software created that gif saved it in a not entirely standard format that firefox and IE happen to tolerate. I cant open the image with Windows Picture and Fax Viewer, VS, or Photoshop (it displays as a blank black or white square).
 
I know. So. Does anyone know some other method, to open this file? Becouse, as I said, I can not change the file format. :(
 
Back
Top