wxGUI AddWSDialog RenderWMSMgr: Fix render WMS jpeg source format#640
Merged
petrasovaa merged 1 commit intoMay 18, 2020
Merged
Conversation
petrasovaa
reviewed
May 17, 2020
| add_alpha_channel = True | ||
| mask_fill_value = 0 | ||
| if self.fetching_cmd[1]['format'] == 'jpeg': | ||
| mask_fill_value = 256 |
Contributor
There was a problem hiding this comment.
Thank you for fixing it, could you explain the fill value 256?
Member
Author
There was a problem hiding this comment.
You are welcome. Correct value should be 255 (white color), not 256 (but every value > 255 produce white color in this case). Alright I updated it to the correct value. If mask is white color g.pnmcomp doesn't apply mask for the input map (WMS jpeg source format) and rendering is correctly.
/gui/wxpython/core/render.py, row 658
if maps:
ret, msg = RunCommand('g.pnmcomp',
getErrorMsg=True,
overwrite=True,
input='%s' % ",".join(maps),
mask='%s' % ",".join(masks),
opacity='%s' % ",".join(opacities),
bgcolor=bgcolor,
width=env['GRASS_RENDER_WIDTH'],
height=env['GRASS_RENDER_HEIGHT'],
output=self.Map.mapfile,
env=env)
5732b36 to
33e6724
Compare
petrasovaa
pushed a commit
that referenced
this pull request
May 18, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To reproduce:
http://ows.mundialis.de/services/service?in the Server TextCtrl widgetError message (Console page):
Error message (Terminal emulator):