So, you are not committing any offences. What reason is there to search anything of yours - or can they just do it without any cause?What grounds were there for "suspecting" you had drugs in the car?
Why would they need a photo?
Sorry for all the questions .. just trying to get a handle on police processes where you are.
Seems you had to go through a lot for doing nothing! I'm glad it didn't spook you. But are you now on some sort of police database?