Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail view not appearing in "Open Displays" on Windows #72

Open
lhsego opened this issue Jan 22, 2015 · 9 comments
Open

Thumbnail view not appearing in "Open Displays" on Windows #72

lhsego opened this issue Jan 22, 2015 · 9 comments

Comments

@lhsego
Copy link
Member

lhsego commented Jan 22, 2015

On Windows, the thumbnail view of the display in "Open Displays" is blank (at least on Chrome, haven't tested it on Firefox).

@hafen
Copy link
Contributor

hafen commented Jan 24, 2015

Interesting... this shouldn't be a platform-specific problem unless it has to do with the generation of the thumbnail. Can you check to see if the thumbnail exists? Look for _vdb_directory_/displays/_group_/_name_/thumb.png.

Also, have you looked at it on mac/linux too? What kind of panel function is it? Thumbnails currently only work for panel functions that can create raster images (base R, ggplot, and lattice).

@lhsego
Copy link
Member Author

lhsego commented Feb 10, 2015

It's happening with base R. On mac/linux, the thumb_small.png file gets created like this:
thumb_small
But on Windows, thumb_small.png is just a white, square, image:
thumb_small

@hafen
Copy link
Contributor

hafen commented Feb 10, 2015

Oh strange. I thought your fix took care of this?

@lhsego
Copy link
Member Author

lhsego commented Feb 11, 2015

No, my fixes just ensured that vdb files actually got copied from the temp folder to the vdb because file.rename(), when applied to a directory, does nothing in Windows. The files have to be renamed individually (using a vector of filenames) in file.rename(). This issue is something else: thumb_small.png isn't getting written (or written correctly) in Windows. Will look into it.

@amwhite
Copy link

amwhite commented Feb 11, 2015

This is a known issue with the rasterImage function which is used to create the thumbnail. Basically it doesn't work if you're accessing a windows machine via remote desktop. See issue and potential solution (for windows server) here:
http://r.789695.n4.nabble.com/R-base-package-grid-does-not-output-raster-image-td4672188.html

@amwhite
Copy link

amwhite commented Feb 12, 2015

More information about my previous comment. The problem with rasterImage() and windows remote desktop is mentioned in the documentation here: https://stat.ethz.ch/R-manual/R-devel/library/graphics/html/rasterImage.html. It's important to note that the problem here is the remote desktop connection when creating the display (i.e. calling makeDisplay()) not when viewing the display.

When remoting from a windows machine to a windows machine, you can set the number of colors to Highest Quality (32 bit) like below and that alleviates the problem:
capture

When remoting from mac to windows I tried setting colors to Millions instead of Thousands (Preferences-->Display before connecting to remote machine) but RDC just froze. I'm not sure RDC for Mac is stable/powerful enough to handle this but perhaps others should try.
screen shot 2015-02-11 at 6 12 16 pm

@lhsego
Copy link
Member Author

lhsego commented Feb 12, 2015

Thanks for figuring this out, Amanda!

@hafen
Copy link
Contributor

hafen commented Feb 12, 2015

I wonder if we should use something other than rasterImage. Originally I just made a scaled-down version of the image but had a hard time doing it reliably. Also, we don't have a good way to get thumbnails for javascript-based panel functions right now as they are rendered in the browser instead of R. This is extremely low priority to do anything about in my opinion.

@hafen
Copy link
Contributor

hafen commented Feb 12, 2015

Least we could do is make it show "no thumbnail available" when there isn't one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants