Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to convert file with type byte to image in vb.net
Posted
Updated 30-Dec-15 1:34am
v4
Comments
Kornfeld Eliyahu Peter 30-Dec-15 2:49am    
What do you want to show in that image?
Sergey Alexandrovich Kryukov 30-Dec-15 2:53am    
The question makes no sense. All files are "with type byte", including all image file. The solution depends on the format of input file.
—SA

1 solution

If the file contains a "known" image type (.JPG, .BMP, .PNG, ...) then it's easy:
VB
Dim im As Image = Image.FromFile(pathToFile)

If it doesn't, but contains a (for example) proprietary graphics format that then framework doesn't support, then you will have to find or write a converter to read the file info and generate an Image from it. We can;t help with that: we have no access to your file data and do not know what it contains.

If you do write your own loader, then it would probably be worth writing an article on the process and publishing it here: Submit a new Article - CodeProject[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900