size of image file
11 ビュー (過去 30 日間)
古いコメントを表示
hi. I want to ask about: how can we get the size of an image file (in Byte/kByte)? Because i want to put it in the edit box/text. thanks.
0 件のコメント
回答 (2 件)
Walter Roberson
2012 年 3 月 6 日
Use dir() and look at the "size" field that is returned; that will be in bytes.
4 件のコメント
Jan
2012 年 3 月 6 日
"dir is not defined for 'uint8' input"
This mean that you call DIR with an UINT8 variable like:
a = uint8(rand(10));
b = dir(a);
I assume you read an image file into a variable and use this variable instead of the filename afterwards.
A general recommendation: It is efficient to post the code, which causes the problem, and the complete error message. Then assisting is easier and efficient.
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!