Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving plot as Raw RGBA format generates an image-less file (Trac #447) #581

Closed
smk78 opened this issue Mar 30, 2019 · 10 comments
Closed

Saving plot as Raw RGBA format generates an image-less file (Trac #447) #581

smk78 opened this issue Mar 30, 2019 · 10 comments
Assignees
Labels
Critical High priority Defect Bug or undesirable behaviour
Milestone

Comments

@smk78
Copy link
Contributor

smk78 commented Mar 30, 2019

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

Migrated from http://trac.sasview.org/ticket/447

{
    "status": "closed",
    "changetime": "2016-10-07T00:11:17",
    "_ts": "2016-10-07 00:11:17.602351+00:00",
    "description": "Saving a plot as Raw RGBA format generates a file but the file does not appear to contain any image! See attached.",
    "reporter": "smk78",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Bug Fixing",
    "time": "2015-07-07T10:48:48",
    "component": "SasView",
    "summary": "Saving plot as Raw RGBA format generates an image-less file",
    "priority": "critical",
    "keywords": "",
    "milestone": "SasView 4.0.0",
    "owner": "smk78",
    "type": "defect"
}
@smk78 smk78 added this to the SasView 4.0.0 milestone Mar 30, 2019
@smk78 smk78 self-assigned this Mar 30, 2019
@smk78 smk78 added Critical High priority Defect Bug or undesirable behaviour Incomplete Migration and removed Incomplete Migration labels Mar 30, 2019
@smk78
Copy link
Contributor Author

smk78 commented Mar 30, 2019

Trac update at 2015/07/07 10:49:18:

  • smk78 changed attachment from "" to "image.raw"
  • smk78 commented:

Raw RGBA format file

@sasview-bot
Copy link

Trac update at 2016/08/15 09:14:39: lewis changed _comment0 from:

Also raises an exception:

{{{
Matplotlib backend_wx error: 'unicode' object has no attribute 'close'
}}}

to:

1471259854718583

@sasview-bot
Copy link

Trac update at 2016/08/15 11:25:02: lewis changed attachment from "" to "image.rgba"

@sasview-bot
Copy link

Trac update at 2016/08/15 11:25:17: lewis changed attachment from "" to "export.png"

@sasview-bot
Copy link

Trac update at 2016/08/15 11:27:05:

  • lewis changed _comment0 from:

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

to:

1471260441835001

  • lewis commented:

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

@sasview-bot
Copy link

Trac update at 2016/08/16 14:25:04:

  • lewis commented:

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

  • lewis changed owner from "" to "smk78"
  • lewis changed status from "new" to "assigned"

@pkienzle
Copy link
Contributor

Trac update at 2016/08/16 15:04:46: pkienzle commented:

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

@smk78
Copy link
Contributor Author

smk78 commented Mar 30, 2019

Trac update at 2016/08/16 15:29:58: smk78 commented:

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

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

@sasview-bot
Copy link

Trac update at 2016/08/17 11:22:00:

  • lewis changed resolution from "" to "fixed"
  • lewis changed status from "assigned" to "closed"

@butlerpd
Copy link
Member

Trac update at 2016/10/07 00:11:17: butler changed milestone from "SasView Next Release +1" to "SasView 4.0.0"

@smk78 smk78 closed this as completed Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical High priority Defect Bug or undesirable behaviour
Projects
None yet
Development

No branches or pull requests

4 participants