Developer Red-EyeX32 just released a tool to extract the .TRP files from the PS4.
A similar tool to extract trophies from the PS3 and the Vita had been created several years ago by Red Squirrel, and this follows the same basic principles.
TRP files are a fairly simple container with a header describing the content of the files (similar to a tar file or an uncompressed zip). The tool is a straightforward GUI that runs a command line application which is in charge of the unpacking process. For those of you who want to dig deeper or create their own tool to extract these files, Red-EyeX32 has conveniently updated the ps4 dev wiki with some information about the TRP format:
typedef unsigned long int u32;
typedef unsigned long long int u64;
signed char name[0x20];
u64 entryStart; //relative to &buffer
u32 unk1; //3 on some, 0 on others, could be flags or an enum to determine if encrypted or not?
Trophy files contain some information related to the trophies of your games, including png icons (which are *not* encrypted), and esfm files (which *are* encrypted)
You can apparently grab TRP files directly from retail ps4 game blu-ray discs, although I have yet to try.