Thank you very much!
works great! but now i have a different problem, my actual script has
session_start(); at the top,
and it still showing "save picture as" as "untitled.bmp" :(
if i delete session_start() it shows jpeg, if i add session_start - it
shows untitled.bmp :(