in reply to Tk::Photo-data() error?

Nope. No idea. :)

Your code is missing the lines I would have at the beginning for both use Tk; and use Tk::JPEG;, so that's my first question: are they both there?

Normally if there is a problem with invalid image data, the script will kick information about that out to STDERR (usually tied to the console while a Tk app is running), so if you're not seeing anything there, then I'm really stumped.

So if you have both of those use statements, and no errors get reported in the command window, then you're absolutely certain the JPEG is valid and not supposed to be black? :)