question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange effect on display png images with transparent background.

See original GitHub issue

When I display the images, they have a dark border around, but the issue only happen in iphone and ipad. I created the images with GIMP.

Is there any solution to solve this problem?

Partial screenshot form ipad issue

from kivy.app import App
from kivy.graphics import Color, Rectangle
from kivy.uix.gridlayout import GridLayout
from kivy.uix.image import Image

class ShowImage(GridLayout):
    def __init__(self, *args, **kwargs):
        super(ShowImage, self).__init__(**kwargs)

        self.size_hint = (1, 1)
        self.rows = 1
        self.cols = 3

        self.add_widget(Image(size_hint=(1/3., 1), source='img01.png'))
        self.add_widget(Image(size_hint=(1/3., 1), source='img02.png'))
        self.add_widget(Image(size_hint=(1/3., 1), source='img03.png'))

        self.rect = None
        with self.canvas.before:
            Color(1, 1, 1, 1, mode='rgba')
            self.rect = Rectangle(pos=self.pos, size=self.size)

        def update_pos(instance, pos):
            self.rect.pos = pos
        def update_size(instance, size):
            self.rect.size = size
        self.bind(pos=update_pos)
        self.bind(size=update_size)

class TestApp(App):
    def build(self):
        return ShowImage()

if __name__ == '__main__':
    TestApp().run()

img01 img02 img03

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
princeItacommented, Jul 18, 2018

Thank you so much @tshirtman. it worked. You know when you said I should downscale the image I thought you meant I should reduce the size (dimensions of the image) programmatically By changing it’s width and height. i reduced the size of the image using a picture editing program and the image displays fine on the app. Thanks

Get Outlook for Androidhttps://aka.ms/ghei36


From: Gabriel Pettier notifications@github.com Sent: Monday, July 16, 2018 10:11:00 PM To: kivy/kivy Cc: princeIta; Mention Subject: Re: [kivy/kivy] Strange effect on display png images with transparent background. (#4463)

can you open a new issue about that, and put the image (or another showing the same issue) in it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/kivy/kivy/issues/4463#issuecomment-405383322, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlfNZlt_evugS_Q7tZ8JU4l2y0Oz-1baks5uHQFkgaJpZM4JKNVr.

1reaction
mrhdiascommented, Jul 25, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange PNG Images With Transparent Background - Lovepik
Search and download 310+ free HD Strange PNG images with transparent background online from Lovepik. ... Yellow strange magic light effect png transparent....
Read more >
Invisible PNG image layer that is only visible as a background
Open it with XnView, click "Remove Alpha Channel" , and you'll see the full image. Windows 7 converts backgrounds to JPEG, losing transparency...
Read more >
Strange bug with PNG layers - Graphic Design Stack Exchange
I've uploaded these pictures on Discord, and in chat it appears transparent, but when downloading the PNG files, the background appears ...
Read more >
Why do PNG files sometimes have 'black' backgrounds even ...
Because the viewer that you're using to see the file shows black as the color of transparency - or because it doesn't support...
Read more >
Solved: Transparent PNG background prints as semi-transpar...
correct answers 1 Correct answer · You're using the wrong image format for printing. PNG and its transparency are not intended for print-destined ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found