Apple says that we must use Xcode 6, iOS 8 SDK, and apps must have 64bit support
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.
Latest posts made by inoddy
-
RE: Error in building Pythonista project in XCode 6
-
Is it possible to tint iconicons using scene.image?
When using scene.image to draw iconicons they appear black. Using scene.tint makes no difference. I would like them to appear blue. Any ideas?
A workaround is to use ui Buttons. But it seems overkill to use buttons just to draw a passive icon.
from scene import * class MyScene (Scene): def draw(self): background(1, 1, 0) tint(0, 0, 1) image('ionicons-checkmark-circled-32', 300, 300) run(MyScene())
-
RE: Is it possible to tint iconicons using scene.image?
This works
from scene import * from PIL import Image class MyScene (Scene): def setup(self): img = Image.open('ionicons-arrow-down-c-256').convert('RGBA') red, green, blue, alpha = img.split() img = Image.merge('RGBA', (red, green, alpha, alpha)) self.img = load_pil_image(img) def draw(self): background(1,1,0) image(self.img, 300, 300) run(MyScene())
It's still a bit inefficient. The ionicon is opened as an LA image. I convert it to RGBA because Image.split() does not work with LA images - it would be good if I could extract the alpha without the RGB conversion.
-
RE: Is it possible to tint iconicons using scene.image?
That works quite well (if a little slow - precaching is a good idea).
I still can't help thinking that there is a better way since ui seems to do it quickly.
Thanks for the help.
-
RE: General bug report thread
This bug has been reported before - Windows style carriage returns can cause Pythonista to crash. The report said that happened when using the delete key. I have found that too. But also I have found the crash simply upon opening a script.
The interesting bit is that it was only a small section of code that caused the crash. Deleting a couple of lines on a PC avoided the crash.
If you want a copy of the file I can supply it as a zip archive.
-
RE: Is it possible to tint iconicons using scene.image?
Did you have something specific in mind? I tried this:
from scene import * from PIL import Image from PIL import ImageOps class MyScene (Scene): def draw(self): background(1, 1, 0) tint(0, 0, 1) img = Image.open('ionicons-arrow-down-c-32').convert('L') img = ImageOps.colorize(img, 'blue', 'white').convert('RGBA') img = load_pil_image(img) image(img, 300, 300) run(MyScene())
but it coloured the whole box blue instead of the part of the icon that I wanted blue. I hope there's something better than grabbing all the pixels and changing them individually.
-
RE: iOS 8, pythonista on ipad?
Apple removed the Camera Roll in iOS 8. So what does photos.get_image do? Does it still work? Similarly for the other functions that access the Camera Roll?
-
RE: Cropping an image in Cards.py
Thanks for the suggestions. In the end I decided to use the first method. A little slow but it worked.
-
Cropping an image in Cards.py
I want to crop the images used in the Cards.py example. But I can't figure out how.
Do I do it in the line
card.card_image = images[i]
or the line
card.image = card.card_image
and if so then how?
I've tried everything I can think of: Image.crop, ImageOps.crop, card.crop, card.card_image.crop, card.image.crop, images[i].crop but I appear to be missing something