Login  Register

how to refresh an image when the file is modified?

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

how to refresh an image when the file is modified?

Frédéric Boone
2 posts
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
| More
Print post
Permalink

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

Wayne Rasband
1011 posts
> 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
| More
Print post
Permalink

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

Frédéric Boone
2 posts
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
>