If you would have taken that photograph, you would have broken a rule to gain an advantage: Even if the exam is not repeated exactly, you gain information as on what kind of questions to expect and you state yourself that you want to use the photographs to your advance (even if this involves honest learning). Taken the photograph would thus have been unfair against those students who comply with the rules and do not have this advantage. This would clearly be unethical.
As the exam is not repeated exactly and the same can be achieved with memorising, you may debate over how bad taking a photograph would be. Also you can debate whether the examinor’s approach to exams – relying on the contents being kept secret to some extent – is a good and effective one. All of this does not however impeach the ethicality of taking a photograph. If you do not agree with the rules, complain about the rules;rules first; do not just break them.