Thanks for answering
problem solved by seeking
here is how i didi it in case of any one needed it:
img = Image.open('test.png') #first we open an image with PIL or maybe you have it from uploaded file already(you should import PIL and Image)
img_io = io.BytesIO() #creat in memory object by io (you should import io)
img.save(img_io,format='png') #save your PIL image object to memory object you created by io
#you should import InMemoryUploadedFile
thumb = InMemoryUploadedFile(img2_io, None, 'foo2.jpeg', 'image/jpeg',thumb_io.seek(0,os.SEEK_END), None) #give your file to InMemoryUploadedFile to create django imagefield object
#take look at this link to find out to import what things:
https://groups.google.com/d/msgid/django-users/a4685c6c-f136-4d5f-8230-edb08fb30c36%40googlegroups.com