Installing closet doors. Had to knock these guys out of the way (first image). Realized after doing that the magical hidden nails are sticking out. Didn't expect that. Thoughts on how to get rid of that without having to remove the whole framing situation going on?
Grab them with a locking plier and bend them back and forth a few times. They'll fatigue and snap off. Or use a rotary tool with a cutoff wheel. Then use a nail set to drive them below flush.
Without removing the framing lumber from the door, consider the brute force method. If you have a rotary tool such as a Dremel, an abrasive blade will make short work of cutting the nails at or slightly below the surface.
I've done similar work, gouging a bit into the wood, then covering it with wood putty/filler to make an invisible repair.
Without a rotary tool, one may be able to accomplish the same with an oscillating blade with an abrasive edge, although it's likely to be slower.
As noted in the answer that popped in while I was composing this, side cutters to nick and bend the nail will likely work.
Next time, consider using a reciprocating saw with a framing blade to remove the board itself (I wouldn't try on the hanging nails as they are now). Chews through wood and metal. Just lean the blade more on the wood block side so you don't gouge the frame as much.