I want to get the stored resource fork. In PHP, I'm trying to:
system('DeRez' . $_icon . ' | perl -ne \'m|/\* (.*) \*/| && print $1; END {print "\n"}\', $content);
which in Terminal really returns the content of the icon. However, creating an image from it using imagecreatefromstring
returns an error.
So, there's a command-line voodoo that outputs the raw data of the resource fork (in my case, the folder icon)?