The idea was Jimmy Carter's, and it sounded like a good one, though it turns out that it wasn't. He figured money would be saved if the official portraits of his administration were photographs instead of paintings.

The fruits of his frugality go on view today at the National Portrait Gallery. A few are inoffensive, even rather charming. But most of them are chintzy; they lack the dignity of oils. The major lesson taught by the the more pompous pictures in this dull, ego-ridden show is: You get what you pay for.

The state of modern art being what itis -- what with Titian dead, and Gilbert Stuart, too -- most official painted portraits leave much to be desired. Lyndon Johnson hated his. So did Winston Churchill (his widow had it burned). But crummy as most official oils are, these photographs are worse.

You might guess what they look like. For most official photographs -- like wanted-poster mug shots or high-school yearbook portraits -- look much the same. The bureaucrat is posing, in his office, in a throne-like chair. Besides him are the obligatory props -- drapery, of course, or a globe, a flag, a potted plant; the capitol or a shelf of heavy tomes. If the sitter is a female, she is posed with blossoms. Most of these photographs, in short, are trying hard to look as somber and distinguished as the older oil paintings that line the hall outside.

That was the reason for ordering them in the first place. They extend an old tradition, and add another link to a grand old chain. Hanging on the wall, implying continuity, they make governmental offices look like governmental offices. The trouble with these photos, with most of them at least, is that they're tacky ersatz paintings. They are the wrong weight, the wrong finish, the wrong size.

Many would seem laughable if they were displayed in a row of formal portaits. The head of Interior Secretary Cecil Andrus here is no bigger than your thumb, while that of Joseph Califano, former secretary of Health, education and Welfare, is almost two feet high. None of them is varinshed; and varnish, as it yellows, looks wonderful in lamplight. Because they're shiny photos, they seem temporary objects, which, like show-biz glossies, should be tacked up for a while, and then thrown away.

Some of the nicest are wholly inappropriate. Joseph Duffey, chairman of National Endowment for the Humanities, poses with a poster, tacked to the wall beside him, that advertises a school in Tennessee.

You'd think that Edmund Muskie, the secretary of state, when pictured on the wall of our embassy in Cairo, would look most imposing were he in striped trousers with his hand upon a globe. Instead, we see him here in a pleasing and affectionate photo by his son, Stephen, wearing a wool sweater and an open-necked polka-dotted shirt.

The photographs of the president and vice president were made by Ansel Adams, a most meticulous technician. As you might expect, you can read every single hair Marie Cosindas' portrait of Ambassador Robert S. Strauss (it shows him with his globe) is, in contrast, out of focus.

What makes this show so telling is that, in every case, the subjects picked the artists -- and the photos, too. This exhibition shows us our government's officials as they see themselves.

It does not seem that art was their central aim. Griffin Bell, for instance, might have chosen Karsh, or Avedon or Warhol. Instead he chose to pose for a Justice Department staff photogapher. The former attorney general wears a silly grin. You'd think he would have noticed.

A number of the bureaucrats chose Jean Moutoussamy-Ashe (she's the wife of Arthur Ashe). More picked Jill Krementz (a most fashionable photographer and the wife of Kurt Vonnegut, she is best known for her portraits of literary types). She shows us former secretary of state Cyrus Vance and Califano and Secretary of Defense Harold Brown -- big, in living color. But Transportation Secretary Brock Adams, instead, gets a montage. We see him with his family, and his handicapped constitutents, and also playing tennis. This strange group of Krementz photos would look better on a page than it does upon the wall.

It is not surprising that these official photographs do their best to show their subjects in a flattering light. Not all succeed. A painter might have fixed Harold Brown's shirt collar or the flaws of Edmund Muskie's teeth. But photography is a warts-and-all medium, whose inherent honesty seems somehow contradicted by the obsequious, uncritical pictues in this show. Andy Warhol's snapshot portraits of the Carters are 10 times as powerful as the finely focused ones made by Ansel Adams.

Think of the photographs that you recall of LBJ and JFK. The most memorable were made out in the real world, not under studio lights in the Oval Office. The photo files of the newspapers and of the news magazines contain pictures of these bureaucrats more accurate, more telling, than those in this show.

In the next term, President Carter -- or Reagan, or Anderson -- should he still want portaits of the members of his cabinet, should take another tack. hPainted portraits would be best, but if he can't afford them, he should at least avoid the mistakes of this collection.

He might, for instance, commission large-scale drawings, for they cost less than paintings, and there are in this country now many artists who can draw. If he feels photography deserves another chance, he could hire one first-rate artist/photographs with dignity -- though Warhol would be funnier) and have him make his portraits, as the politicians say, without fear or favor. That, at least, would give us a more coherent show.

If the economy is struggling still, if money is still short, it would be even cheaper to hire not an artist, but a photo editor , and have him search through the countless images already on file. Almost anyone, given that assignment, could have come up with a more impressive show than this.

"Official Photographs: Portraits of the Carter Administration" closes Nov. 30.