Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#447 closed defect (fixed)

Saving plot as Raw RGBA format generates an image-less file

Reported by: smk78 Owned by: smk78
Priority: critical Milestone: SasView 4.0.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

Saving a plot as Raw RGBA format generates a file but the file does not appear to contain any image! See attached.

Attachments (3)

image.raw (926.0 KB) - added by smk78 9 years ago.
Raw RGBA format file
image.rgba (2.3 MB) - added by lewis 8 years ago.
export.png (23.4 KB) - added by lewis 8 years ago.

Change History (10)

Changed 9 years ago by smk78

Raw RGBA format file

comment:1 Changed 8 years ago by lewis

Also raises an exception:

Matplotlib backend_wx error: 'unicode' object has no attribute 'close'
Version 0, edited 8 years ago by lewis (next)

Changed 8 years ago by lewis

Changed 8 years ago by lewis

comment:2 Changed 8 years ago by lewis

Both SasView 3.1.2 and the current Jenkins build produce the correct image file, just with the wrong extension (.raw instead of .rgba)

The attached image.rgba file is an example output. This can be converted to .png file using ImageMagick:

magick convert -size 935x635 -depth 8 image.rgba export.png

Which produces the attached export.png image

Last edited 8 years ago by lewis (previous) (diff)

comment:3 Changed 8 years ago by lewis

  • Owner set to smk78
  • Status changed from new to assigned

Raw rgba formats are useless unless the user knows the dimensions and pixel depth of the image. These need to be added to the documentation somewhere:

Dimensions: 935x635 pixels
Pixel Depth: 8

comment:4 Changed 8 years ago by pkienzle

could remove rgb and rgba formats using:

    from matplotlib import backend_bases
    backend_bases._default_filetypes.pop('raw', None)
    backend_bases._default_filetypes.pop('rgba', None)

probably in sasview.py

comment:5 Changed 8 years ago by smk78

Have updated /sasview/src/sas/sasgui/guiframe/media/graph_help.rst to say:

RAW/RGBA (bitmap, stored as 935x635 pixels of depth 8)

comment:6 Changed 8 years ago by lewis

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:7 Changed 8 years ago by butler

  • Milestone changed from SasView Next Release +1 to SasView 4.0.0
Note: See TracTickets for help on using tickets.