-
Notifications
You must be signed in to change notification settings - Fork 621
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
Semi-transparent outlines on raw, premultiplied input #350
Comments
Hey justewg, Had a similar issue and was able to back out the alpha channel in serve_rendered.js just before the call to sharp. Seems to work. I applied this js to the data object first: for (var i = 0; i < data.length; i += 4) { Admittedly inspired by consbio/mbgl-renderer@e64af7c after following the issue around. Perhaps that'll help your project get over the hump ours had. |
That works great. Thanks a lot, @cgalli |
Fix maptiler#350 issue Semi-transparent outlines on raw, premultiplied input
Perhaps a pull request could make it easier to get this fixed in the main repo? Or are there other reasons for the delays? |
FIx issue #350 Semi-transparent outlines on raw, premultiplied input
Thanks for great work, very usefull.
My business task for using tile-server is to show on leaflet/mapbox map three map layers, the lowest is land with some more layers, middle layer is our application data and top layer should contain roads, poi, labels, water regions and should be transparent, of course.
And I have to use raster map mode. So, now my top layer's tiles PNG-images enclose a gray or black substrate under the translucent white color. Result on the attached screenshot.
I found that raster files are producing by sharp-library and post the issue to author:
lovell/sharp#1599
Our common investigations point me to the follow: data, passed to sharp-constructor are premultiplied in mapbox-gl-native library.
But I haven't found the solution, where and how I can prevent it.
May be you can help me?
The text was updated successfully, but these errors were encountered: