Steven, thank you for the time spent explaining to me all these details.
I created a new gallery, using the same presets like on the previously analyzed one.
The same image was saved with atow sizes: 1000 px and then with 500 px, imageScaleMode being set to SCALE_DOWN in gallery. My screen size is 2560 x 1440.
Below are two screen captures that show the image's real size and how it is rendered in JB gallery.
http://asdaroth.com/juicebox_gallery/small_500px.JPG
http://asdaroth.com/juicebox_gallery/large_1000px.JPG
When imageScaleMode is set to SCALE, both images are displayed in JB at the same size, the small one being scaled up (resolution is worse). I got this.
It is not clear to me why the JB images in the gallery are about 20% bigger than original ones (opened in Irfan View/Original Size).