- 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
20 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Jarrod Rivituso
on 27 Apr 2011
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!
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!