Re: Please help...
Hi Timothy, Here's a better example on wikipedia, they go thru the general cases of fopen/fwrite... http://en.wikipedia.org/wiki/C_file_input/output Regards,
View ArticleRe: Please help...
I don't quiet get it, Robert..Suppose we consider our example as shown...#include <stdio.h> #include <stdlib.h> int main(void) { char buffer[5] = {0}; /* initialized to zeroes */ int i,...
View ArticleRe: Please help...
Hi Timothy, FILE *fp = fopen("myfile", "rb"); if (fp == NULL) { perror("Failed to open file \"myfile\""); return EXIT_FAILURE; } You've just opened "myfile".. for (i = 0; (rc = getc(fp)) !=...
View ArticleRe: Please help...
Hello Robert... Can you please help me to read a .jpeg into memory , as pixels.. I want to read a 256 x 256 image Regards,Timothy
View ArticleRe: Please help...
Hi Timothy, A ".jpeg" file is actually a compressed image format, you can not directly read the 256x256 pixel data from the file without first running the data/image thru a jpeg decompression routine....
View ArticleRe: Please help...
Hi Robert .. I was unable to load the whole image into memory... I need help.. Regards,Timothy
View ArticleRe: Please help...
Hi Timothy, Can you please be more specific with your question? Where are you having issues? With the above example code, you should now able to open the file, pull the first 5 bytes from it and...
View ArticleRe: Please help...
Hi Robert. Thanks for your previous message.. To be more specific, i now need to read a .jpeg into memory - Pixel By Pixel I think the example you suggested, reads it Bits by BitsSo, Robert, the need...
View ArticleRe: Please help...
Hi Timothy, The "Pixels" are encoded into the Bit stream of the file... JPEG's is a compressed image format, all the pixels are there in a compressed form, you just need to run a decompression program...
View Article
More Pages to Explore .....