Rating:

Simply take xor of images:
convert pic1.jpg pic2.jpg -fx "(((255*u)&(255*(1-v)))|((255*(1-u))&(255*v)))/255" img_out.jpg

Then you can see the flag: