четверг, 10 июня 2010 г.

Exif

Binary Exif;

StartMetadataKey APP1_Marker(offset=2, size=2);

If(getValue(APP1_Marker)!=0xFFE1) exit;

MetadataKey Length(APP1_Marker, offset=2, size=2);

MetadataKey APP1(APP1_Marker, offset=10, size=getValue(Length));

MetadataKey IFD_Offset(APP1, offset=4, size=4);

MetadataKey CountOfTag(APP1, offset-getValue(IDF_Offset), size=2);

MetadataKey FirstTagID(CountOfTag, offset=2, size=2);

MetadataKey TagID=FirstTagID;

count=getValue(CountOgTag));

While(coun>0)

{

                MetadataKey Type(TagID, offset=2, size=2);

MetadataKey ValueOffset(TagID, offset=8, size=4);

If(getValue(TagID)==0x0E01)

                {

                               If(getValue(Type)==0x200)  SetTag ImageDescription(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), key=00));

                               If(getValue(Type)==0x500) SetTag ImageDescription(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), size=8));

if(tag.Type==0x0100 || tag.Type==0x0300 || tag.Type==0x0400)SetTag ImageDescription(0x01, getValue(ValueOffset));

                }

If(getValue(TagID)==0x0F01)

                {

                               If(getValue(Type)==0x200)  SetTag Make (0x01, getValueByLink(TagID,offset=getValue(ValueOffset), key=00));

                               If(getValue(Type)==0x500) SetTag Make(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), size=8));

if(tag.Type==0x0100 || tag.Type==0x0300 || tag.Type==0x0400)SetTag Make (0x01, getValue(ValueOffset));

                }

If(getValue(TagID)==0x1001)

                {

                               If(getValue(Type)==0x200)  SetTag Model(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), key=00));

                               If(getValue(Type)==0x500) SetTag Model(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), size=8));

if(tag.Type==0x0100 || tag.Type==0x0300 || tag.Type==0x0400)SetTag Model(0x01, getValue(ValueOffset));

}

If(getValue(TagID)==0x1201)

                {

                               If(getValue(Type)==0x200)  SetTag Orientation(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), key=00));

                               If(getValue(Type)==0x500) SetTag Orientation0x01, getValueByLink(TagID,offset=getValue(ValueOffset), size=8));

if(tag.Type==0x0100 || tag.Type==0x0300 || tag.Type==0x0400)SetTag Orientation(0x01, getValue(ValueOffset));

                }

If(getValue(TagID)==0x1A01)

                {

                               If(getValue(Type)==0x200)  SetTag XResolution(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), key=00));

                               If(getValue(Type)==0x500) SetTag XResolution (0x01, getValueByLink(TagID,offset=getValue(ValueOffset), size=8));

if(tag.Type==0x0100 || tag.Type==0x0300 || tag.Type==0x0400)SetTag XResolution (0x01, getValue(ValueOffset));

                }

If(getValue(TagID)==0x1B01)

                {

                               If(getValue(Type)==0x200)  SetTag YResolution(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), key=00));

                               If(getValue(Type)==0x500) SetTag YResolution (0x01, getValueByLink(TagID,offset=getValue(ValueOffset), size=8));

if(tag.Type==0x0100 || tag.Type==0x0300 || tag.Type==0x0400)SetTag YResolution (0x01, getValue(ValueOffset));

                }

If(getValue(TagID)==0x3201)

                {

                               If(getValue(Type)==0x200)  SetTag DateTime(0x01, getValueByLink(TagID,offset=getValue(ValueOffset), key=00));

                               If(getValue(Type)==0x500) SetTag DateTime (0x01, getValueByLink(TagID,offset=getValue(ValueOffset), size=8));

if(tag.Type==0x0100 || tag.Type==0x0300 || tag.Type==0x0400)SetTag DateTime(0x01, getValue(ValueOffset));

                }

                count-=1;

                Metadatakey newTagID(TagID, offset=12, size=2);

                TagID=newTadIG;

}

Комментариев нет:

Отправить комментарий