Python and images

233 views
Skip to first unread message

Jody Crothers

unread,
Dec 22, 2023, 10:06:56 PM12/22/23
to TI-Innovator
Hi all,
Can TI python display images such as jpg or png

Cheers
Jody

Sent from my Galaxy

Ryan Tebble

unread,
Dec 23, 2023, 12:56:44 AM12/23/23
to ti-inn...@googlegroups.com
Yes, using ti image import, then load image, show image. All built in. 

--
You received this message because you are subscribed to the Google Groups "TI-Innovator for Education" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ti-innovator...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ti-innovator/SL2P216MB1048EEAD0B0A4CC33444291AB89BA%40SL2P216MB1048.KORP216.PROD.OUTLOOK.COM.

Jody Crothers

unread,
Dec 23, 2023, 1:23:59 AM12/23/23
to ti-inn...@googlegroups.com
Thanks
 anybody got a few lines of code that shows this, tried it with the software with the tns file in the same folder as the image file but it isn't working
Regards
Jody



Sent from my Galaxy



Ryan Tebble

unread,
Dec 23, 2023, 1:30:49 AM12/23/23
to ti-inn...@googlegroups.com
Maybe this, I think was was adapted from Sanjeev. Try subbing to mestoneducationalservices on YT. Lots there. 

CoinToss Python.tns

Jody Crothers

unread,
Dec 23, 2023, 2:55:28 AM12/23/23
to ti-inn...@googlegroups.com
thanks 
I got it working

Jody Crothers


Head of Learning Area (Mathematics)

Ridge View Secondary College

Western Australia

www.jodstar.com


From: ti-inn...@googlegroups.com <ti-inn...@googlegroups.com> on behalf of Jody Crothers <jodst...@hotmail.com>
Sent: Saturday, 23 December 2023 2:23 PM
To: ti-inn...@googlegroups.com <ti-inn...@googlegroups.com>
Subject: RE: Python and images
 

Chhaya, Harshal S.

unread,
Dec 23, 2023, 7:52:35 AM12/23/23
to ti-inn...@googlegroups.com

 

Jody,

 

Glad to know you got it working but for others who might have a similar question: The image has to be in the same TNS document.

 

You can paste the jpg/png into the TNS file (in a “Notes” page, for example) and then refer to it from a Python program.

 

I demo’ed a “meme generator” to a Girl Scouts troop using this – where they could add their own text to an image and they were excited to create their own memes 😊

 

Here’s an example where the TNS file has an image that has been named “yoda” – you can name images by right-clicking on them

 

 

from ti_image import *

from ti_draw import *

 

img1=load_image("yoda")

img1.show_image(0,0)

draw_text(20,20,"May the 4th be with you!")

 

 

 

 

Regards,

- Harshal

John Hanna

unread,
Dec 24, 2023, 6:41:31 AM12/24/23
to ti-inn...@googlegroups.com

Here’s a demo. See attached.

 

 

Regards,

     John

--

You received this message because you are subscribed to the Google Groups "TI-Innovator for Education" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ti-innovator...@googlegroups.com.

image001.jpg
First Movie w speed control.tns
Reply all
Reply to author
Forward
0 new messages