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

Android : Some .jpg are not displayed, some are. #1471

Closed
Janloui opened this issue Jul 25, 2022 · 2 comments
Closed

Android : Some .jpg are not displayed, some are. #1471

Janloui opened this issue Jul 25, 2022 · 2 comments
Labels

Comments

@Janloui
Copy link

Janloui commented Jul 25, 2022

Hi everyone.
I built an android app with Kivy/Buildozer. Everything works perfectly except one thing :

i have a problem with some .jpg files. They are not displayed (replaced by a white square) on my phone. (BUT correctly displayed on PC)
Some others .jpg are correctly displayed, they have same size, and they are displayed in the same Screen than the other should be. So i cant find where is the problem, since it works for some .jpg and not for other ...

Here is a part of the .kv file :

<TgiesScreen>
    GridLayout:
        rows: 2
        cols: 1
        BoxLayout:
            Scatter:
                do_rotation: False
                size_hint: (None, None)
                size: gties.size
                Image:
                    id: gties
                    size: (500, 1540)
                    source: root.choix
        BoxLayout:
            size_hint: 1, 0.1
            Label:
                text: ''
            Button:
                text: 'Retour tarifs'
                on_press: root.manager.current = 'result'

So as you can see it should display this source : root.choix
Here in the .py file i have a simple function :

class TgiesScreen(Screen):
    choix = StringProperty('performance.jpg')
    def choix_perf(self):
        self.choix = 'performance.jpg'
    def choix_quiet(self):
        self.choix = 'quietude.jpg'
    def choix_plenitude(self):
        self.choix = 'plenitude.jpg'
    def choix_dyna(self):
        self.choix = 'dynamique.jpg'
    def choix_tepeeg(self):
        self.choix = 'tepeeg.jpg'
    def choix_vitaneor(self):
        self.choix = 'vitaneor.jpg'
    def choix_mh(self):
        self.choix = 'mh.jpg'
    pass

Function is triggered by a button in another Screen, then my variable root.choix take the related value/path : 'myjpg.jpg'

Here is how its works. So, with this method some .jpg are not displayed. And i dont understand why. Is that a known error ?
Thanks. (.jpg files are all in the same files, no error in the name, all the same size (2000*7000 px approx))

Sorry for my english x)

@github-actions
Copy link

👋 @Janloui, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.

@tshirtman
Copy link
Member

This looks like a support question, there might be multiple reasons and it’s better to ask about it in support channels, first i’d suggest checking if you just display one of the offending image (if it’s always the same), as your images are big, it could be just that you load enough for the gpu not being able to load them all at the same time. If it’s not that, you might want to check the specific things about the image, as jpeg is a complex format and different editors will use different features of it when saving, so using a common cool to save them as jpeg might fix the issue (in which case it could be a kivy bug, but it would be better to have a specific image to share that show the bug).
Please follow up in support channels though, rather than here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants