C
Csaba2000
I first noticed this nearly two years ago on my Win 2K Pro
system, and it's still here on my Win XP Pro system, so...
I have a program which rotates .jpg files by changing a
minimal number of bits in the file that specifies orientation (it's one
or two bytes if I remember correctly). This is fast. I wrap this in
a program which looks at the file (modification) date
(http://php.net/filemtime) and does a file touch (http://php.net/touch)
with the original date after changing the rotation). This part works
well.
The problem is that as soon as the file's date is reset to the original,
the thumbnail for it reverts back to the original (if you don't suspend
the process right before the touching, it will just seem like nothing
has changed) - it is an incorrect thumbnail. That's a bug.
This happens with or without thumbnail cacheing being on, and in both
folder styles: Tools / Folder Options / Show common tasks in folders
and also Use Windows classic folders.
There are two ways I know to "adjust" the thumbnails (fix the images).
Both of these are with thumbnail cacheing off (I've forgotten the details
of what happens when it's on, but I think it's worse). One is to close
the folder and reopen it. This is the cleanest in the sense that
everything is redone from scratch but it's pretty awful from a user
interface point of view.
The second is that if there is at least one image selected, you can, either
from the File menu or the context menu, do a Re&fresh Thumbnail.
This will clean up the thumbnail cache for that file. Or so it seems.
If you now press F5 then you will see those thumbnails that were
refreshed CYCLE through the images that were there before and
after the Refresh Thumbnail for that image. That's a bug.
For example, if you refresh one image once during the process of
rotation that gives a cycle of 2. If you refresh one image twice, that
gives a cycle of 3. If you refreshed one image once and another
image twice (since the last opening of the folder) it would take you
six F5 hits to cycle through all the combinations (the least common
multiple of 2 and 3).
If I have ahold of the IWebBrowser2 COM object (in VB/Script),
an element of CreateObject("Shell.Application).Windows, that
corresponds to the folder in question, then doing a Refresh2(3)
seems to correspond to hitting the F5 key (I didn't do exhaustive
testing of 0-2). However, in no case did the thumbnails reset to
the correct relection of the images. It is a nice idea to be able to
programmatically refresh Explorer's display of files - it would be
great if it worked.
Finally, I just want to stress that there was no thumbs.db during
this testing process since I turned off thumbnail cacheing. That
would seem to indicate that it's a Windows Explorer issue.
There you have it. For further enlightenment you could try to
reach me over email or (+1)212-400-7927, since my monitoring
of this group is probably short lived.
Csaba Gabor
system, and it's still here on my Win XP Pro system, so...
I have a program which rotates .jpg files by changing a
minimal number of bits in the file that specifies orientation (it's one
or two bytes if I remember correctly). This is fast. I wrap this in
a program which looks at the file (modification) date
(http://php.net/filemtime) and does a file touch (http://php.net/touch)
with the original date after changing the rotation). This part works
well.
The problem is that as soon as the file's date is reset to the original,
the thumbnail for it reverts back to the original (if you don't suspend
the process right before the touching, it will just seem like nothing
has changed) - it is an incorrect thumbnail. That's a bug.
This happens with or without thumbnail cacheing being on, and in both
folder styles: Tools / Folder Options / Show common tasks in folders
and also Use Windows classic folders.
There are two ways I know to "adjust" the thumbnails (fix the images).
Both of these are with thumbnail cacheing off (I've forgotten the details
of what happens when it's on, but I think it's worse). One is to close
the folder and reopen it. This is the cleanest in the sense that
everything is redone from scratch but it's pretty awful from a user
interface point of view.
The second is that if there is at least one image selected, you can, either
from the File menu or the context menu, do a Re&fresh Thumbnail.
This will clean up the thumbnail cache for that file. Or so it seems.
If you now press F5 then you will see those thumbnails that were
refreshed CYCLE through the images that were there before and
after the Refresh Thumbnail for that image. That's a bug.
For example, if you refresh one image once during the process of
rotation that gives a cycle of 2. If you refresh one image twice, that
gives a cycle of 3. If you refreshed one image once and another
image twice (since the last opening of the folder) it would take you
six F5 hits to cycle through all the combinations (the least common
multiple of 2 and 3).
If I have ahold of the IWebBrowser2 COM object (in VB/Script),
an element of CreateObject("Shell.Application).Windows, that
corresponds to the folder in question, then doing a Refresh2(3)
seems to correspond to hitting the F5 key (I didn't do exhaustive
testing of 0-2). However, in no case did the thumbnails reset to
the correct relection of the images. It is a nice idea to be able to
programmatically refresh Explorer's display of files - it would be
great if it worked.
Finally, I just want to stress that there was no thumbs.db during
this testing process since I turned off thumbnail cacheing. That
would seem to indicate that it's a Windows Explorer issue.
There you have it. For further enlightenment you could try to
reach me over email or (+1)212-400-7927, since my monitoring
of this group is probably short lived.
Csaba Gabor