One simple way to differentiate the Seattle FilmWorks / PhotoWorks file formats -- .pwp, .sfw, .#nn, .pwm, and .alb -- is by looking at the first several (5-6) bytes of the file, then, if necessary, searching for other signatures:
If 1st 6 bytes of .pwp file are SFW95B, then it is a Seattle FilmWorks / PhotoWorks PWP file.
The definitive hex signature for a .pwp file is 53 46 57 39 35 42. Probably, a more lax hex signature of 53 46 57 39 35 would also suffice.
If 1st 6 bytes of .sfw file are SFW94A, then it is a Seattle FilmWorks / PhotoWorks SFW file.
There are two basic types of SFW94A format files this could be:
SFW94 mangled JPEG, Huffman compressed --
If you then search for hex FF C8 FF D0 and find it, then skip 2 bytes and find the 5 non-null terminated bytes SFW94, or alternatively, if you search for hex FF C8 FF D0 00 10 53 46 57 39 34 and find it, then you likely have a (mangled JPEG, compressed) SFW94A format .sfw file containing a SFW94 format main image. The 4 bytes FF C8 FF D0 are the mangled JPEG/JFIF markers SOI & APP0, and the SFW94 is the mangled replacement of JFIF\0 in the APP0 block. The PhotoWorks v2.41 software refers to this as SFW94 format. There's a fair amount of software that can read this format. For more details of this format, see Lipman's details.txt and my Overview of the 4 .sfw file formats.
But the real definitive signature for this (compressed) SFW94 case is hex 03 00 xx 00 3A 00 00 00 00 3A 44 00 00 00 3A DA 07 00 00 3E, where xx is anything. It will very likely be at offset 0xFC or 0x137 in this type file (though it could be elsewhere). If you do find that signature, then (compressed) SFW94 is very likely the .sfw format. The uniquely identifying key in that signature is the initial 03 00.
SFW94 mangled BMP, uncompressed --
If your hex FF C8 FF D0 search failed, but the first 6 bytes of the file were SFW94A, then assume the SFW94A format is what the PhotoWorks v2.41 software refers to as Uncompressed SFW94 format. It is basically a BMP image which has been wrapped by some .sfw file structures. The only publicly available software that I know of that reads this file type is the PhotoWorks software.
If you want the definitive signature for this Uncompressed SFW94 case, search for hex 00 00 00 00 3A 00 00 00 00 3A 44 00 00 00 3A DA 07 00 00 3E. It will very likely be at offset 0xFC in this type file (though it could be elsewhere). If you do find that signature, then Uncompressed SFW94 is very likely the .sfw format. The uniquely identifying key in that signature is the initial 00 00.
If 1st 6 bytes of .sfw file are SFW98A, then it is a third type of Seattle FilmWorks / PhotoWorks SFW file -- a (complexly obfuscated, mangled JPEG, arithmetically compressed) SFW98A format .sfw file. The PhotoWorks v2.41 software refers to this as SFW98 format. The only publicly available software that I know of that reads this file type correctly is that PhotoWorks software.
The real definitive internal signature for this (compressed) SFW98 case is hex 04 00 xx 00 3A 00 00 00 00 3A 44 00 00 00 3A DA 07 00 00 3E, where xx is anything. It will very likely be at offset 0xFC in this type file (though it could be elsewhere). If you do find that signature, then SFW98A is very likely the .sfw format. The uniquely identifying key in that signature is the initial 04 00.
If you want some further signatures on this SFW98A case, besides the initial 6 bytes being SFW98A (and/or the above hex signature beginning with 04 00 and ending with 3A DA 07 00 00 3E), then look for:
the non-null terminated 4 byte string JPRS (typically at offset 0x120),
then exactly 12 bytes later (after the 'S' of JPRS), the hex FF yy FF zz 00 10 53 46 57 46 00, where yy and zz are anything (except that they can't equal each other) and the last 5 bytes of that hex block says SFWF\0 in ASCII [I guess it means "Seattle FilmWorks Format" or maybe "Seattle FilmWorks File Interchange Format", like JFIF for JPEG File Interchange Format.]
Or, alternatively, just search for the hex signature 4A 50 52 53 xx xx xx xx xx xx xx xx FF yy FF zz 00 10 53 46 57 46 00, where xx, yy, and zz are anything (except that yy and zz can't equal each other).
When trying to detect the SFW98A file format, you should **NOT** use the hex FF C8 FF D0 search described above for (compressed) SFW94A format .sfw files, since that search inside a SFW98A format file will search past the main SFW98 format image and find one of the imbedded thumbnail images, if any. It will never find the SFW98 format arithmetically compressed main image.
The only reason for using the hex FF C8 FF D0 search on a file that begins with SFW98A is because you opt to not implement the complex decoding of the SFW98 main image format and instead will settle for reading the first thumbnail image, if any, as an "at least we read something" substitute. That approach is taken by most 3rd party supplied converters which can read .sfw files.
For more information on this format, see item SFW98A in the Overview of the 4 .sfw file formats.
If 1st 6 bytes of .#nn (or .sfw) file are SFW93A, then it is a fourth type of Seattle FilmWorks / PhotoWorks SFW file -- the earliest known form of Seattle Filmworks creating its own image file format by prefacing a JPEG image with non-industry standard info.
In 2015-01, I was finally able to correctly discern the format and naming convention of these files -- courtesy of a directory of 25 images provided graciously by Ryan Finnin Day. An analysis of all those images and a re-exploring of the PhotoWorks software while peaking inside podw.exe reveals that the initial SFW93A signature (in the first 6 bytes) should be enhanced by also verifying that the standard JFIF SOI / APP0 marker signature (hex FF D8 FF E0) resides at offset 0x1E (30).
A SFW93A format image file will usually:
You may also encounter a SFW93A format image file which has been renamed to the form rrrrrrrr.#nn.sfw or rrrrrrrr_nn.sfw (while someone was exploring how to convert the image's format).
Either Nord's sfwjpg (circa 2016-04 or later), XnView, or the PhotoWorks software can convert the SFW93A format. For more information on this format, see item SFW93A in the Overview of the 4 .sfw file formats. Or better yet, just go directly to the details at SFW93A format and conversion details.
Thanks to Helmut Jurgensen for graciously providing me three Seattle Filmworks PICTURES ON DISK! diskettes from mid 1994 which a) confirmed my conclusions developed from analyzing Ryan Finnin Day's images, and b) showed me the EZPOD.EXE software which was originally on those diskettes.
If 1st 6 bytes of .pwm file are SFW94A, then check if the 8 bytes at offset hex 0x0C definitely contain the signature hex 5C 12 00 00 CC 00 00 00. If so, then you likely have a Seattle FilmWorks / PhotoWorks PWM (PhotoWorks Meta) file. See the sfwwhichfmt.c source for some further explanations of the .pwm file structure.
If 1st 14 bytes of .alb file say SFW_ALB-10DD94, or more loosely, if 1st 7 bytes of .alb file say SFW_ALB, then you have a Seattle FilmWorks / PhotoWorks ALB (ALBum) file. The corresponding definitive hex signatures (at the very beginning of the file) are: 53 46 57 5F 41 4C 42 2D 31 30 44 44 39 34 or 53 46 57 5F 41 4C 42, respectively. See the sfwwhichfmt.c source for some further explanations of the .alb file structure.
The simple mechanism described above should work well for any Seattle FilmWorks / PhotoWorks .pwp, .sfw, or .#nn file -- at least all the ones I've seen -- assuming the file has not been butchered somehow by a disk crash or experimenting / hacking. And this mechanism can be implemented by someone that wants to only utilize hex signatures. It should work well with the .pwm and .alb files also, if you're interested in them.
There's actually a cleaner way to delineate the two different SFW94A format files that contain the JPEG compressed and BMP uncompressed images. That mechanism involves looking at the internal SFW file structures. I've implemented that in the sfwwhichfmt.c source.
You can also examine my TrID definitions for the Seattle FilmWorks files. The TrID definitions implement the signatures described in this section, plus other signatures involving the internal Seattle FilmWorks / PhotoWorks file structures. And they do a very good job of detecting the SFW94A and SFW98A variants using the internal SFW file structures. See Marco Pontello's TrID for details on the very useful TrID file identifier utility.
Or you could take a look at the overview of Tools to detect .sfw file formats. to see some other Seattle FilmWorks / PhotoWorks file format detection alternatives.
If you want to study the differences in the .sfw file formats, see Overview of the 4 .sfw file formats for some extra information -- some of which was not publicly available before 2013-01-14.
If you want to "cut to the chase" and find a .sfw to .jpg converter that fits your circumstances -- your .sfw file format, your operating system, your machine architecture, etc. -- follow the Quick solution Hints at the SFW conversion portal, then, if necessary, peruse Existing .sfw to .jpg converters.
If you want to know how to download and install the Seattle FilmWorks / PhotoWorks desktop software known as "PhotoWorks", then try out How to locate, download and install PhotoWorks software.