Thank you for your reply, the reading part is working perfectly.
This is the code that i am using:
LDAPATTRIB.CLEAR;
LDAP.SEARCHCOOKIE:='';
LDAP.SEARCH(USERDN, FALSE, '(OBJECTCLASS=*)', LDAPATTRIB);
IF LDAP.SEARCHRESULT.COUNT = 1 THEN
BEGIN
FOR I := 0 TO LDAP.SEARCHRESULT[0].ATTRIBUTES.COUNT-1 DO
BEGIN
CASE LDAP.SEARCHRESULT[0].ATTRIBUTES[I].ATTRIBUTENAME OF
'SAMACCOUNTNAME' :
'JPEGPHOTO' :
BEGIN
MS:=TMEMORYSTREAM.CREATE;
LDAP.SEARCHRESULT[0].ATTRIBUTES.ITEMS[I].SAVETOSTREAM(MS);
MS.SEEK(0,0);
IMAGE1.PICTURE.LOADFROMSTREAM(MS);
MS.FREE;
END
END;
So, i think that the jpegPhoto attribute is not encoded, it is the raw
jpeg (unless the decoding is done transparently by ldapsend).
What else can i do, how to investigate? Why is the difference in size
when i load from file and save to file from attr recodrd?
Thank you very much.
On 2014-03-11 9:44, Lukas Gebauer wrote:
>> Hi, i have successfully used ldapsend to browse my AD and to add small
>> attributes. Now i want to add the jpegPhoto attribute to some users but i am
>> facing a lot of problems.
>
> Please, try to reas some existing Jpeg from the LDAP and see, how it
> is encoded. Maybe it is encoded as Base64.
>
> --
> Lukas Gebauer.
>
> http://synapse.ararat.cz/ [1] - Ararat Synapse - TCP/IP Lib.
> http://geoget.ararat.cz/ [2] - Geocaching solution
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech [3]
> _______________________________________________
> synalist-public mailing list
> synalist-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synalist-public [4]
Links:
------
[1] http://synapse.ararat.cz/
[2] http://geoget.ararat.cz/
[3] http://p.sf.net/sfu/13534_NeoTech
[4] https://lists.sourceforge.net/lists/listinfo/synalist-public
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public