- Find and install a utility that gives you the required functionality, such as the GNU unzip. Make sure it is on your system path when you start MATLAB.
- Call the utility from within MATLAB using the system function
Access Images in a zip file without unzipping
10 次查看(过去 30 天)
显示 更早的评论
Hi all,
I'd like to read some png-images within a zip file on my harddisk. Since I have thousands of images within hundreds of zip files, it would be extremely nice to read the image files without the need for unzipping the requested files to my harddrive). I've opened matlab's unzip.m file and realized, that it is partially written in java. I'm not very experienced with Java, but maybe some of you know a handy solution for my problem (a special java class, or a method for this 'org.apache.tools.zip.ZipFile' class unzip.m is using)
thanks, tobi
0 个评论
回答(1 个)
Jarrod Rivituso
2011-4-27
You may be able to find an external unzip utility and call it from within MATLAB using the system function. The GNU unzip seems to support the behavior you are looking for:
If you aren't very experienced with Java, I wouldn't recommend going the Java route, though I'm sure this could be done using something like what is described here:
So, I'd recommend you
system('unzip allPics.zip pic314.png');
Hope this helps!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!