error using fread
4 次查看(过去 30 天)
显示 更早的评论
hye..i have a problem when run coding in matlab. it will give output like this
??? Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier.
the fid value is -1.
i'm doing a final year project about image steganography. the problem is, when i use an image named 'baboon' with dimension 512x512, it run successfully. but when i use image named 'baboon1' with the same dimension and image, it will give error.
could anyone please tell me why?
1 个评论
Jan
2012-5-12
It is recommended to post the code, which causes the error. The size of the image is not helpful.
回答(2 个)
Image Analyst
2012-5-12
What do you mean by " use"? Did you read in (or try to read in) either one of both images using imread()? Or did you try to use fread() for some reason?
0 个评论
Walter Roberson
2012-5-12
You are not testing the result of fopen() in order to determine whether the open succeeded or not. fid of -1 means that the open failed. The second output from fopen() will tell you the reason why.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Low-Level File I/O 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!