ginga icon indicating copy to clipboard operation
ginga copied to clipboard

Feature Request: ScreenShot to include colorbar

Open pllim opened this issue 7 years ago • 15 comments

User was expecting something like this (with colorbar included):

screenshot

But ScreenShot plugin only saves out this (without colorbar):

testscreen

pllim avatar May 15 '17 18:05 pllim

Probably not a solution, but more of a workaround: add a color bar to the window before taking the screenshot. Press "y" to go into cmap mode, then press "c" to add a colorbar and Esc to get out of cmap mode. Then take the screenshot.

ejeschke avatar May 15 '17 18:05 ejeschke

Well, it kind of work but not quite... I see the colorbar on the "snap" GUI but I don't see it when I click "Save".

pllim avatar May 15 '17 18:05 pllim

@pllim, it doesn't look like you added the color bar. Here's what my screen capture looks like:

sc

ejeschke avatar May 15 '17 19:05 ejeschke

Here's what my screen capture looks like

That is the saved PNG that I attached. If you click the "Fit" button does it show the whole snapshot including the color bar?

ejeschke avatar May 15 '17 20:05 ejeschke

@ejeschke , I only see colorbar in the plugin display, not in the saved PNG file. I tried both zoomed in and fit.

pllim avatar May 16 '17 14:05 pllim

Even if the colorbar somehow gets saved, it is still not ideal in its current state, because it runs across the snapped image, thus covering part of it, and cannot be used in a publication. User wants the colorbar to be at the bottom, as with the main display.

pllim avatar May 16 '17 14:05 pllim

I only see colorbar in the plugin display, not in the saved PNG file. I tried both zoomed in and fit.

I think we ought to look into that. Somehow it doesn't seem that the codebase you are running is the same as mine. If you see the colorbar in the display, it should be in the final saved PNG file. Did you try opening it in another image viewer?

Even if the colorbar somehow gets saved, it is still not ideal in its current state, because it runs across the snapped image, thus covering part of it, and cannot be used in a publication. User wants the colorbar to be at the bottom, as with the main display.

Sure. I think the colorbar can be placed below the data in the main window just by specifying a different (x, y) coordinate. That might be one solution.

ejeschke avatar May 16 '17 16:05 ejeschke

@ejeschke , what are the exact steps you are using to produce your PNG with colorbar? I can try to follow them and see if that helps.

pllim avatar May 16 '17 16:05 pllim

what are the exact steps you are using to produce your PNG with colorbar? I can try to follow them and see if that helps.

Press "y" to go into cmap mode, then press "c" to add a colorbar. A color bar should now be visible over the image. Press Esc to get out of cmap mode. Then click Snap in the plugin to take the screenshot. If you now press Fit you should see the screenshot in full with the colorbar in the plugin ginga widget. Use "Save" button to save the screenshot. The color bar should also appear in the saved PNG or JPEG image in the file. Note that it should not be necessary to fit the image to have the colorbar be saved; it's just a handy button to fit the PNG image to the window.

ejeschke avatar May 16 '17 16:05 ejeschke

Oh... So I have to press "y" etc in the main display! I have been doing it in the plugin display instead. 😂

I do have to press "fit" for the colorbar to appear but after that when I zoom in and "snap" again, the colorbar remains.

pllim avatar May 16 '17 17:05 pllim

I do have to press "fit" for the colorbar to appear but after that when I zoom in and "snap" again, the colorbar remains.

The viewer in the plugin is just a ginga widget, so you are just not seeing the color bar until you fit the image (i.e. a zoom to fit) so that the lower part of the PNG image appears in the viewer.

ejeschke avatar May 16 '17 18:05 ejeschke

Also, the second colorbar that pops up when I do this does not exactly match the tick labels as the main colorbar (although I think both are correct). It is not critical though.

Still it would be nice to have the following instead:

  • Colorbar appear at the bottom (not across) image.
  • Something to make it appear in screenshot without having to fiddle with so many incantations ("y", "c", "esc", etc).
  • If possible (to make everyone happy), a checkbox to toggle colorbar on/off in screenshot. Although for a science paper, I don't know why one would want to exclude the colorbar.

pllim avatar May 16 '17 18:05 pllim

We could have the ScreenShot plugin add the color bar below the image (based on whether a checkbox in the plugin is checked) when it is resumed and removed when paused or stopped.

ejeschke avatar May 16 '17 21:05 ejeschke

I think we need to make it clear that this plugin only captures the channel viewer window contents. If you need to capture more parts of the application (e.g. plugin UI, etc.) it's better to just use a native screen capture app for the host OS.

ejeschke avatar May 16 '17 21:05 ejeschke

@ejeschke , user is only interested in adding a colorbar to the captured image, nothing more. 😄

pllim avatar May 17 '17 17:05 pllim