filesize
Batch resize images into new folder using ImageMagick
convert is designed to handle a single input file as far as I can tell, although I have to admit I don’t understand the output you’re getting. mogrify is better suited for batch processing in the following style: mogrify -path ../dsc_small -define jpeg:extent=2MB dsc_big/* But honestly I consider it dangerous for general usage (it’ll overwrite … Read more
Way to reduce size of .ttf fonts?
FontSquirrel’s Webfont generator makes it very easy to reduce a font’s filesize. Upload your font Choose Expert… Choose which glyphs to include Press Download Your Kit I was able to take a 263kb font down to 34kb.
Is there a way to get the size of a file in .NET using a static method?
Don’t worry about it. First, allocation in .NET is cheap. Second, that object will be in gen 0 so it should be collected without much overhead.
Is there a Java enum for filesize units that’s equivalent to java.util.concurrent.TimeUnit?
Apache commons provides constants in the FileUtils class, like FileUtils.ONE_MB FileUtils.ONE_GB … source : https://commons.apache.org/proper/commons-io/javadocs/api-2.2/org/apache/commons/io/FileUtils.html Their definition of a KB is based on 1024 bytes, (a MB is KB², and so long).
why is the output of `du` often so different from `du -b`
Apparent size is the number of bytes your applications think are in the file. It’s the amount of data that would be transferred over the network (not counting protocol headers) if you decided to send the file over FTP or HTTP. It’s also the result of cat theFile | wc -c, and the amount of … Read more
How to get image size (bytes) using PIL
Try: import os print os.stat(‘somefile.ext’).st_size