Changeset 3152a02 in sasview


Ignore:
Timestamp:
Sep 18, 2017 9:58:43 PM (7 years ago)
Author:
GitHub <noreply@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
8c945ec
Parents:
cfd27dd (diff), 412e9e8b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Butler <butlerpd@…> (09/18/17 21:58:43)
git-committer:
GitHub <noreply@…> (09/18/17 21:58:43)
Message:

Merge pull request #107 from SasView?/898_imageviewer_file_selector

898 imageviewer file selector

Location:
src/sas/sasgui/perspectives/calculator
Files:
3 added
3 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/image_viewer.py

    ra1b8fee r412e9e8b  
    5959            _, extension = os.path.splitext(basename) 
    6060            try: 
     61                # Note that matplotlib only reads png natively. 
     62                # Any other formats (tiff, jpeg, etc) are passed 
     63                # to PIL which seems to have a problem in version 
     64                # 1.1.7 that causes a close error which shows up in  
     65                # the log file.  This does not seem to have any adverse 
     66                # effects.  PDB   --- September 17, 2017. 
    6167                img = mpimg.imread(file_path) 
    6268                is_png = extension.lower() == '.png' 
     
    8995        if location is None: 
    9096            location = os.getcwd() 
    91         dlg = wx.FileDialog(self.parent, "Image Viewer: Choose a image file", 
    92                             location, "", "", style=wx.FD_OPEN | wx.FD_MULTIPLE) 
     97        wildcard="Images (*.bmp;*.gif;*jpeg,*jpg;*.png;*tif;*.tiff)|*bmp;\ 
     98            *.gif; *.jpg; *.jpeg;*png;*.png;*.tif;*.tiff|"\ 
     99            "Bitmap (*.bmp)|*.bmp|"\ 
     100            "GIF (*.gif)|*.gif|"\ 
     101            "JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|"\ 
     102            "PNG (*.png)|*.png|"\ 
     103            "TIFF (*.tif;*.tiff)|*.tif;*tiff|"\ 
     104            "All Files (*.*)|*.*|" 
     105 
     106        dlg = wx.FileDialog(self.parent, "Image Viewer: Choose an image file", 
     107                            location, "", wildcard, style=wx.FD_OPEN 
     108                            | wx.FD_MULTIPLE) 
    93109        if dlg.ShowModal() == wx.ID_OK: 
    94110            path = dlg.GetPaths() 
  • src/sas/sasgui/perspectives/calculator/media/image_viewer_help.rst

    rda456fb r412e9e8b  
    3434   will be displayed. 
    3535 
    36 .. image:: load_image.bmp 
     36.. image:: load_image.png 
    3737 
    38383) To save, print, or copy the image, or to apply a grid overlay, right-click  
    3939   anywhere in the plot. 
    4040 
    41 .. image:: pic_plot.bmp 
     41.. image:: pic_plot.png 
    4242 
    43434. If the image is taken from a 2D detector, SasView can attempt to convert  
     
    5151   then click the OK. 
    5252 
    53 .. image:: pic_convert.bmp 
     53.. image:: pic_convert.png 
    5454 
    5555.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
Note: See TracChangeset for help on using the changeset viewer.