png ring of death revisited
See original GitHub issueVersions
- Python: 3.7.1
- OS: MacOS Mojave 10.14
- MacBook Pro (Retina, 13-inch, Early 2015)
- Intel Iris Graphics 6100 1536 MB
- Kivy: 1.10.1
- Kivy installation method: pip install into conda environment
Description
When placing a png on a canvas a ring appears around the outside unexpectedly. The expectation is that no ring will appear.
This issue has been discussed in the past: https://groups.google.com/forum/#!topic/kivy-users/W2lloACEKCw
And there is a similar issue: #4463
The above do not address the use case below where an image simply needs to be placed on a canvas that does not have a uniform background. Maybe I did not understand the discussed solutions, but I tried exporting this white_circle.png format from Adobe illustrator in about every configuration I could think of: PNG, PNG8, anti-aliasing options, interlace options. The transparency option has to be enabled because the image crosses boundaries.
Code and Logs
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
Builder.load_string("""
<MainWidget>
canvas.before:
Color:
rgba: 1,1,1,1
Rectangle:
pos: self.pos
size: self.size
Widget:
Widget:
canvas.before:
Color:
rgba: 0.5,0.5,0.5,1
Rectangle:
pos: self.pos
size: self.size
Color:
rgba: 1,1,1,1
Rectangle:
source: './white_circle.png'
pos: self.pos[0] - dp(100), self.pos[1] + dp(100)
size: self.width + dp(200), self.width + dp(200)
Widget:
""")
class MainWidget(BoxLayout):
def __init__(self, **kwargs):
super(MainWidget, self).__init__(**kwargs)
class MyApp(App):
def build(self):
return MainWidget()
if __name__ == '__main__' or __name__ == 'android':
MyApp().run()
Screen shot
white_circle.png
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Poet Kim Yeong-nang revisited in English - Korea Times
This year marks the 60th anniversary of the death of poet Kim Yeong-nang who died in the early period of the Korean War...
Read more >Revisiting The Return of the King - FAITH & CULTURE
Believing that Aragorn was going to certain death in taking such a path, she asked nonetheless, her eyes “on fire”, whether she could...
Read more >Dark Side Of The Ring - Jimmy Snuka and the Death of Nancy ...
Once again the episode is narrated by 'Le Champion' Chris Jericho. Interview subjects include Sam Fatu (aka The Tonga Kid), Don Muraco, Irvin ......
Read more >The American Way of Death Revisited - Amazon.com
Here is the classic anatomy of America's funeral practices, revised, expanded, and brought up-to-date for a new generation. Thirty-five years ago, ...
Read more >The Lion King: Revisited Wiki | Fandom
Since his death, he lives on as a spirit that gives Kion advice on how to get through any tough plight. Khary Payton...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s unlikely to be solved us any time soon, i’m fine with leaving it open for reference, but if you (or anyone) wants to investigate and find a proper fix, that would be awesome 😃.
@ssolari “Preventing an outline in parts of the PNG when scaling the image” - we cannot do magic everywhere for everything! 😃
As explained before, the RGB part when the A is black (aka transparent) have a wrong color. You must put white color if you want to have good antialiasing. I don’t know how others toolkit are “fixing” theses kind of issues. When you make transparent images: make sure the RGB part always cover the whole image with a consistent color (aka if you do a circle, you shouldn’t see a black/white circle in RGB). Only Alpha should have black/white that create the circle shape.
IMO, it is not revisited, it’s the same as explained on previous posts 😃