Since Blondie formed 40 years ago, one thing has remained constant: if the band’s co-founder Chris Stein isn’t onstage with a guitar slung around his neck, chances are he’s off somewhere with a camera, taking pictures. Now, the results of his four-decade-long hobby have been compiled in a new book, “Chris Stein/Negative: Me, Blondie, and the Advent of Punk” (out tomorrow from Rizzoli), and will appear in an exhibition curated by Jeffrey Deitch at the Chelsea Hotel’s Storefront Gallery alongside band memorabilia and images by the likes of Annie Leibovitz and Robert Mapplethorpe. “I was just in the middle of this milieu and I took pictures,” Stein says matter-of-factly on the phone from Vienna, a recent stop on Blondie’s anniversary tour.

When Stein started the band with Harry in the early ’70s, he was an on-again, off-again School of Visual Arts student who commuted into the city from Midwood, Brooklyn — at once an insider and an outsider. “My New York was a little different from my friends’,” Stein says. “But I’d been doing that for a while. In the late ’60s, I was part of that whole MacDougal Street scene in the Village. This was during the days of ‘December’s Children’ — you know, everyone standing in a doorway looking huddled. You’d see Jimi Hendrix, you’d see Richie Havens.”

Though the photographs in the book span the band’s four decades, they’re rooted mostly in the punk scene that emerged in the ’70s and ’80s, paralleling Blondie’s rise. Their star subject is the astonishingly photogenic Deborah Harry, who, in an essay in the book, calls Stein’s casually intimate pictures “the most real and unguarded and ultimately revealing” of the era’s images of her. Looking at them, it’s easy to imagine how much fun the duo had not just making pictures, but also making music. “For us, it was always what happened in the moment,” Stein says. His photographs of Harry include images that are indelibly associated with her — Harry in a Vultures T-shirt and a metal-studded belt worn with black leather underwear for a Punk magazine shoot, Lester Bangs hoisting Harry over his shoulders on the beach at Coney Island — as well as more personal and lesser-known snaps, like a shoot Stein and Harry did after returning to their 17th Street apartment, which had burned in a fire while they were on tour.

The pictures — in which such punk icons as Richard Hell (“after Debbie, probably my favorite person to photograph”), the Ramones and Iggy Pop also make appearances — capture the essence of a lost, romantic moment in New York history. “I do miss that communal feeling of CBGB,” Stein says. “In the beginning, it was very familial, it was like people you went to school with, it was very workshoppy,” he says. “But as nostalgic as people get for that period, at the time I don’t know anyone who didn’t at some point say, ‘I gotta get out of here, it’s so dirty.'”

The Blondie 40th-anniversary exhibition will be on view Sept. 23 — Sept. 29 at the Chelsea Storefront Gallery, 222 West 23rd Street.