diff options
Diffstat (limited to 'ext/exif/exif.c')
-rw-r--r-- | ext/exif/exif.c | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c index e3e8e7cedf..927eaf9293 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -228,7 +228,7 @@ static void process_COM (ImageInfoType *ImageInfo, uchar *Data, int length) a = ImageInfo->numComments; (ImageInfo->Comments)[a] = emalloc(nch+1); - strcpy(ImageInfo->Comments[a],Comment); + strcpy(ImageInfo->Comments[a], Comment); (ImageInfo->numComments)++; } /* }}} */ @@ -273,7 +273,7 @@ static void process_SOFn (ImageInfoType *ImageInfo, uchar *Data, int marker) /* {{{ format description defines Describes format descriptor */ -static int ExifBytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8}; +static int ExifBytesPerFormat[] = {0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8}; #define NUM_FORMATS 12 #define FMT_BYTE 1 @@ -478,15 +478,15 @@ static double ConvertAnyFormat(void *ValuePtr, int Format, int MotorolaOrder) case FMT_SBYTE: Value = *(signed char *)ValuePtr; break; case FMT_BYTE: Value = *(uchar *)ValuePtr; break; - case FMT_USHORT: Value = Get16u(ValuePtr,MotorolaOrder); break; - case FMT_ULONG: Value = Get32u(ValuePtr,MotorolaOrder); break; + case FMT_USHORT: Value = Get16u(ValuePtr, MotorolaOrder); break; + case FMT_ULONG: Value = Get32u(ValuePtr, MotorolaOrder); break; case FMT_URATIONAL: case FMT_SRATIONAL: { - int Num,Den; - Num = Get32s(ValuePtr,MotorolaOrder); - Den = Get32s(4+(char *)ValuePtr,MotorolaOrder); + int Num, Den; + Num = Get32s(ValuePtr, MotorolaOrder); + Den = Get32s(4+(char *)ValuePtr, MotorolaOrder); if (Den == 0) { Value = 0; } else { @@ -495,8 +495,8 @@ static double ConvertAnyFormat(void *ValuePtr, int Format, int MotorolaOrder) break; } - case FMT_SSHORT: Value = (signed short)Get16u(ValuePtr,MotorolaOrder); break; - case FMT_SLONG: Value = Get32s(ValuePtr,MotorolaOrder); break; + case FMT_SSHORT: Value = (signed short)Get16u(ValuePtr, MotorolaOrder); break; + case FMT_SLONG: Value = Get32s(ValuePtr, MotorolaOrder); break; /* Not sure if this is correct (never seen float used in Exif format) */ case FMT_SINGLE: Value = (double)*(float *)ValuePtr; break; @@ -511,18 +511,18 @@ static double ConvertAnyFormat(void *ValuePtr, int Format, int MotorolaOrder) static void ExtractThumbnail(ImageInfoType *ImageInfo, char *OffsetBase, unsigned ExifLength) { /* according to exif2.1, the thumbnail is not supposed to be greater than 64K */ if (ImageInfo->ThumbnailSize > 65536) { - php_error(E_WARNING,"Illegal thumbnail size"); + php_error(E_WARNING, "Illegal thumbnail size"); return; } ImageInfo->Thumbnail = emalloc(ImageInfo->ThumbnailSize); if (!ImageInfo->Thumbnail) { - php_error(E_WARNING,"Could not allocate memory for thumbnail"); + php_error(E_WARNING, "Could not allocate memory for thumbnail"); return; } else { /* Check to make sure we are not going to go past the ExifLength */ if ((unsigned)(ImageInfo->ThumbnailOffset + ImageInfo->ThumbnailSize) > ExifLength) { - php_error(E_WARNING,"Thumbnail goes beyond exif header boundary"); + php_error(E_WARNING, "Thumbnail goes beyond exif header boundary"); return; } else { memcpy(ImageInfo->Thumbnail, OffsetBase + ImageInfo->ThumbnailOffset, ImageInfo->ThumbnailSize); @@ -544,14 +544,14 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse NumDirEntries = Get16u(DirStart, ImageInfo->MotorolaOrder); if ((DirStart+2+NumDirEntries*12) > (OffsetBase+ExifLength)) { - php_error(E_WARNING,"Illegally sized directory"); + php_error(E_WARNING, "Illegally sized directory"); return; } /* if (ShowTags) { - printf("Directory with %d entries\n",NumDirEntries); + printf("Directory with %d entries\n", NumDirEntries); } */ @@ -568,7 +568,7 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse if ((Format-1) >= NUM_FORMATS) { /* (-1) catches illegal zero case as unsigned underflows to positive large. */ - php_error(E_WARNING,"Illegal format code in EXIF dir"); + php_error(E_WARNING, "Illegal format code in EXIF dir"); return; } @@ -580,9 +580,9 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse /* If its bigger than 4 bytes, the dir entry contains an offset. */ if (OffsetVal+ByteCount > ExifLength) { /* Bogus pointer offset and / or bytecount value */ -/* printf("Offset %d bytes %d ExifLen %d\n",OffsetVal, ByteCount, ExifLength); */ +/* printf("Offset %d bytes %d ExifLen %d\n", OffsetVal, ByteCount, ExifLength); */ - php_error(E_WARNING,"Illegal pointer offset value in EXIF"); + php_error(E_WARNING, "Illegal pointer offset value in EXIF"); return; } ValuePtr = OffsetBase+OffsetVal; @@ -627,11 +627,11 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse break; case TAG_ORIENTATION: - ImageInfo->Orientation = (int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->Orientation = (int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_ISOSPEED: - ImageInfo->ISOspeed = (int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->ISOspeed = (int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_DATETIME_ORIGINAL: @@ -651,7 +651,7 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse } /* Copy the comment */ - if (memcmp(ValuePtr, "ASCII",5) == 0) { + if (memcmp(ValuePtr, "ASCII", 5) == 0) { for (a=5;a<10;a++) { int c; int l; c = (ValuePtr)[a]; @@ -678,7 +678,7 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse case TAG_FNUMBER: /* Simplest way of expressing aperture, so I trust it the most. (overwrite previously computd value if there is one) */ - ImageInfo->ApertureFNumber = (float)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->ApertureFNumber = (float)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_APERTURE: @@ -694,19 +694,19 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse case TAG_FOCALLENGTH: /* Nice digital cameras actually save the focal length as a function of how farthey are zoomed in. */ - ImageInfo->FocalLength = (float)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->FocalLength = (float)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_SUBJECT_DISTANCE: /* Inidcates the distacne the autofocus camera is focused to. Tends to be less accurate as distance increases. */ - ImageInfo->Distance = (float)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->Distance = (float)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_EXPOSURETIME: /* Simplest way of expressing exposure time, so I trust it most. (overwrite previously computd value if there is one) */ - ImageInfo->ExposureTime = (float)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->ExposureTime = (float)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_SHUTTERSPEED: @@ -725,15 +725,15 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse break; case TAG_IMAGEWIDTH: - ImageInfo->ExifImageWidth = (int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->ExifImageWidth = (int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_FOCALPLANEXRES: - ImageInfo->FocalplaneXRes = ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder); + ImageInfo->FocalplaneXRes = ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder); break; case TAG_FOCALPLANEUNITS: - switch((int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->MotorolaOrder)) { + switch((int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->MotorolaOrder)) { case 1: ImageInfo->FocalplaneUnits = 25.4; break; /* inch */ case 2: /* According to the information I was using, 2 measn meters. @@ -753,7 +753,7 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse break; case TAG_SPECIALMODE: - ImageInfo->SpecialMode = (int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->SpecialMode); + ImageInfo->SpecialMode = (int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->SpecialMode); break; case TAG_JPEGQUAL: /* I think that this is a pointer to the thumbnail - let's see */ @@ -763,7 +763,7 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse if (ImageInfo->ThumbnailSize) { ExtractThumbnail(ImageInfo, OffsetBase, ExifLength); } - /*ImageInfo->JpegQual = (int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->JpegQual);*/ + /*ImageInfo->JpegQual = (int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->JpegQual);*/ break; case TAG_MACRO: /* I think this is the size of the Thumbnail */ @@ -773,11 +773,11 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse if (ImageInfo->ThumbnailOffset) { ExtractThumbnail(ImageInfo, OffsetBase, ExifLength); } - /*ImageInfo->Macro = (int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->Macro);*/ + /*ImageInfo->Macro = (int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->Macro);*/ break; case TAG_DIGIZOOM: - ImageInfo->DigiZoom = (int)ConvertAnyFormat(ValuePtr, Format,ImageInfo->DigiZoom); + ImageInfo->DigiZoom = (int)ConvertAnyFormat(ValuePtr, Format, ImageInfo->DigiZoom); break; case TAG_SOFTWARERELEASE: @@ -797,7 +797,7 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse char *SubdirStart; SubdirStart = OffsetBase + Get32u(ValuePtr, ImageInfo->MotorolaOrder); if (SubdirStart < OffsetBase || SubdirStart > OffsetBase+ExifLength) { - php_error(E_WARNING,"Illegal subdirectory link"); + php_error(E_WARNING, "Illegal subdirectory link"); return; } ProcessExifDir(ImageInfo, SubdirStart, OffsetBase, ExifLength, LastExifRefd); @@ -811,7 +811,7 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse NextDirOffset = Get32u(DirStart+2+12*de, ImageInfo->MotorolaOrder); if (NextDirOffset) { if (OffsetBase + NextDirOffset < OffsetBase || OffsetBase + NextDirOffset > OffsetBase+ExifLength) { - php_error(E_WARNING,"Illegal directory offset"); + php_error(E_WARNING, "Illegal directory offset"); return; } ProcessExifDir(ImageInfo, OffsetBase + NextDirOffset, OffsetBase, ExifLength, LastExifRefd); @@ -838,29 +838,29 @@ static void process_EXIF (ImageInfoType *ImageInfo, char *CharBuf, unsigned int { /* Check the EXIF header component */ static const uchar ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; - if (memcmp(CharBuf+2, ExifHeader,6)) { - php_error(E_WARNING,"Incorrect Exif header"); + if (memcmp(CharBuf+2, ExifHeader, 6)) { + php_error(E_WARNING, "Incorrect Exif header"); return; } } - if (memcmp(CharBuf+8,"II",2) == 0) { + if (memcmp(CharBuf+8, "II", 2) == 0) { /* if (ShowTags) printf("Exif section in Intel order\n"); */ ImageInfo->MotorolaOrder = 0; } else { - if (memcmp(CharBuf+8,"MM",2) == 0) { + if (memcmp(CharBuf+8, "MM", 2) == 0) { /* if (ShowTags) printf("Exif section in Motorola order\n"); */ ImageInfo->MotorolaOrder = 1; } else { - php_error(E_WARNING,"Invalid Exif alignment marker."); + php_error(E_WARNING, "Invalid Exif alignment marker."); return; } } /* Check the next two values for correctness. */ - if (Get16u(CharBuf+10,ImageInfo->MotorolaOrder) != 0x2a - || Get32u(CharBuf+12,ImageInfo->MotorolaOrder) != 0x08) { - php_error(E_WARNING,"Invalid Exif start (1)"); + if (Get16u(CharBuf+10, ImageInfo->MotorolaOrder) != 0x2a + || Get32u(CharBuf+12, ImageInfo->MotorolaOrder) != 0x08) { + php_error(E_WARNING, "Invalid Exif start (1)"); return; } @@ -892,7 +892,7 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * for(*SectionsRead=0;*SectionsRead < 19;) { int itemlen; int marker = 0; - int ll,lh, got; + int ll, lh, got; uchar *Data; for (a=0;a<7;a++) { @@ -901,7 +901,7 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * } if (marker == 0xff) { /* 0xff is legal padding, but if we get that many, something's wrong. */ - php_error(E_WARNING,"too many padding bytes!"); + php_error(E_WARNING, "too many padding bytes!"); return FALSE; } @@ -914,7 +914,7 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * itemlen = (lh << 8) | ll; if (itemlen < 2) { - php_error(E_WARNING,"invalid marker"); + php_error(E_WARNING, "invalid marker"); return FALSE; } @@ -929,12 +929,12 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * got = fread(Data+2, 1, itemlen-2, infile); /* Read the whole section. */ if (got != itemlen-2) { - php_error(E_WARNING,"reading from file"); + php_error(E_WARNING, "reading from file"); return FALSE; } *SectionsRead += 1; - /*printf("Marker '%x' size %d\n",marker, itemlen);*/ + /*printf("Marker '%x' size %d\n", marker, itemlen);*/ switch(marker) { case M_SOS: /* stop before hitting compressed data */ /* If reading entire image is requested, read the rest of the data. */ @@ -949,13 +949,13 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * size = ep-cp; Data = (uchar *)emalloc(size); if (Data == NULL) { - php_error(E_WARNING,"could not allocate data for entire image"); + php_error(E_WARNING, "could not allocate data for entire image"); return FALSE; } got = fread(Data, 1, size, infile); if (got != size) { - php_error(E_WARNING,"could not read the rest of the image"); + php_error(E_WARNING, "could not read the rest of the image"); return FALSE; } @@ -971,7 +971,7 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t * return TRUE; case M_EOI: /* in case it's a tables-only JPEG stream */ - php_error(E_WARNING,"No image in jpeg!"); + php_error(E_WARNING, "No image in jpeg!"); return FALSE; case M_COM: /* Comment section */ @@ -1056,7 +1056,7 @@ int ReadJpegFile(ImageInfoType *ImageInfo, Section_t *Sections, memset(ImageInfo, 0, sizeof(*ImageInfo)); memset(Sections, 0, sizeof(*Sections)); - tmp = php_basename(FileName,strlen(FileName),NULL,0); + tmp = php_basename(FileName, strlen(FileName), NULL, 0); strlcpy(ImageInfo->FileName, tmp, sizeof(ImageInfo->FileName)); efree(tmp); ImageInfo->FocalLength = 0; @@ -1077,7 +1077,7 @@ int ReadJpegFile(ImageInfoType *ImageInfo, Section_t *Sections, ImageInfo->FileDateTime = st.st_mtime; ImageInfo->FileSize = st.st_size; } else { - php_error(E_WARNING,"Can't get file statitics"); + php_error(E_WARNING, "Can't get file statitics"); return FALSE; } } @@ -1085,7 +1085,7 @@ int ReadJpegFile(ImageInfoType *ImageInfo, Section_t *Sections, /* Scan the JPEG headers. */ ret = scan_JPEG_header(ImageInfo, infile, Sections, SectionsRead, ReadAll, LastExifRefd); if (!ret) { - php_error(E_WARNING,"Invalid Jpeg file: '%s'\n",FileName); + php_error(E_WARNING, "Invalid Jpeg file: '%s'\n", FileName); return FALSE; } @@ -1156,80 +1156,80 @@ PHP_FUNCTION(read_exif_data) if (ret==FALSE || array_init(return_value) == FAILURE) { RETURN_FALSE; } - add_assoc_string(return_value,"FileName",ImageInfo.FileName,1); - add_assoc_long(return_value,"FileDateTime",ImageInfo.FileDateTime); - add_assoc_long(return_value,"FileSize",ImageInfo.FileSize); + add_assoc_string(return_value, "FileName", ImageInfo.FileName, 1); + add_assoc_long(return_value, "FileDateTime", ImageInfo.FileDateTime); + add_assoc_long(return_value, "FileSize", ImageInfo.FileSize); if (ImageInfo.CameraMake[0]) { - add_assoc_string(return_value,"CameraMake",ImageInfo.CameraMake,1); + add_assoc_string(return_value, "CameraMake", ImageInfo.CameraMake, 1); } if (ImageInfo.CameraModel[0]) { - add_assoc_string(return_value,"CameraModel",ImageInfo.CameraModel,1); + add_assoc_string(return_value, "CameraModel", ImageInfo.CameraModel, 1); } if (ImageInfo.DateTime[0]) { - add_assoc_string(return_value,"DateTime",ImageInfo.DateTime,1); + add_assoc_string(return_value, "DateTime", ImageInfo.DateTime, 1); } - add_assoc_long(return_value,"Height",ImageInfo.Height); - add_assoc_long(return_value,"Width",ImageInfo.Width); - add_assoc_long(return_value,"IsColor",ImageInfo.IsColor); + add_assoc_long(return_value, "Height", ImageInfo.Height); + add_assoc_long(return_value, "Width", ImageInfo.Width); + add_assoc_long(return_value, "IsColor", ImageInfo.IsColor); if(ImageInfo.FlashUsed >= 0) { - add_assoc_long(return_value,"FlashUsed",ImageInfo.FlashUsed); + add_assoc_long(return_value, "FlashUsed", ImageInfo.FlashUsed); } if (ImageInfo.FocalLength) { - sprintf(tmp,"%4.1fmm",ImageInfo.FocalLength); - add_assoc_string(return_value,"FocalLength",tmp,1); + sprintf(tmp, "%4.1fmm", ImageInfo.FocalLength); + add_assoc_string(return_value, "FocalLength", tmp, 1); if(ImageInfo.CCDWidth) { - sprintf(tmp,"%dmm",(int)(ImageInfo.FocalLength/ImageInfo.CCDWidth*35+0.5)); - add_assoc_string(return_value,"35mmFocalLength",tmp,1); + sprintf(tmp, "%dmm", (int)(ImageInfo.FocalLength/ImageInfo.CCDWidth*35+0.5)); + add_assoc_string(return_value, "35mmFocalLength", tmp, 1); } - add_assoc_double(return_value,"RawFocalLength",ImageInfo.FocalLength); + add_assoc_double(return_value, "RawFocalLength", ImageInfo.FocalLength); } if(ImageInfo.ExposureTime) { if(ImageInfo.ExposureTime <= 0.5) { - sprintf(tmp,"%6.3f s (1/%d)",ImageInfo.ExposureTime,(int)(0.5 + 1/ImageInfo.ExposureTime)); + sprintf(tmp, "%6.3f s (1/%d)", ImageInfo.ExposureTime, (int)(0.5 + 1/ImageInfo.ExposureTime)); } else { - sprintf(tmp,"%6.3f s",ImageInfo.ExposureTime); + sprintf(tmp, "%6.3f s", ImageInfo.ExposureTime); } - add_assoc_string(return_value,"ExposureTime",tmp,1); - add_assoc_double(return_value,"RawExposureTime",ImageInfo.ExposureTime); + add_assoc_string(return_value, "ExposureTime", tmp, 1); + add_assoc_double(return_value, "RawExposureTime", ImageInfo.ExposureTime); } if(ImageInfo.ApertureFNumber) { - sprintf(tmp,"f/%4.1f",ImageInfo.ApertureFNumber); - add_assoc_string(return_value,"ApertureFNumber",tmp,1); - add_assoc_double(return_value,"RawApertureFNumber",ImageInfo.ApertureFNumber); + sprintf(tmp, "f/%4.1f", ImageInfo.ApertureFNumber); + add_assoc_string(return_value, "ApertureFNumber", tmp, 1); + add_assoc_double(return_value, "RawApertureFNumber", ImageInfo.ApertureFNumber); } if(ImageInfo.Distance) { if(ImageInfo.Distance<0) { - add_assoc_string(return_value,"FocusDistance","Infinite",1); + add_assoc_string(return_value, "FocusDistance", "Infinite", 1); } else { - sprintf(tmp,"%5.2fm",ImageInfo.Distance); - add_assoc_string(return_value,"FocusDistance",tmp,1); + sprintf(tmp, "%5.2fm", ImageInfo.Distance); + add_assoc_string(return_value, "FocusDistance", tmp, 1); } - add_assoc_double(return_value,"RawFocusDistance",ImageInfo.Distance); + add_assoc_double(return_value, "RawFocusDistance", ImageInfo.Distance); } if(ImageInfo.CCDWidth) { - add_assoc_double(return_value,"CCDWidth",ImageInfo.CCDWidth); + add_assoc_double(return_value, "CCDWidth", ImageInfo.CCDWidth); } if(ImageInfo.Orientation) { - add_assoc_long(return_value,"Orientation",ImageInfo.Orientation); + add_assoc_long(return_value, "Orientation", ImageInfo.Orientation); } if (ImageInfo.GPSinfo[0]) { - add_assoc_string(return_value,"GPSinfo",ImageInfo.GPSinfo,1); + add_assoc_string(return_value, "GPSinfo", ImageInfo.GPSinfo, 1); } if(ImageInfo.ISOspeed) { - add_assoc_long(return_value,"ISOspeed",ImageInfo.ISOspeed); + add_assoc_long(return_value, "ISOspeed", ImageInfo.ISOspeed); } if (ImageInfo.ExifVersion[0]) { - add_assoc_string(return_value,"ExifVersion",ImageInfo.ExifVersion,1); + add_assoc_string(return_value, "ExifVersion", ImageInfo.ExifVersion, 1); } if (ImageInfo.Copyright[0]) { - add_assoc_string(return_value,"Copyright",ImageInfo.Copyright,1); + add_assoc_string(return_value, "Copyright", ImageInfo.Copyright, 1); } if (ImageInfo.Software[0]) { - add_assoc_string(return_value,"Software",ImageInfo.Software,1); + add_assoc_string(return_value, "Software", ImageInfo.Software, 1); } if(ImageInfo.numComments) { if(ImageInfo.numComments==1) { - add_assoc_string(return_value,"Comments",(ImageInfo.Comments)[0],0); + add_assoc_string(return_value, "Comments", (ImageInfo.Comments)[0], 0); } else { int i; @@ -1242,30 +1242,30 @@ PHP_FUNCTION(read_exif_data) } } if(ImageInfo.ThumbnailSize && ImageInfo.Thumbnail) { - add_assoc_stringl(return_value,"Thumbnail",ImageInfo.Thumbnail,ImageInfo.ThumbnailSize,1); - add_assoc_long(return_value,"ThumbnailSize",ImageInfo.ThumbnailSize); + add_assoc_stringl(return_value, "Thumbnail", ImageInfo.Thumbnail, ImageInfo.ThumbnailSize, 1); + add_assoc_long(return_value, "ThumbnailSize", ImageInfo.ThumbnailSize); efree(ImageInfo.Thumbnail); } if(ImageInfo.SpecialMode >= 0) { - add_assoc_long(return_value,"SpecialMode",ImageInfo.SpecialMode); + add_assoc_long(return_value, "SpecialMode", ImageInfo.SpecialMode); } if(ImageInfo.JpegQual >= 0) { - add_assoc_long(return_value,"JpegQual",ImageInfo.JpegQual); + add_assoc_long(return_value, "JpegQual", ImageInfo.JpegQual); } if(ImageInfo.Macro >= 0) { - add_assoc_long(return_value,"Macro",ImageInfo.Macro); + add_assoc_long(return_value, "Macro", ImageInfo.Macro); } if(ImageInfo.DigiZoom >= 0) { - add_assoc_long(return_value,"DigiZoom",ImageInfo.DigiZoom); + add_assoc_long(return_value, "DigiZoom", ImageInfo.DigiZoom); } if (ImageInfo.SoftwareRelease[0]) { - add_assoc_string(return_value,"SoftwareRelease",ImageInfo.SoftwareRelease,1); + add_assoc_string(return_value, "SoftwareRelease", ImageInfo.SoftwareRelease, 1); } if (ImageInfo.PictInfo[0]) { - add_assoc_string(return_value,"PictInfo",ImageInfo.PictInfo,1); + add_assoc_string(return_value, "PictInfo", ImageInfo.PictInfo, 1); } if (ImageInfo.CameraId[0]) { - add_assoc_string(return_value,"CameraId",ImageInfo.CameraId,1); + add_assoc_string(return_value, "CameraId", ImageInfo.CameraId, 1); } } /* }}} */ |