Bug 875126 - "Take screenshot" dialog should add .png to the saved file name and ignore all common image extensions typed
Summary: "Take screenshot" dialog should add .png to the saved file name and ignore al...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
Depends On:
Blocks: 886216
TreeView+ depends on / blocked
Reported: 2012-11-09 15:20 UTC by David Jaša
Modified: 2013-02-21 09:34 UTC (History)
12 users (show)

Fixed In Version: virt-viewer-0.5.2-18.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 875124
Last Closed: 2013-02-21 09:34:11 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0361 0 normal SHIPPED_LIVE virt-viewer bug fix and enhancement update 2013-02-20 20:53:07 UTC

Description David Jaša 2012-11-09 15:20:17 UTC
+++ This bug was initially created as a clone of Bug #875124 +++

Description of problem:
"Take screenshot" dialog should add .png to the saved file name and ignore all common image extensions typed.

The image saved is always in PNG format so .png file extension should be harcoded to the dialog in some smart way. Currently, if you change your image name to "something.jpg", it will be saved with such name but the data is still png-encoded...

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Marc-Andre Lureau 2012-11-14 20:27:23 UTC
patch are on the ML

Comment 2 Daniel Berrangé 2012-12-11 11:01:15 UTC
commit 8a7aa6a1e15dfc2adbb9627ec5e914e445f434ab
Author: Christophe Fergeau <cfergeau>
Date:   Tue Nov 13 12:52:31 2012 +0100

    Make sure png screenshots have a .png extensions
    When falling back to saving to .png, the filename might not
    end with .png. This commit appends the .png extension to the
    screenshot filename if it's missing.

commit f9935c832b84a31bc91f5fcdfdf459ee3a0913fe
Author: Christophe Fergeau <cfergeau>
Date:   Tue Nov 13 12:50:10 2012 +0100

    Allow to save to other formats than png
    Currently, the screenshots can only be saved to png. This commit
    checks if the file extension is a known one, and will save to this
    format if it is. Otherwise it will fallback to saving to png.

commit 45a791082ed07b4dfaa347ed434f29324dbd6815
Author: Christophe Fergeau <cfergeau>
Date:   Tue Nov 13 12:47:50 2012 +0100

    Set a default dir/name for screenshots
    It makes sense for the screenshots to be saved in ~/Images,
    especially as otherwise the filechooser will display
    'recent documents' to which we cannot save. This commit also sets
    the default screenshot name to 'Screenshot'.

Comment 3 yuping zhang 2012-12-12 03:32:02 UTC
I can reproduce this issue with virt-viewer-0.5.2-17.el6.x86_64.
Verified this issue with virt-viewer-0.5.2-18.el6.x86_64.

1.Use virt-viewer to open a guest.
2.Click File->Screenshot,the "Save screenshot" diaglog will pop up.The default name is "Screenshot".The default path is ~/Pictures.

3.Select a directory and then click "Save".

4.Check the file,the file format is PNG and .png has been added to the file.
# file Screenshot.png 
Screenshot.png: PNG image data, 800 x 600, 8-bit/color RGB, non-interlaced

5.Repeat the step 2,and save the screenshot with name: Screenshot.jpg , Screenshot.bmp and Screenshot.sdgfsdfawsdf.

Screenshot.bmp: PC bitmap, Windows 3.x format, 800 x 600 x 24
Screenshot.jpg: JPEG image data, JFIF standard 1.01
Screenshot.png: PNG image data, 800 x 600, 8-bit/color RGB, non-interlaced
Screenshot.sdgfsdfawsdf.png: PNG image data, 1024 x 768, 8-bit/color RGB, non-interlaced

Comment 5 yuping zhang 2012-12-13 05:38:25 UTC
According to comment 3,change the bug status to VERIFIED.

Comment 7 errata-xmlrpc 2013-02-21 09:34:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.