I = imread('Jaguar.bmp');
when I try to execute this line on any image this error occures
Error using imread>get_format_info (line 541)
Unable to determine the file format.
Error in imread (line 389)
fmt_s = get_format_info(fullname);
Error in Untitled (line 1)
I = imread('Jaguar.bmp');
I added the images path to the default pathes and tried like 10 solutions still no answer.
How can I read .bmp, .jpg, .png image files?

7 comentarios

Experiment with
restoredefaultpath; rehash toolboxcache
and try again.
If that works then you have third party software installed that is interfering.
Guillaume
Guillaume el 26 de Feb. de 2020
"I added the images path to the default pathes"
Not a good idea. Much safer is to give the full path to imread:
imread('C:\somewhere\somefolder\Jaguar.bmp');
But yes, as Walter says sounds like something is interfering with the default behaviour of matlab (which can happen if you add random folders to the path).
Can you please test the following:
clearvars, close all
clc
imwrite(rand(100,100,3),'test.bmp');
img = imread('test.bmp');
imshow(img)
If this succeeds and shows a noisy image, then we should have a closer look at your images.
ahmed gaafer
ahmed gaafer el 26 de Feb. de 2020
ahmed gaafer
ahmed gaafer el 26 de Feb. de 2020
I tried to upload my images to show case them but they won't open does that mean that they are corrupted ?
Guillaume
Guillaume el 26 de Feb. de 2020
Attach the image file (doesn't matter if you can't open it) and we'll take a look.
Guillaume
Guillaume el 26 de Feb. de 2020
ahmed gaafer's comment posted as an answer moved here:
Here are a couple of samples

Iniciar sesión para comentar.

 Respuesta aceptada

Guillaume
Guillaume el 26 de Feb. de 2020

1 voto

does that mean that they are corrupted ?
Very much so, I'm afraid. The two files you attached are just a long stream of 0s. There's absolutely nothing useful in the two files.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 26 de Feb. de 2020

Respondida:

el 26 de Feb. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by