Fix the error at start up complaining that no image were open.
The var were declare too early and are now in the macros

Signed-off-by: seal20 <agostini.sylvain@kurofune.shimoda.tsukuba.ac.jp>