This question already has an answer here:
My minimal knowledge of Star Trek tells me that these men are Captain Jean-Luc Picard (on the right), First Officer William Riker (on the left), and Lieutenant Worf (in the background), officers on the Enterprise during Star Trek TNG.
But where does this picture originate? Is it a screenshot taken from an episode of Star Trek? If so, which one? A Youtube clip including this scene would be great, if anyone has one!
Bonus points if you can explain why they're wearing funny hats: this picture's title is "404_funny_hats.jpg".