XV thumbnail, also known as XV Visual Schnauzer format, is an image file format used by the XV image viewer for its thumbnail cache. The color format is 8 bits/pixel RGB 3-3-2.
Thumbnail files are normally written to a subdirectory named ".xvpics", and evidently use the same filename and extension as the full-size image file. The .p7 extension might be used artificially sometimes, if such a file has been moved out of the .xvpics directory, or created by other means.
Files begin with ASCII text "
P7 332", followed by a newline.
Note that they could easily be misidentified as PAM format.
The format is described in a "THUMBNAIL FILE FORMAT" comment in the xvbrowse.c file from the XV source distribution (v3.10a, at least).