how to load image into matlab workspace

i am trying to load and image into my matlab work space but keep getting the error below, what could be the problem please?
I= imread('IMG,jpg')
Error using imread>get_full_filename (line 516)
File "IMG,jpg" does not exist.
Error in imread (line 340)
fullname = get_full_filename(filename);

 Accepted Answer

I= imread('IMG,jpg')
^
You coded a comma instead of a period. IMG.jpg not IMG,jpg

4 Comments

see below
same error message
I= imread('IMG.jpg')
Error using imread>get_format_info (line 491)
Unable to determine the file format.
Error in imread (line 354)
fmt_s = get_format_info(fullname);
Please attach the file for us to test. If the site will not accept the file for some reason, then zip the image and attach the zip.
Thank yoyu so much for your help. I found the error on the file name.
out of so many trials, i guess i mistakenly changed the name of the file somewhere along the line.
Then please award Walter "reputation points", for pointing that out error in the file name, by clicking the "Accept this answer" link. Thanks in advance. 🙂

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!