Is /tmp a directory accessible by your web-server? I'm hoping it's a separate /tmp folder and not the actual /tmp of the server as that would be a security risk.
Anyway if the image is a physical file then you need to put this after your rewrite to force HTTPS and before the conditions checking if it's a file or directory:
RewriteRule ^/tmp/([^.]+).png$ /image.php?file=$1.png [NC,L]
You could check for other extensions as well:
RewriteRule ^/tmp/([^.]+).(png|jpg|gif)$ /image.php?file=$1.$2 [NC,L]
Or if you don't care (everything is an image in your tmp folder. Though i wouldn't recommend this)
RewriteRule ^/tmp/(.*)$ /image.php?file=$1 [NC,L]
If it's not a physical file you can put any one of these at the end of your rules.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…