how to refresh an image when the file is modified?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to refresh an image when the file is modified?

Frédéric Boone
Hi all,

I'd like to be able to refresh an image by reading again the file it comes from.
I tried
imp.updateAndRepaintWindow();

and several others but that doesn't work.

Any idea welcome.

F
Reply | Threaded
Open this post in threaded view
|

Re: how to refresh an image when the file is modified?

Wayne Rasband
> I'd like to be able to refresh an image by reading again the file  
> it comes from.
> I tried
> imp.updateAndRepaintWindow();
>
> and several others but that doesn't work.
>
> Any idea welcome.
Try

   IJ.run("Revert")

which is equivalent to running the File>Revert command.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: how to refresh an image when the file is modified?

Frédéric Boone
Thanks,

I tried but unfortunately it does'nt refresh the image from the file
(it is till the original image).

The only way I found is to close the window and open a new one from
the same file, but that's not really what I want (the new window is
not at the same position etc...).

F

> Try
>
>    IJ.run("Revert")
>
> which is equivalent to running the File>Revert command.
>
> -wayne
>