
- Forum
- Programming Talk
- C and C++
- Open images in C program
Open images in C program
This is a discussion on Open images in C program within the C and C++ forums, part of the Programming Talk category; how to open jpeg image with the help of c.......
-
12-27-2010, 07:37 AM #1
- Join Date
- Dec 2010
- Answers
- 32
Open images in C program
how to open jpeg image with the help of c....
Last edited by admin; 03-28-2011 at 07:14 AM.
-
03-08-2011, 06:27 AM #2this will open the jpeg in binary format!Code:
include"file.h" include"stdio.h" main() { FILE *fp; char ch; fp=fopen("c:\tcpp\pic1.jpeg","rb+"); if(fp == NULL) { printf("Error in opening the image"); fclose(fp); exit(0); } printf("Successfully opened the image file"); while((ch = fgetc(fp))!=EOF) { printf("%c",ch); } printf("\nWriting to o/p completed"); } // may work
but if u can allow a viewport it maybe possible { i use my Intel Cpp compiler with directx 10 libs}
it worked!! <<<ya i know directx 10 can do it>>> but try in C if u want.
for more info bout jpeg file binary format log on to wikipedia and search jpeg file format.
Last edited by admin; 03-28-2011 at 07:08 AM.
-
Thanks for sharing this coding it is very helpful for me.
-
Sponsored Ads

Reply With Quote





