TUCSON — Investigators revealed that Jared L. Loughner appeared to pull a frantic all-nighter last week to prepare for the shooting that killed six people, including a federal judge.

The judge, John M. Roll, was honored Friday at an emotional funeral Mass.

The night before the rampage, authorities say, Mr. Loughner, 22, dropped off at a drugstore a roll of 35-millimeter film containing images he had shot of himself posing with a Glock semiautomatic pistol while wearing a red G-string. The authorities said he picked up the film early on the day of the shooting at a Walgreens.

In some of the photos Mr. Loughner is holding the gun near his crotch, and in others, presumably taken in a mirror, he is holding the gun next to his buttocks, investigators said. It was not clear when the photos were taken.