Lines Matching refs:ValuePtr
388 void PrintFormatNumber(void * ValuePtr, int Format, int ByteCount) in PrintFormatNumber() argument
395 case FMT_BYTE: printf("%02x",*(uchar *)ValuePtr); s=1; break; in PrintFormatNumber()
396 case FMT_USHORT: printf("%d",Get16u(ValuePtr)); s=2; break; in PrintFormatNumber()
398 case FMT_SLONG: printf("%d",Get32s(ValuePtr)); s=4; break; in PrintFormatNumber()
399 case FMT_SSHORT: printf("%hd",(signed short)Get16u(ValuePtr)); s=2; break; in PrintFormatNumber()
402 printf("%d/%d",Get32s(ValuePtr), Get32s(4+(char *)ValuePtr)); in PrintFormatNumber()
406 case FMT_SINGLE: printf("%f",(double)*(float *)ValuePtr); s=8; break; in PrintFormatNumber()
407 case FMT_DOUBLE: printf("%f",*(double *)ValuePtr); s=8; break; in PrintFormatNumber()
415 ValuePtr = (void *)((char *)ValuePtr + s); in PrintFormatNumber()
425 double ConvertAnyFormat(void * ValuePtr, int Format) in ConvertAnyFormat() argument
431 case FMT_SBYTE: Value = *(signed char *)ValuePtr; break; in ConvertAnyFormat()
432 case FMT_BYTE: Value = *(uchar *)ValuePtr; break; in ConvertAnyFormat()
434 case FMT_USHORT: Value = Get16u(ValuePtr); break; in ConvertAnyFormat()
435 case FMT_ULONG: Value = Get32u(ValuePtr); break; in ConvertAnyFormat()
441 Num = Get32s(ValuePtr); in ConvertAnyFormat()
442 Den = Get32s(4+(char *)ValuePtr); in ConvertAnyFormat()
451 case FMT_SSHORT: Value = (signed short)Get16u(ValuePtr); break; in ConvertAnyFormat()
452 case FMT_SLONG: Value = Get32s(ValuePtr); break; in ConvertAnyFormat()
455 case FMT_SINGLE: Value = (double)*(float *)ValuePtr; break; in ConvertAnyFormat()
456 case FMT_DOUBLE: Value = *(double *)ValuePtr; break; in ConvertAnyFormat()
591 unsigned char * ValuePtr; in ProcessExifDir() local
622 ValuePtr = OffsetBase+OffsetVal; in ProcessExifDir()
633 ValuePtr = DirEntry+8; in ProcessExifDir()
640 ProcessMakerNote(ValuePtr, ByteCount, OffsetBase, ExifLength); in ProcessExifDir()
663 printf("%.*ls\n", ByteCount/2, (wchar_t *)ValuePtr); in ProcessExifDir()
665 PrintFormatNumber(ValuePtr, Format, ByteCount); in ProcessExifDir()
676 printf("\"%s\"", ValuePtr); in ProcessExifDir()
698 PrintFormatNumber(ValuePtr, Format, ByteCount); in ProcessExifDir()
707 strncpy(ImageInfo.CameraMake, (char *)ValuePtr, ByteCount < 31 ? ByteCount : 31); in ProcessExifDir()
711 strncpy(ImageInfo.CameraModel, (char *)ValuePtr, ByteCount < 39 ? ByteCount : 39); in ProcessExifDir()
716 strncpy(ImageInfo.DateTime, (char *)ValuePtr, 19); in ProcessExifDir()
724 strncpy(ImageInfo.DateTime, (char *)ValuePtr, 19); in ProcessExifDir()
732 (char *)ValuePtr - (char *)OffsetBase; in ProcessExifDir()
744 memcpy(ImageInfo.Comments, ValuePtr, ByteCount); in ProcessExifDir()
759 if ((ValuePtr)[a] == ' '){ in ProcessExifDir()
760 (ValuePtr)[a] = '\0'; in ProcessExifDir()
774 int msiz = ExifLength - (ValuePtr-OffsetBase); in ProcessExifDir()
777 if (msiz > 5 && memcmp(ValuePtr, "ASCII", 5) == 0) { in ProcessExifDir()
779 int c = (ValuePtr)[a]; in ProcessExifDir()
782 (char *)ValuePtr + a, msiz - a); in ProcessExifDir()
787 strncpy(ImageInfo.Comments, (char *)ValuePtr, msiz); in ProcessExifDir()
795 ImageInfo.ApertureFNumber = (float)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
804 = (float)exp(ConvertAnyFormat(ValuePtr, Format)*log(2)*0.5); in ProcessExifDir()
811 ImageInfo.FocalLength.num = Get32u(ValuePtr); in ProcessExifDir()
812 ImageInfo.FocalLength.denom = Get32u(4+(char *)ValuePtr); in ProcessExifDir()
818 ImageInfo.Distance = (float)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
824 ImageInfo.ExposureTime = (float)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
832 = (float)(1/exp(ConvertAnyFormat(ValuePtr, Format)*log(2))); in ProcessExifDir()
838 ImageInfo.FlashUsed=(int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
848 OrientationPtr[NumOrientations] = ValuePtr; in ProcessExifDir()
851 ImageInfo.Orientation = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
864 a = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
869 FocalplaneXRes = ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
873 switch((int)ConvertAnyFormat(ValuePtr, Format)){ in ProcessExifDir()
889 ImageInfo.ExposureBias = (float)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
893 ImageInfo.Whitebalance = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
897 ImageInfo.LightSource = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
901 ImageInfo.MeteringMode = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
905 ImageInfo.ExposureProgram = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
913 ImageInfo.ISOequivalent = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
918 ImageInfo.ExposureMode = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
922 ImageInfo.ISOequivalent = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
930 ImageInfo.DigitalZoomRatio = (float)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
934 ThumbnailOffset = (unsigned)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
939 ThumbnailSize = (unsigned)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
940 ImageInfo.ThumbnailSizeOffset = ValuePtr-OffsetBase; in ProcessExifDir()
950 SubdirStart = OffsetBase + Get32u(ValuePtr); in ProcessExifDir()
964 SubdirStart = OffsetBase + Get32u(ValuePtr); in ProcessExifDir()
978 ImageInfo.FocalLength35mmEquiv = (unsigned)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()
984 ImageInfo.DistanceRange = (int)ConvertAnyFormat(ValuePtr, Format); in ProcessExifDir()