Click here to Skip to main content
15,885,979 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the size of the JPEG file in order to read it as binary?
Posted
Comments
Manfred Rudolf Bihy 17-May-11 8:58am    
Do you intend to read the image as binary data or do you want the binary equivalent of the file content?
Gokulnath007 17-May-11 9:34am    
I want to know the size of the jpeg file and then i want to read it completely.

Size of a jpeg file is just the size of the file, use anything that can be used to find file size, such as:
http://msdn.microsoft.com/en-us/library/aa364955%28v=vs.85%29.aspx[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-May-11 18:59pm    
Correct answer, a 5.
--SA
Niklas L 18-May-11 11:55am    
Fived.
Open the file using CreateFile()

get the file size with GetFileSize()

and then Read the file using ReadFile()

once finished close the file using CloseHandle();

search for the functions on Google so you can learn the parameters. :)
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 17-May-11 18:59pm    
Correct, a 5.
--SA
Guyverthree 18-May-11 4:41am    
thanks :)
Niklas L 18-May-11 11:55am    
That's a good answer. 5.
Guyverthree 18-May-11 12:04pm    
thanks I tired to offer an approach rather than code for him to copy.

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