Re: Converting hex data to image

2021-01-31 Thread Ali Sajadian
dimplem...@gmail.com در تاریخ سه‌شنبه ۱۲ مارس ۲۰۱۹ ساعت ۱۳:۰۱:۴۵ (UTC+3:30) نوشت: > On Tuesday, March 12, 2019 at 2:53:49 PM UTC+5:30, Peter Otten wrote: > > dimplem...@gmail.com wrote: > > > > >> Save the image to a file (in binary mode!) and then try to open it with > > >> an image viewer. T

Re: Converting hex data to image

2019-03-12 Thread dimplemathew . 17
On Tuesday, March 12, 2019 at 2:53:49 PM UTC+5:30, Peter Otten wrote: > dimplemathew...@gmail.com wrote: > > >> Save the image to a file (in binary mode!) and then try to open it with > >> an image viewer. The data may be corrupted. > > > > When i tried doing that it says Invalid Image... > > So

Re: Converting hex data to image

2019-03-12 Thread Peter Otten
dimplemathew...@gmail.com wrote: >> Save the image to a file (in binary mode!) and then try to open it with >> an image viewer. The data may be corrupted. > > When i tried doing that it says Invalid Image... So it looks like the problem occurs somewhere before you are decoding the image with th

Re: Converting hex data to image

2019-03-12 Thread dimplemathew . 17
On Tuesday, March 12, 2019 at 2:09:06 PM UTC+5:30, Peter Otten wrote: > dimplemathew...@gmail.com wrote: > > > On Monday, March 11, 2019 at 4:32:48 PM UTC+5:30, Peter Otten wrote: > >> dimplemathew...@gmail.com wrote: > >> > >> > Hi i have a similar challenge where i need to store the thumbnailPh

Re: Converting hex data to image

2019-03-12 Thread Peter Otten
dimplemathew...@gmail.com wrote: > On Monday, March 11, 2019 at 4:32:48 PM UTC+5:30, Peter Otten wrote: >> dimplemathew...@gmail.com wrote: >> >> > Hi i have a similar challenge where i need to store the thumbnailPhoto >> > attribute to my local db and display the image every-time user logs in. >

Re: Converting hex data to image

2019-03-11 Thread dimplemathew . 17
On Monday, March 11, 2019 at 4:32:48 PM UTC+5:30, Peter Otten wrote: > dimplemathew...@gmail.com wrote: > > > Hi i have a similar challenge where i need to store the thumbnailPhoto > > attribute to my local db and display the image every-time user logs in. > > But this solution does work . data lo

Re: Converting hex data to image

2019-03-11 Thread dimplemathew . 17
On Thursday, November 14, 2013 at 9:02:52 PM UTC+5:30, Shyam Parimal Katti wrote: > I am implementing an authentication system(in Django) using LDAP as the > backend(django-auth-ldap). When we fetch the data from the LDAP server for a > particular valid user, the data associated with the user co

Re: Converting hex data to image

2019-03-11 Thread Peter Otten
dimplemathew...@gmail.com wrote: > Hi i have a similar challenge where i need to store the thumbnailPhoto > attribute to my local db and display the image every-time user logs in. > But this solution does work . data looks like this: > \xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00`\x00`\x00\x0

Re: Converting hex data to image

2019-03-11 Thread dimplemathew . 17
On Friday, November 15, 2013 at 3:52:58 AM UTC+5:30, Shyam Parimal Katti wrote: > Perfect. Thank you @Ben and @Tim > > > > > On Thu, Nov 14, 2013 at 4:29 PM, Ben Finney wrote: > > > Ben Finney writes: > > > > > > To turn a byte string into a file-like object for use with PIL, extract >

Re: Converting hex data to image

2013-11-14 Thread Shyam Parimal Katti
Perfect. Thank you @Ben and @Tim On Thu, Nov 14, 2013 at 4:29 PM, Ben Finney wrote: > Ben Finney writes: > > > To turn a byte string into a file-like object for use with PIL, extract > > the byte string as ‘image_data’, use the standard library ‘io.StringIO’ > > class http://docs.python.org/3/l

Re: Converting hex data to image

2013-11-14 Thread Ben Finney
Ben Finney writes: > To turn a byte string into a file-like object for use with PIL, extract > the byte string as ‘image_data’, use the standard library ‘io.StringIO’ > class http://docs.python.org/3/library/io.html#io.StringIO>, then > create a new ‘PIL.Image’ object by reading from that pseudo-

Re: Converting hex data to image

2013-11-14 Thread Ben Finney
Shyam Parimal Katti writes: > When we fetch the data from the LDAP server for a particular valid > user, the data associated with the user contains the thumbnail photo > in hex representation. E.x.: > > [('CN=XX,OU=Users,OU=Accounts,DC=test,DC=com', {'msExchBlockedSendersHash': > ['\xce'], 'mailN

Re: Converting hex data to image

2013-11-14 Thread Tim Golden
On 14/11/2013 15:32, Shyam Parimal Katti wrote: > I am implementing an authentication system(in Django) using LDAP as the > backend(django-auth-ldap). When we fetch the data from the LDAP server > for a particular valid user, the data associated with the user contains > the thumbnail photo in hex r

Converting hex data to image

2013-11-14 Thread Shyam Parimal Katti
I am implementing an authentication system(in Django) using LDAP as the backend(django-auth-ldap). When we fetch the data from the LDAP server for a particular valid user, the data associated with the user contains the thumbnail photo in hex representation. E.x.: [('CN=XX,OU=Users,OU=Accounts,DC=t