thanks for answering
with your help solved the problem
if any one get to this problem, here is how i solved it:
filelist = request.FILES.getlist('uploadimage') #first get
list of your uploaded file object as list
for imgfile in filelist:
# iterate over your list and give each uploaded photo object to your PIL
img = Image.open(imgfile) # you can
open your uploaded photo object as normal picture like this
#your manipulation and changes on picture comes here
img.save('MypicName.jpeg') #finaly save your picture
like this
On Friday, August 26, 2016 at 8:35:21 PM UTC+4:30, Asad Jibran Ahmed wrote:
>
> Hi,
> Every object in `request.FILES` is actually a file *liike* object that
> you can use for processing. I guess you can use something like
> `PIL.Image.frombytes` with the `request.FILES[filename].read()` data.
>
> Django Doc for the `request.FILES`:
> https://docs.djangoproject.com/en/1.10/ref/files/uploads/#django.core.files.uploadedfile.UploadedFile
> Pillow (PIL Fork) documentation for the `frombytes` method:
> https://pillow.readthedocs.io/en/3.3.x/reference/Image.html#PIL.Image.frombytes
>
> Hope that helps.
> Regards,
>
> Asad Jibran Ahmed <[email protected] <javascript:>>
> http://blog.asadjb.com
>
> On Fri, Aug 26, 2016 at 7:46 PM, ali Eblice <[email protected]
> <javascript:>> wrote:
>
>> Hello Friends
>> is it possible to manipulate image in PIL after uploading directly by its
>> "*request.FILES.GETLIST(FORMFIELD)*" address not the saved picture on
>> hard disk?
>>
>> I wrote a function for manipulating but its only working with "
>> *Image.open('a.jpg')* " but i don't want to save image after uploading
>> and then opening it for manipulating , is it possible to manipulate image
>> with its "request.FILES" object address?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/9b6734c8-4530-42b3-b791-99bbce020b32%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/django-users/9b6734c8-4530-42b3-b791-99bbce020b32%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/0323b1af-6ada-4daa-9d47-f9eba95a8b43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.