+ 2
Can anybody help me.I doing a code using PIL package in python,but I don't know to to insert image in that,I use only android.
Help me in adding images in PIL package but with the help of Android mobile not pc
13 Respuestas
+ 4
If you are using sololearn playground you will not be able to use those libs, use a pc, install the modules, read their documentation and enjoy! 💐
+ 4
Thnks Abhay
+ 3
I think you have to use DCoder or spck editor
+ 3
Yes bro I tried but it shows me error
+ 3
Put you image in same folder where u have created your project then try
+ 2
Give a proper path of your image click on image go on properties and copy path
+ 2
Wait bro I show my code
+ 2
Check the following code for displaying images in pydroiid app , here i am using matplotlib library to show the image , pil for manipulating it.
import matplotlib.pyplot as plt
from PIL import Image
#/storage/emulated/0/ is path to internal storage
img=Image.open('/storage/emulated/0/Download/image_name.jpg')
fig=plt.figure()
fig.add_subplot(4,1,1)
plt.imshow(img)
img=img.rotate(180)
fig.add_subplot(4,1,2)
plt.imshow(img)
mg=img.rotate(90)
fig.add_subplot(4,1,3)
plt.imshow(img)
plt.show()
+ 2
༺ŦAⲘIL CO𝓓ER༻ because i couldn't find another way to display it in pydroiid ,though there are other ways to display it using different libraries that you can google about .
+ 1
Bro may I know why ur using matplotlib package bro
+ 1
༺ŦAⲘIL CO𝓓ER༻ u need to change in path replace / with \\ may be it will work
+ 1
Thnks for ur information A.S
- 1
What is php file handling?