octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need one more test in matlab for imformats


From: Carnë Draug
Subject: need one more test in matlab for imformats
Date: Mon, 8 Jul 2013 18:10:13 +0100

Hi

Could someone please test the following in matlab for me? It's part of
improving matlab compatibility for the image IO functions. It only
needs a jpg file somewhere *without* a file extension (both octave and
matkab should be able to identify it as jpeg image even without
extension).

fmt = imformats ('bmp');
fmt.read = @(x) size(x);
fmt.isa = @(x) true;
imformats ('update', 'bmp', fmt);
img1 = imread (PATH_TO_SOME_JPG_WITH_NO_EXTENSION, 'bmp');

fmt = imformats ('jpg');
fmt.read = @(x) size(x);
fmt.isa = @(x) true;
imformats ('update', 'jpg', fmt);
img2 = imread (PATH_TO_SOME_JPG_WITH_NO_EXTENSION, 'jpg');

What are the values of img1 and img2? Is any of them the actual image
(a large matrix) or the size of the filename?

The question here is related to the fact that imread, imwrite and
imfinfo allow to specify the filename as a single argument or the
filename and extension as two separate arguments. If filename on its
own is found, it will use that file, otherwise it will look for
filename.extension. But it is also able to identify the image format
without an extension, so if it finds the file without using the
optional extension, does it still uses the extension with imformats to
choose the "correct" function to read the image, or not?

Thanks in advance,
Carnë


reply via email to

[Prev in Thread] Current Thread [Next in Thread]