Posted 11 years ago
·
Author
Since I am still new to Photoshop, when I use it, I like to see in real time what changes I make look like on the final image. I used to use Windows native picture viewer for this because it would automatically refresh the image when a change was made to the file. In Windows 8 however, this seems to no longer be the case. So below is the code I now use instead.
The code is very simple, the javascript itself was taken from javascriptkit.com (http://www.javascriptkit.com/script/scr ... resh.shtml). The rest is just your very basic html code for displaying an image.
Basically, this is simply an html file with an image that is refreshed automatically at a specific time interval. When the page gets refreshed, it re loads the image, there by updating it.
To use this file, follow these steps:
Step 1) Copy the code above and paste it in notepad (or your preferred text editor).
Step 2) Save it as "updateimage.html" (without quotes) and put it in the same location as your image. This can be a folder or just your desktop for example.
Step 4) Edit the code to suit your needs:
To change the amount of time between page refreshes, edit the line below. Enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59:
To change the image, edit the line below. Put the full path to your image, including the extention (.png/.jpg/gif etcc..):
Step 5) Save your changes.
Step 6) (optional) Open the "updateimage.html" file in your web browser and move it to your other monitor.
Done!
Notes:
-Sometimes Photoshop will error if you try to save the file while the page is refreshing because the file will be in use. Just try again.
-Only works well on dual monitors.
The code is very simple, the javascript itself was taken from javascriptkit.com (http://www.javascriptkit.com/script/scr ... resh.shtml). The rest is just your very basic html code for displaying an image.
<html>
<head>
<style type="text/css">
body {
background-color: #D3DFD1;
}
</style>
<script>
<!--
/*
Auto Refresh Page with Time script
By JavaScript Kit (javascriptkit.com)
Over 200+ free scripts here!
*/
//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:2"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images) {
return;
}
if (parselimit==1) {
window.location.reload()
}
else {
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}
window.onload=beginrefresh
//-->
</script>
</head>
<body>
<center><img src="" /></center>
</body>
</html>
Basically, this is simply an html file with an image that is refreshed automatically at a specific time interval. When the page gets refreshed, it re loads the image, there by updating it.
To use this file, follow these steps:
Step 1) Copy the code above and paste it in notepad (or your preferred text editor).
Step 2) Save it as "updateimage.html" (without quotes) and put it in the same location as your image. This can be a folder or just your desktop for example.
Step 4) Edit the code to suit your needs:
To change the amount of time between page refreshes, edit the line below. Enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59:
To change the image, edit the line below. Put the full path to your image, including the extention (.png/.jpg/gif etcc..):
Step 5) Save your changes.
Step 6) (optional) Open the "updateimage.html" file in your web browser and move it to your other monitor.
Done!
Notes:
-Sometimes Photoshop will error if you try to save the file while the page is refreshing because the file will be in use. Just try again.
-Only works well on dual monitors.