フィルターのクリア

How to tell if a tif file contains an embedded ICC profile?

2 ビュー (過去 30 日間)
KAE
KAE 2018 年 4 月 20 日
編集済み: KAE 2018 年 4 月 20 日
I am asking and answering the following question in case it helps someone.
Is it possible to use Matlab to check if a tif file contains an embedded ICC profile ?

採用された回答

KAE
KAE 2018 年 4 月 20 日
編集済み: KAE 2018 年 4 月 20 日

Yes, using imfinfo as follows.

fileData = 'corn.tif'; % Example matlab file that doesn't have an ICC profile embedded
a = imfinfo(fileData); % Get info about the file
isIccEmbedded = isfield(a, 'ICCProfileOffset'); 
% Since no ICC profile is embedded, this is false
% Go through Step 5 at the following website to create an example tif
% with an ICC profile embedded,
% https://blogs.mathworks.com/steve/2009/10/20/embedding-an-icc-profile-into-a-tiff-file/
fileData = 'peppers.tif';
a = imfinfo(fileData); % Get info about the file
isIccEmbedded = isfield(a, 'ICCProfileOffset'); 
% Since an ICC profile is embedded, this is true

I saw this mentioned in the iccread help file and thought an example would be useful.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by