Classic Mac OS (the main Macintosh operating system from 1984-2001) had an interesting way of storing files. Each file potentially consists of two separate byte streams, known as the data fork and resource fork. Additionally, some important information was stored in the file’s directory entry, using features of the Mac’s native MFS and HFS filesystems.…… Continue reading Detecting MacBinary format
SHA-1 is a cryptographic hash function. You give it a computer file, and it produces a 160-bit hash that is completely determined by the input file, but not in any obvious way. In early 2017, a group of researchers, using advanced mathematics and 6500 CPU-years of computer searching, found the first ever SHA-1 collision: two…… Continue reading Examining the SHA-1 collision files
The other day, a Twitter user (David Buchanan, @David3141593) posted a message that gained some attention. It has an attached JPEG file, with an image of William Shakespeare. If you save a copy of the JPEG file, and unzip it as if it were a ZIP file, it unzips into the complete works of Shakespeare.…… Continue reading About that JPEG/ZIP/Shakespeare hybrid file
In order to decode and display a JPEG image, you have to know what “color type” (or “color model”) it uses. There are several possibilities that your software probably ought to handle: Grayscale YCbCr (transformed from RGB) RGB YCCK (transformed from CMYK) CMYK Unfortunately, if you look at all the bits and bytes that make…… Continue reading How is a JPEG image’s color type determined?
CorelDRAW is a popular vector graphics program. Its native .CDR file format has gone through many different versions. I want to focus on the files written by CorelDRAW version 2. These are the .CDR files that begin with “WLl” or “WLm”. Even though it dates from 1989 or so, and has been obsolete for most…… Continue reading Preview images in old CorelDRAW files
Windows Metafile (WMF) is a vector graphics format native to Microsoft Windows 3.x. It was succeeded by Enhanced Metafile (EMF) in 32-bit versions of Windows, but it seems to have remained in use, alongside EMF, long after Windows 3.x became obsolete. It was often embedded inside other file formats, such as PowerPoint (.ppt) or Write…… Continue reading Comments in WMF files
This post concerns the TIFF image file format, and some related formats: Exif, DNG, and JPEG XR. A TIFF file contains a set of “fields”, each of which contains some sort of data element. Each field has a “tag”: a code number that tells, logically, what is stored in the field. For example, tag #256…… Continue reading The finer points of TIFF “ASCII” fields