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

Smeared image after resize on OSX (offscreen mode) #311

Open
scottwittenburg opened this issue Feb 5, 2018 · 5 comments
Open

Smeared image after resize on OSX (offscreen mode) #311

scottwittenburg opened this issue Feb 5, 2018 · 5 comments
Milestone

Comments

@scottwittenburg
Copy link
Collaborator

Here is a short script to reproduce:

python

import vcs, cdms2, os

vcs.download_sample_data_files()

# offscreen mode 
bg = 1
modeStr = 'offscreen' if bg is 1 else 'onscreen'

# An example demonstrating patterns with meshfill
cltfile = cdms2.open(os.path.join(vcs.sample_data, 'clt.nc'))
clt = cltfile('clt')

# Initialize at one size
canvas = vcs.init(geometry={'width': 800, 'height': 600}, bg=bg)

box = canvas.createboxfill()

box.boxfill_type = 'custom'
box.fillareastyle = 'hatch'
# Refer to http://uvcdat.llnl.gov/examples/pattern_chart.html for a list of patterns
box.fillareaindices = [1, 2, 3, 4, 5]
box.fillareaopacity = [50.0, 85.1, 23.5, 99.9, 100]
box.levels = [0, 20, 40, 60, 80, 100]
box.fillareacolors = vcs.getcolors(box.levels)

canvas.plot(clt, box)

canvas.png('smear_expected_%s' % modeStr)

# Now resize
canvas.geometry(600, 400)

canvas.png('smear_smeared_%s' % modeStr)

This seems to work fine everywhere in onscreen mode (bg=0). However, on OSX only, and in offscreen mode (bg=1), the resized image seems to be smeared vertically near the bottom of the image. See attached screenshot:

smear_smeared_offscreen

@scottwittenburg
Copy link
Collaborator Author

Ping @danlipsa @aashish24 @sankhesh @charlesdoutriaux in case any of you may have seen something like this before.

@doutriaux1
Copy link
Contributor

I have mesalib installed and it works fine.

@doutriaux1
Copy link
Contributor

I can confirm that w/o mesa I get the same thing as @scottwittenburg

@dnadeau4
Copy link

dnadeau4 commented Feb 5, 2018

Looks a lot llike this.
CDAT/cdms#208
CDAT/cdms#208 (comment)

@doutriaux1
Copy link
Contributor

doutriaux1 commented Feb 5, 2018

I thought so too at first, but I think it's different, in the issue CDAT/cdms#208 (comment) the regridder smears the data, here there's no regridder involved.

@doutriaux1 doutriaux1 added this to the Next Release milestone Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants