Skip to content

Better warnings for faulty gs #3282

Closed
Closed

Description

@PaulWessel

Description of the desired feature

While the developers know that gs 9.51 and 9.52 have a broken transparency system, the users don't know that. So we get issues posted here or on the forum that sometimes we quickly can dismiss and other times it may take lots of debug to realize the problem is related to a bad gs.

Suggestion: Maybe have a list of known bad gs version in a file, and when psconvert checks what gs version it has, we can compare and at least warn about problematic versions. It could be a file like this

struct GS_VERSIONS {
#include "gmt_bad_gs.h"
0, 0};

and then a call to a small function to check if ours is one of the bad, then warning.

OK, or any better ideas, @joa-quim and @seisman? We spent hours trying to figure out why a movie did not have transparency until we learned the other user had 9.52...

Activity

  1. seisman commented on May 8, 2020

    @seisman
    Member

    But it will definitely annoy users if they don't use any transparency in their figures.

  2. PaulWessel commented on May 8, 2020

    @PaulWessel
    ContributorAuthor

    We could only issue the message if they are doing transparency. We know since we scan the PS to find out.

  3. seisman commented on May 8, 2020

    @seisman
    Member

    We could only issue the message if they are doing transparency. We know since we scan the PS to find out.

    Good to know that. Then I agree we should warn them.

  4. PaulWessel commented on May 8, 2020

    @PaulWessel
    ContributorAuthor

    Are you able to build and test gs from source (e.g., to see if their bug has been fixed in the repo)?

  5. reopened this on May 8, 2020
  6. seisman commented on May 8, 2020

    @seisman
    Member

    Just build their master branch. The transparency bug in 9.51 and 9.52 is fixed. Now I can see transparency in PDF, JPG and PNG.

    However, I get the following warnings for transparent plots:

       **** WARNING: .setopacityalpha is deprecated (as of 9.53) and will be removed in a future release
       **** See .setfillconstantalpha/.setalphaisshape for the improved solution
    
  7. PaulWessel commented on May 12, 2020

    @PaulWessel
    ContributorAuthor

    This is a threat for us, so we need to figure out how to rewrite the PSL_transp PostScript function that is defined in the PSL_strings.h include file. I have yet to find any documentation on .setfillconstantalpha and how to use it. Just replacing .setopacityalpha with . setfillconstantalpha did not seem to wark (no errors, but no transparency). We will need to research this more to better document how we do this, possibly asking the gs people for advice.

  8. seisman commented on May 12, 2020

    @seisman
    Member
  9. seisman commented on May 12, 2020

    @seisman
    Member

    Just replacing .setopacityalpha with . setfillconstantalpha did not seem to wark (no errors, but no transparency).

    It works for me with gs 9.53 (built from their master a few days ago). It doesn't work for you possibly because you're still using 9.50?

  10. PaulWessel commented on May 12, 2020

    @PaulWessel
    ContributorAuthor

    Yes. So we cannot drop it in yet, but also cannot wait until they drop support. I guess we need a way to issue the right code based on gs version. Have to think about how that should be done, maybe with a bit-flag passed into PSL_plotinit.

  11. stale commented on Aug 15, 2020

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

  12. added
    stale
    on Aug 15, 2020
  13. added
    longterm
    on Aug 15, 2020
  14. removed
    stale
    on Aug 15, 2020
  15. seisman commented on Nov 15, 2020

    @seisman
    Member

    I just opened another issue #4453 to discuss the compatibility of setopacityalpha and setfillconstantalpha. This issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    longterm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions