Bug 875126 - "Take screenshot" dialog should add .png to the saved file name and ignore all common image extensions typed
"Take screenshot" dialog should add .png to the saved file name and ignore al...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
:
Depends On:
Blocks: 886216
  Show dependency treegraph
 
Reported: 2012-11-09 10:20 EST by David Jaša
Modified: 2013-02-21 04:34 EST (History)
12 users (show)

See Also:
Fixed In Version: virt-viewer-0.5.2-18.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 875124
Environment:
Last Closed: 2013-02-21 04:34:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Jaša 2012-11-09 10:20:17 EST
+++ 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):
mingw-remote-viewer-0.5.3-16
virt-viewer-0.5.2-16.el6.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Marc-Andre Lureau 2012-11-14 15:27:23 EST
patch are on the ML
Comment 2 Daniel Berrange 2012-12-11 06:01:15 EST
commit 8a7aa6a1e15dfc2adbb9627ec5e914e445f434ab
Author: Christophe Fergeau <cfergeau@redhat.com>
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@redhat.com>
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@redhat.com>
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-11 22:32:02 EST
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 00:38:25 EST
According to comment 3,change the bug status to VERIFIED.
Comment 7 errata-xmlrpc 2013-02-21 04:34:11 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0361.html

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