omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    images2gif crashes...

    Pythonista
    2
    11
    4443
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Webmaster4o
      Webmaster4o last edited by Webmaster4o

      My version of images2gif crashes whenever I use writeGif in the latest beta. Anyone else have problems? readGif works fine. Problem with the new app sandbox?

      EDIT: the two other versions I can find online (this one and this one) also crash when using writeGif.

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by omz

        I've noticed that as well. Not sure yet why this happens, but I'll look into it.

        1 Reply Last reply Reply Quote 2
        • Webmaster4o
          Webmaster4o last edited by

          I've just been doing testing. The crash occurs in the line images2.append( im.convert('P', palette=AD, dither=dither) ). Further testing reveals this is because of the pallet argument. Any time I run im.convert('P', pallet=Image.ADAPTIVE) I get a crash. Running without the pallet argument works.

          1 Reply Last reply Reply Quote 0
          • Webmaster4o
            Webmaster4o last edited by Webmaster4o

            You also get a crash with, say,

            from PIL import Image
            
            i = Image.new('RGB', (100,100), (255,0,0))
            p = i.convert('P',palette=Image.ADAPTIVE) #crashes
            

            Image.ADAPTIVE appears to be equal to one, which is strange to me. If I put in one for palette, it crashes. If I put in zero or two, it's fine.

            i.convert('P', palette=0)#works
            i.convert('P', palette=1)#crashes
            i.convert('P', palette=2)#works
            I.convert('P', palette=525632)#works fine
            
            1 Reply Last reply Reply Quote 0
            • Webmaster4o
              Webmaster4o last edited by

              Is this fixable?

              1 Reply Last reply Reply Quote 0
              • omz
                omz last edited by omz

                I sure hope so. :) Thanks for the additional details!

                I haven't had time to look into this yet, but as this is a regression (worked in previous builds), I'm optimistic that it's fixable, and it's on my list of "critical bugs that need to be fixed before release".

                I'm thinking about replacing PIL with Pillow while I'm at it, not sure yet if that's going to work out.

                1 Reply Last reply Reply Quote 3
                • Webmaster4o
                  Webmaster4o last edited by

                  Oh wow. From what I'd heard, PIL is a mess and pillow is considered the stable release. Surprised we weren't on pillow. I don't think it'd be hard to make the change.

                  1 Reply Last reply Reply Quote 0
                  • Webmaster4o
                    Webmaster4o last edited by Webmaster4o

                    I see in the latest build you have not only replaced PIL with Pillow, but also made images2gif a core module! :)

                    1 Reply Last reply Reply Quote 0
                    • omz
                      omz last edited by

                      Alright, I've replaced PIL with Pillow in build 160033, seems to be working well, crashes are gone for me.

                      For some reason, I couldn't get the images2gif version you were using to work – it doesn't crash, but there's an exception I don't understand completely. However, I've bundled a working version with the new build (writing animated GIFs seems like a thing that Pythonista should support out of the box), so you could just remove yours.

                      1 Reply Last reply Reply Quote 0
                      • omz
                        omz last edited by

                        Oh, you're faster than me. :)

                        1 Reply Last reply Reply Quote 0
                        • Webmaster4o
                          Webmaster4o last edited by

                          :) yeah.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB Forums | Contributors