When Tyler Atkins heard about the fatal shooting of Michael Brown, 18, an unarmed black teenager in Ferguson, Mo., he posted on Twitter a picture of himself in a tuxedo, with a saxophone around his neck, next to a photograph of himself dressed in a black T-shirt with a blue bandanna tied around his head and his finger pointed at the camera.

Like hundreds of young African-Americans, he placed his pictures under the hashtag #IfTheyGunnedMeDown, protesting Mr. Brown’s killing by a police officer and the way young black men are depicted in the news media. He said that Mr. Brown’s identity was distorted and filtered through negative stereotypes, and that the same would have been done to him with the bandanna image if he found himself the victim of a similar event.

The first picture was taken after a jazz concert at the High School for the Performing and Visual Arts in Houston, where Mr. Atkins, a senior, studies music. The other was taken during a recording for a rap video he made with friends for a school math project.

“Had the media gained ahold of this picture, I feel it would be used to portray that I was in a gang, which is not true at all,” Mr. Atkins, 17, wrote in an email.