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.
image FFT project
-
@omz adding
remove_pil_image
before updating it works. Thanks!
@RonJ thanks to your tip, i made this gist of new version: https://gist.github.com/acb082834f37c67fa910
Now i can proceed in my project. -
@omz
Question: instead ofunload_image
could i usedel self.sceneImg1
? Would it makes the same?
This is just to know. Thanks. -
Try
print(type(self.sceneImg1))
which will show you thatself.sceneImg1
is a str, not the image itself. Deleting the string from memory will NOT unload the image itself from memory. -
@ccc thanks a lot!
-
@ccc another noob question (i hope you dont mind me taging you? If you do mind, just let me know):
I am trying to build a ui interface with buttons and my 2 images. But i dont see clearly how i can update a ui.image? Specially when the image is defined via the interactive interface builder, it is not clear how to access it. Probably obvious, but i am still learning... Thanks! -
Maybe you like to check the class MyImageView in the FileManager. It auto rotate the image when you rotate the device.
-
@brumm thanks for this link. Now i see how to get the touch when the image is touched to interact with the image. Not sure if the draw() will be called automatically, or i if should call it myself from the touch function? Thanks.
[edit] i've just loaded FileManager repo (with gitRepo.py) but when i run it, there is an error (line 115, some attribute missing to something). Is it expected? -
def draw(self): # This will be called whenever the view's content needs to be drawn. # You can use any of the ui module's drawing functions here to render # content into the view's visible rectangle. # Do not call this method directly, instead, if you need your view # to redraw its content, call set_needs_display(). # Example: path = ui.Path.oval(0, 0, self.width, self.height) ui.set_color('red') path.fill() img = ui.Image.named('ionicons-beaker-256') img.draw(0, 0, self.width, self.height)
-
Also check out @brumm' UI tutorial... https://github.com/humberry/ui-tutorial
-
@ccc an @brumm i think the script SpecialButton2.py in ui-tutorial is exactly the script example i needed to start.
Thanks a lot!