6. A photographer took some photos of eight people at a party, with any two people (there are 28 possible combinations) appearing in exactly one photo. Each photo can be a duo or a trio. How many photos did the photographer take at least?

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。
6. 12 .

Let the number of group photos with three people be $x$, and the number of group photos with two people be $y$. Then $3 x+y=28$.
Thus, when $x$ is maximized, the total number of photos taken is minimized.
When $x>8$, by $\frac{3 x}{8}>3$ we know that there is a person $A$ who appears 4 times, and in the 4 group photos where $A$ appears, there are a total of eight appearances by other people, so there must be a person $B$ who appears with $A$ in two group photos, which is a contradiction.
When $x=8$, $y=4$, it can be done.
Number the eight people as $0,1, \cdots, 7$, the 12 photos taken are
$$
\{012,034,056,713,745,726,146,235 \text {, }
$$
$07,15,24,36\}$.