• cvp

    @Trüff said

    but I used the class Image from the PIL module instead of the one from Pythonista‘s ui module and that worked

    👍

    posted in Pythonista read more
  • cvp

    @Trüff saiD

    This also doesn‘t work with transparent pictures for me

    Weird, for me it works, the image of my example has a transparent background, here in red

    posted in Pythonista read more
  • cvp

    @buzzdenver It is not a bug but a limitation of Pythonista and or iOS. It does not run in background.
    If you search in this forum, you'll find a lot of occurrences about this subject.
    But Pyto app supports it, by simulating a music app.

    posted in Pythonista read more
  • cvp

    @Trüff I don't know if you really need a canvas, else, please try this

    import ui
    v = ui.View()
    v.background_color = 'yellow'
    iv = ui.ImageView()
    iv.background_color = 'red'
    iv.image = ui.Image.named('image.png')
    wi,hi = iv.image.size
    iv.frame = (10,10,150,150*hi/wi)
    v.add_subview(iv)
    v.present('fullscreen')
    

    posted in Pythonista read more
  • cvp

    @ccc said

    Keep the alpha low on the background color

    If the image he wants to draw is transparent, its background color has already a low alpha.

    posted in Pythonista read more
  • cvp

    @Trüff could you tell me if this solves your problem, thanks

    img = ui.Image.named('image.png')
    clipboard.set_image(img)
    cv.draw_clipboard(0, 0, img_w, img_h)
    

    posted in Pythonista read more
  • cvp

    @ccc that does not work, draw_image wants a string as first argument

    cv.draw_image(ui.Image.named("kitty.JPG"), 0, 0, img_w, img_h)
    TypeError: argument 1 must be str, not _ui.Image
    

    posted in Pythonista read more
  • cvp

    @Trüff perhaps a canvas bug, try this (with, of course, your own file name)

    img = ui.Image.named('kitty.JPG')
    clipboard.set_image(img)
    #cv.draw_image("kitty.JPG", 0, 0, img_w, img_h)
    cv.draw_clipboard(0, 0, img_w, img_h)
    

    posted in Pythonista read more
  • cvp

    @ccc said

    You need a "named image"

    What is that? For me, in Ui.Image.named(name), name is a file name

    And the crash does not have any explanation in faultlog, only "abort"????

    posted in Pythonista read more
  • cvp

    @Phlurim I don't know anything about tabulate thus I can't help but anyway, I don't know why an external keyboard would be necessary. And you can always connect via Bluetooth your Mac keyboard to try if it helps. Good luck

    Édit: you can use pip to install tabulate. And you can use pip via stash which can be installed via only one line, see the linked page

    import requests as r; exec(r.get('https://bit.ly/get-stash').content)
    

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!