VFP 6 - Getting at hidden picture information
VFP 6 - Getting at hidden picture information
(OP)
If you right click an image in Explorer and go to 'Properties' there are 3 tabs. If you are lucky the summary tag screen will contain a mess of details about the image - obviously stored by the camera.
Is there a way to access this information on an image file via VFP?
Thanks
Eric
Is there a way to access this information on an image file via VFP?
Thanks
Eric
RE: VFP 6 - Getting at hidden picture information
I'm assuming you are after things like the size (in pixels) and other file specific information.
Try downloading the image file from the camera, onto a hard disc on your machine - then use Explorer to see the properies. You *should* find that they are still visible - i.e. not stored in the camera, but in the file itself.
Now all you need to do is read the file in binary for (as Explorer does for files it recognises - such as JPG etc).
After that, you need to know a fair bit about the file format for JPG files - which I don't! - but this is not so bad, as some kind soul has done the bulk of the hard work for you here:
http://www.freevbcode.com/ShowCode.Asp?ID=112
Albeit in VB (not VFP), but that shouldn't be too hard to convert.
Good luck
Martin
Regards
ing
Griff
Keep
RE: VFP 6 - Getting at hidden picture information
Neil
I like work. It fascinates me. I can sit and look at it for hours...
RE: VFP 6 - Getting at hidden picture information
You can use WIA (Windows image acquisition)
CODE
Img.LoadFile ("C:WINDOWS\Web\WallpaperBliss.bmp")
s = "Width = " + TRANSFORM(Img.Width) + chr(13) + ;
"Height = " + TRANSFORM(Img.Height) + chr(13) + ;
"Depth = " + TRANSFORM(Img.PixelDepth) + chr(13) + ;
"HorizontalResolution = " + TRANSFORM(Img.HorizontalResolution) + chr(13) + ;
"VerticalResolution = " + TRANSFORM(Img.VerticalResolution) + chr(13) + ;
"FrameCount = " + TRANSFORM(Img.FrameCount) + chr(13)
If Img.IsIndexedPixelFormat
s = s + "Pixel data contains palette indexes" + chr(13)
EndIf
If Img.IsAlphaPixelFormat
s = s + "Pixel data has alpha information" + chr(13)
EndIf
If Img.IsExtendedPixelFormat
s = s + "Pixel data has extended color information (16 bit/channel)" + chr(13)
EndIf
If Img.IsAnimated
s = s + "Image is animated" + chr(13)
EndIf
If Img.Properties.Exists("40091")
v = Img.Properties("40091").Value
s = s + "Title = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40092")
v = Img.Properties("40092").Value
s = s + "Comment = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40093")
v = Img.Properties("40093").Value
s = s + "Author = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40094")
v = Img.Properties("40094").Value
s = s + "Keywords = " + v.String + chr(13)
EndIf
If Img.Properties.Exists("40095")
v = Img.Properties("40095").Value
s = s + "Subject = " + v.String + chr(13)
EndIf
MESSAGEBOX( s)
You can find more information on WIA here (sorry its french)
ht
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
RE: VFP 6 - Getting at hidden picture information
It seems that different cameras start there information at a different byte in the image file header.
Someone may want to try the following form with a letter drop down for the search letter - then an edit box with the cleaned up image header - then a text box with the
byte number of the found chr instances then a drop down with the strings found. FWIW
CODE
**********************************************************************
frmimagdata *** Form1
PROCEDURE Load
PUBLIC search_chr
ENDPROC
** procedure end ***************************************************
frmimagdata *** Combo1
PROCEDURE InteractiveChange
search_chr = this.value
*!* SET step on
Delete FILE points.txt
PUBLIC ARRAY aMyStrlist[1]
myworkfile = getfile()
thisform.label1.caption = myworkfile
myfile=filetostr(myworkfile )
mynewstring = ''
N = 1
a = 1
DO while !eof()
mystring = ASC(subst(myfile,n,1))
IF mystring < 32 OR mystring > 126
mychar = chr(128)
K =1
ELSE
mychar = subst(myfile,n,1)
K = 1
IF mychar = search_chr
STRTOFILE(transform(n)+ chr(10),'points.txt',.t.)
ENDIF
ENDIF
N = n + 1
IF n = 1000
EXIT
ENDIF
ENDDO
newline = subst(myfile,159,25)
aMyStrlist(a) = newline
a= a +1
DIMENSION aMyStrlist(a)
newline = subst(myfile,179,25)
aMyStrlist(a) = newline
a= a +1
DIMENSION aMyStrlist(a)
newline = subst(myfile,213,25)
aMyStrlist(a) = newline
a= a +1
DIMENSION aMyStrlist(a)
myfile2 = filetostr('points.txt')
thisform.edit1.value = mynewstring
thisform.text1.value = myfile2
thisform.combo1.value = aMyStrlist
ENDPROC
** procedure end ***************************************************
frmimagdata *** Combo1
PROCEDURE Init
PUBLIC ARRAY aMyChrlist[1]
a = 1
FOR n = 65 to 90
aMyChrlist(a) = chr(n)
a= a +1
DIMENSION aMyChrlist(a)
ENDFOR
ENDPROC
** procedure end ***************************************************
**********************************************************************
** End of form procedures....: frmimagdata
So I hope someone can throw some light on the mystery
- where is the
RE: VFP 6 - Getting at hidden picture information
Cut-n-paste the following code into a PRG and execute it. If will prompt you to select an image file and then display the properties GDI+ can retrieve into a grid. Hopefully this will give you what you're looking for. NOTE: This example relies on the _gdiplus.vcx that comes with Visual FoxPro.
CODE
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
Top = 0
Left = 17
Height = 350
Width = 400
DoCreate = .T.
Caption = "Get Image Properties (EXIF)"
Name = "Form1"
ADD OBJECT grid1 AS grid WITH ;
Anchor = 14, ;
Height = 351, ;
Left = 0, ;
Top = 0, ;
Width = 400, ;
Name = "Grid1"
PROCEDURE createpropertycursor
CREATE CURSOR crsProps (PropName C(50), IDValue I)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsVer", 0x0000)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsLatitudeRef", 0x0001)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsLatitude", 0x0002)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsLongitudeRef", 0x0003)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsLongitude", 0x0004)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsAltitudeRef", 0x0005)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsAltitude", 0x0006)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsGpsTime", 0x0007)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsGpsSatellites", 0x0008)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsGpsStatus", 0x0009)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsGpsMeasureMode", 0x000A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsGpsDop", 0x000B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsSpeedRef", 0x000C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsSpeed", 0x000D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsTrackRef", 0x000E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsTrack", 0x000F)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsImgDirRef", 0x0010)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsImgDir", 0x0011)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsMapDatum", 0x0012)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestLatRef", 0x0013)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestLat", 0x0014)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestLongRef", 0x0015)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestLong", 0x0016)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestBearRef", 0x0017)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestBear", 0x0018)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestDistRef", 0x0019)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsDestDist", 0x001A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagNewSubfileType", 0x00FE)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagSubfileType", 0x00FF)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagImageWidth", 0x0100)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagImageHeight", 0x0101)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagBitsPerSample", 0x0102)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagCompression", 0x0103)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPhotometricInterp", 0x0106)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThreshHolding", 0x0107)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagCellWidth", 0x0108)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagCellHeight", 0x0109)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagFillOrder", 0x010A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagDocumentName", 0x010D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagImageDescription", 0x010E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagEquipMake", 0x010F)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagEquipModel", 0x0110)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagStripOffsets", 0x0111)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagOrientation", 0x0112)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagSamplesPerPixel", 0x0115)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagRowsPerStrip", 0x0116)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagStripBytesCount", 0x0117)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagMinSampleValue", 0x0118)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagMaxSampleValue", 0x0119)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagXResolution", 0x011A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagYResolution", 0x011B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPlanarConfig", 0x011C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPageName", 0x011D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagXPosition", 0x011E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagYPosition", 0x011F)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagFreeOffset", 0x0120)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagFreeByteCounts", 0x0121)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGrayResponseUnit", 0x0122)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGrayResponseCurve", 0x0123)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagT4Option", 0x0124)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagT6Option", 0x0125)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagResolutionUnit", 0x0128)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPageNumber", 0x0129)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagTransferFunction", 0x012D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagSoftwareUsed", 0x0131)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagDateTime", 0x0132)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagArtist", 0x013B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHostComputer", 0x013C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPredictor", 0x013D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagWhitePoint", 0x013E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPrimaryChromaticities", 0x013F)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagColorMap", 0x0140)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHalftoneHints", 0x0141)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagTileWidth", 0x0142)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagTileLength", 0x0143)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagTileOffset", 0x0144)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagTileByteCounts", 0x0145)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagInkSet", 0x014C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagInkNames", 0x014D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagNumberOfInks", 0x014E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagDotRange", 0x0150)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagTargetPrinter", 0x0151)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExtraSamples", 0x0152)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagSampleFormat", 0x0153)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagSMinSampleValue", 0x0154)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagSMaxSampleValue", 0x0155)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagTransferRange", 0x0156)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGProc", 0x0200)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGInterFormat", 0x0201)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGInterLength", 0x0202)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGRestartInterval", 0x0203)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGLosslessPredictors", 0x0205)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGPointTransforms", 0x0206)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGQTables", 0x0207)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGDCTables", 0x0208)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGACTables", 0x0209)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagYCbCrCoefficients", 0x0211)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagYCbCrSubsampling", 0x0212)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagYCbCrPositioning", 0x0213)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagREFBlackWhite", 0x0214)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGamma", 0x0301)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagICCProfileDescriptor", 0x0302)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagSRGBRenderingIntent", 0x0303)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagImageTitle", 0x0320)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagResolutionXUnit", 0x5001)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagResolutionYUnit", 0x5002)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagResolutionXLengthUnit", 0x5003)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagResolutionYLengthUnit", 0x5004)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPrintFlags", 0x5005)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPrintFlagsVersion", 0x5006)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPrintFlagsCrop", 0x5007)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPrintFlagsBleedWidth", 0x5008)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPrintFlagsBleedWidthScale", 0x5009)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHalftoneLPI", 0x500A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHalftoneLPIUnit", 0x500B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHalftoneDegree", 0x500C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHalftoneShape", 0x500D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHalftoneMisc", 0x500E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagHalftoneScreen", 0x500F)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagJPEGQuality", 0x5010)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGridSize", 0x5011)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailFormat", 0x5012)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailWidth", 0x5013)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailHeight", 0x5014)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailColorDepth", 0x5015)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailPlanes", 0x5016)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailRawBytes", 0x5017)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailSize", 0x5018)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailCompressedSize", 0x5019)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagColorTransferFunction", 0x501A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailData", 0x501B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailImageWidth", 0x5020)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailImageHeight", 0x5021)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailBitsPerSample", 0x5022)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailCompression", 0x5023)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailPhotometricInterp", 0x5024)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailImageDescription", 0x5025)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailEquipMake", 0x5026)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailEquipModel", 0x5027)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailStripOffsets", 0x5028)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailOrientation", 0x5029)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailSamplesPerPixel", 0x502A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailRowsPerStrip", 0x502B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailStripBytesCount", 0x502C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailResolutionX", 0x502D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailResolutionY", 0x502E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailPlanarConfig", 0x502F)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailResolutionUnit", 0x5030)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailTransferFunction", 0x5031)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailSoftwareUsed", 0x5032)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailDateTime", 0x5033)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailArtist", 0x5034)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailWhitePoint", 0x5035)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailPrimaryChromaticities", 0x5036)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailYCbCrCoefficients", 0x5037)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailYCbCrSubsampling", 0x5038)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailYCbCrPositioning", 0x5039)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailRefBlackWhite", 0x503A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagThumbnailCopyRight", 0x503B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagLuminanceTable", 0x5090)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagChrominanceTable", 0x5091)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagFrameDelay", 0x5100)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagLoopCount", 0x5101)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGlobalPalette", 0x5102)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagIndexBackground", 0x5103)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagIndexTransparent", 0x5104)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPixelUnit", 0x5110)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPixelPerUnitX", 0x5111)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPixelPerUnitY", 0x5112)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagPaletteHistogram", 0x5113)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagCopyright", 0x8298)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifExposureTime", 0x829A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFNumber", 0x829D)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifIFD", 0x8769)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagICCProfile", 0x8773)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifExposureProg", 0x8822)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifSpectralSense", 0x8824)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagGpsIFD", 0x8825)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifISOSpeed", 0x8827)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifOECF", 0x8828)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifVer", 0x9000)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifDTOrig", 0x9003)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifDTDigitized", 0x9004)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifCompConfig", 0x9101)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifCompBPP", 0x9102)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifShutterSpeed", 0x9201)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifAperture", 0x9202)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifBrightness", 0x9203)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifExposureBias", 0x9204)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifMaxAperture", 0x9205)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifSubjectDist", 0x9206)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifMeteringMode", 0x9207)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifLightSource", 0x9208)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFlash", 0x9209)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFocalLength", 0x920A)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifMakerNote", 0x927C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifUserComment", 0x9286)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifDTSubsec", 0x9290)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifDTOrigSS", 0x9291)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifDTDigSS", 0x9292)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFPXVer", 0xA000)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifColorSpace", 0xA001)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifPixXDim", 0xA002)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifPixYDim", 0xA003)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifRelatedWav", 0xA004)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifInterop", 0xA005)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFlashEnergy", 0xA20B)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifSpatialFR", 0xA20C)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFocalXRes", 0xA20E)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFocalYRes", 0xA20F)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFocalResUnit", 0xA210)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifSubjectLoc", 0xA214)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifExposureIndex", 0xA215)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifSensingMethod", 0xA217)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifFileSource", 0xA300)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifSceneType", 0xA301)
INSERT INTO crsProps (PropName, IDValue) values("PropertyTagExifCfaPattern", 0xA302)
INDEX ON IDValue TO IDValue
ENDPROC
PROCEDURE retrievepropname
LPARAMETERS tnPropertyID
LOCAL lcReturn
lcReturn = "Unknown"
IF SEEK(tnPropertyID, "crsProps", "IDValue")
lcReturn = crsProps.PropName<
RE: VFP 6 - Getting at hidden picture information
That's clearly what I would like to do BUT I did say in VFP 6.
I have Gdiplus.dll but not the vcx.
Is there any way I can use this?
many thanks
Eric
RE: VFP 6 - Getting at hidden picture information
OK, I would like to encourage you to upgrade to VFP9. It's well worth the price of admission.
CODE
oform1=NEWOBJECT("form1")
oform1.SHOW
RETURN
DEFINE CLASS form1 AS FORM
TOP = 0
LEFT = 17
HEIGHT = 350
WIDTH = 400
DOCREATE = .T.
CAPTION = "Get Image Properties (EXIF)"
NAME = "Form1"
gpImageHandle = 0
ADD OBJECT grid1 AS GRID WITH ;
ANCHOR = 14, ;
HEIGHT = 351, ;
LEFT = 0, ;
TOP = 0, ;
WIDTH = 400, ;
NAME = "Grid1"
PROCEDURE createpropertycursor
CREATE CURSOR crsProps (PropName C(50), IDValue I)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsVer", 0x0000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLatitudeRef", 0x0001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLatitude", 0x0002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLongitudeRef", 0x0003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLongitude", 0x0004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsAltitudeRef", 0x0005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsAltitude", 0x0006)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsTime", 0x0007)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsSatellites", 0x0008)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsStatus", 0x0009)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsMeasureMode", 0x000A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsDop", 0x000B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsSpeedRef", 0x000C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsSpeed", 0x000D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsTrackRef", 0x000E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsTrack", 0x000F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsImgDirRef", 0x0010)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsImgDir", 0x0011)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsMapDatum", 0x0012)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLatRef", 0x0013)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLat", 0x0014)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLongRef", 0x0015)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLong", 0x0016)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestBearRef", 0x0017)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestBear", 0x0018)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestDistRef", 0x0019)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestDist", 0x001A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagNewSubfileType", 0x00FE)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSubfileType", 0x00FF)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageWidth", 0x0100)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageHeight", 0x0101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagBitsPerSample", 0x0102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCompression", 0x0103)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPhotometricInterp", 0x0106)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThreshHolding", 0x0107)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCellWidth", 0x0108)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCellHeight", 0x0109)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFillOrder", 0x010A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDocumentName", 0x010D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageDescription", 0x010E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagEquipMake", 0x010F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagEquipModel", 0x0110)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagStripOffsets", 0x0111)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagOrientation", 0x0112)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSamplesPerPixel", 0x0115)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagRowsPerStrip", 0x0116)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagStripBytesCount", 0x0117)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagMinSampleValue", 0x0118)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagMaxSampleValue", 0x0119)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagXResolution", 0x011A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYResolution", 0x011B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPlanarConfig", 0x011C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPageName", 0x011D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagXPosition", 0x011E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYPosition", 0x011F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFreeOffset", 0x0120)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFreeByteCounts", 0x0121)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGrayResponseUnit", 0x0122)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGrayResponseCurve", 0x0123)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagT4Option", 0x0124)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagT6Option", 0x0125)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionUnit", 0x0128)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPageNumber", 0x0129)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTransferFunction", 0x012D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSoftwareUsed", 0x0131)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDateTime", 0x0132)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagArtist", 0x013B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHostComputer", 0x013C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPredictor", 0x013D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagWhitePoint", 0x013E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrimaryChromaticities", 0x013F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagColorMap", 0x0140)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneHints", 0x0141)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileWidth", 0x0142)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileLength", 0x0143)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileOffset", 0x0144)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileByteCounts", 0x0145)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagInkSet", 0x014C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagInkNames", 0x014D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagNumberOfInks", 0x014E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDotRange", 0x0150)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTargetPrinter", 0x0151)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExtraSamples", 0x0152)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSampleFormat", 0x0153)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSMinSampleValue", 0x0154)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSMaxSampleValue", 0x0155)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTransferRange", 0x0156)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGProc", 0x0200)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGInterFormat", 0x0201)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGInterLength", 0x0202)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGRestartInterval", 0x0203)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGLosslessPredictors", 0x0205)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGPointTransforms", 0x0206)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGQTables", 0x0207)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGDCTables", 0x0208)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGACTables", 0x0209)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrCoefficients", 0x0211)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrSubsampling", 0x0212)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrPositioning", 0x0213)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagREFBlackWhite", 0x0214)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGamma", 0x0301)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagICCProfileDescriptor", 0x0302)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSRGBRenderingIntent", 0x0303)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageTitle", 0x0320)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionXUnit", 0x5001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionYUnit", 0x5002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionXLengthUnit", 0x5003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionYLengthUnit", 0x5004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlags", 0x5005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsVersion", 0x5006)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsCrop", 0x5007)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsBleedWidth", 0x5008)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsBleedWidthScale", 0x5009)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneLPI", 0x500A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneLPIUnit", 0x500B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneDegree", 0x500C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneShape", 0x500D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneMisc", 0x500E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneScreen", 0x500F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGQuality", 0x5010)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGridSize", 0x5011)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailFormat", 0x5012)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailWidth", 0x5013)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailHeight", 0x5014)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailColorDepth", 0x5015)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPlanes", 0x5016)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRawBytes", 0x5017)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSize", 0x5018)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCompressedSize", 0x5019)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagColorTransferFunction", 0x501A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailData", 0x501B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageWidth", 0x5020)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageHeight", 0x5021)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailBitsPerSample", 0x5022)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCompression", 0x5023)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPhotometricInterp", 0x5024)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageDescription", 0x5025)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailEquipMake", 0x5026)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailEquipModel", 0x5027)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailStripOffsets", 0x5028)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailOrientation", 0x5029)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSamplesPerPixel", 0x502A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRowsPerStrip", 0x502B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailStripBytesCount", 0x502C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionX", 0x502D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionY", 0x502E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPlanarConfig", 0x502F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionUnit", 0x5030)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailTransferFunction", 0x5031)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSoftwareUsed", 0x5032)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailDateTime", 0x5033)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailArtist", 0x5034)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailWhitePoint", 0x5035)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPrimaryChromaticities", 0x5036)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrCoefficients", 0x5037)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrSubsampling", 0x5038)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrPositioning", 0x5039)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRefBlackWhite", 0x503A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCopyRight", 0x503B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagLuminanceTable", 0x5090)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagChrominanceTable", 0x5091)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFrameDelay", 0x5100)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagLoopCount", 0x5101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGlobalPalette", 0x5102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagIndexBackground", 0x5103)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagIndexTransparent", 0x5104)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelUnit", 0x5110)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelPerUnitX", 0x5111)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelPerUnitY", 0x5112)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPaletteHistogram", 0x5113)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCopyright", 0x8298)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureTime", 0x829A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFNumber", 0x829D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifIFD", 0x8769)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagICCProfile", 0x8773)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureProg", 0x8822)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSpectralSense", 0x8824)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsIFD", 0x8825)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifISOSpeed", 0x8827)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifOECF", 0x8828)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifVer", 0x9000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTOrig", 0x9003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTDigitized", 0x9004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCompConfig", 0x9101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCompBPP", 0x9102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifShutterSpeed", 0x9201)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifAperture", 0x9202)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifBrightness", 0x9203)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureBias", 0x9204)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMaxAperture", 0x9205)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSubjectDist", 0x9206)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMeteringMode", 0x9207)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifLightSource", 0x9208)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFlash", 0x9209)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalLength", 0x920A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMakerNote", 0x927C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifUserComment", 0x9286)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTSubsec", 0x9290)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTOrigSS", 0x9291)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTDigSS", 0x9292)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFPXVer", 0xA000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifColorSpace", 0xA001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifPixXDim", 0xA002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifPixYDim", 0xA003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifRelatedWav", 0xA004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifInterop", 0xA005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFlashEnergy", 0xA20B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSpatialFR", 0xA20C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalXRes", 0xA20E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalYRes", 0xA20F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalResUnit", 0xA210)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSubjectLoc", 0xA214)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureIndex", 0xA215)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSensingMethod", 0xA217)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFileSource", 0xA300)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSceneType", 0xA301)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCfaPattern", 0xA302)
INDEX ON IDValue TO IDValue
ENDPROC
PROCEDURE retrievepropname
LPARAMETERS tnPropertyID
LOCAL lcReturn
lcReturn = "Unknown"
IF SEEK(tnPropertyID, "crsProps", "IDValue")
lcReturn = crsPr
RE: VFP 6 - Getting at hidden picture information
Thank you very much - there are reasons I'm still with VFP 6.
with the code
CODE
FUNCTION GGetImageHandle(tcFilename)
*************************
LOCAL lnHandle
m.lnHandle = 0
GdipLoadImageFromFile(STRCONV(m.tcFilename + CHR(0), 5), @m.lnHandle)
RETURN m.lnHandle
ENDFUNC
Unfortunately I get this error on the GdipLoadImageFromFile line
Regards
Eric
Declare DLL call caused an exception
RE: VFP 6 - Getting at hidden picture information
I seemed to have missed the STRCONV(). Sorry about that. Here is what the equivalent would be in Visual FoxPro 6.0.
CODE
******************************
FUNCTION a2u(cText)
******************************
*!* http://www.news2news.com/vfp/?example=14&function=488
******************************
DECLARE INTEGER WideCharToMultiByte IN kernel32;
INTEGER CodePg, INTEGER dwFlags,;
STRING lpWideCharStr, INTEGER cchWideChar,;
STRING @lpMultiByteStr, INTEGER cbMultiByte,;
STRING lpDefaultChar, INTEGER lpUsedDefaultChar
DECLARE INTEGER MultiByteToWideChar IN kernel32;
INTEGER CodePage, LONG dwFlags, STRING lpMultiByteStr,;
INTEGER cbMultiByte, STRING @lpWCharStr, INTEGER cchWChar
LOCAL lcBuffer, lnBufsize
* first calling to define required buffer size
lcBuffer = ""
lnBufsize = MultiByteToWideChar(0, 1,;
cText, Len(cText), @lcBuffer, 0)
lcBuffer = Repli(Chr(0), lnBufsize*2) && in wide chars
= MultiByteToWideChar(0, 1,;
cText, Len(cText), @lcBuffer, lnBufsize)
RETURN lcBuffer
SweetPotato Software Website
My Blog
RE: VFP 6 - Getting at hidden picture information
I now get an error
I renamed the a2u Function for clarity.
vfp declare dll caused an exception
at GdipLoadImageFromFile(stringconvert(m.tcFilename+ CHR(0)), @m.lnHandle)
I've looked at the site U sent and it looks Ok but the parameters being passed are not correct.
Any ideas please?
Eric
RE: VFP 6 - Getting at hidden picture information
RE: VFP 6 - Getting at hidden picture information
Can you give me more information on the error you are getting (such as the error number, the error message, etc.)? It is always a good idea to provide this sort of information when asking for help with an error. Also, did you make StringConvert() a standalone function or did you add it to the form in the code above? If so then you would need to use this.stringconvert to call it.
To perhaps save us both some time I should have just posted the entire thing with the a2u function integrated into it. So here is the code again:
CODE
oform1=NEWOBJECT("form1")
oform1.SHOW
RETURN
DEFINE CLASS form1 AS FORM
TOP = 0
LEFT = 17
HEIGHT = 350
WIDTH = 400
DOCREATE = .T.
CAPTION = "Get Image Properties (EXIF)"
NAME = "Form1"
gpImageHandle = 0
ADD OBJECT grid1 AS GRID WITH ;
ANCHOR = 14, ;
HEIGHT = 351, ;
LEFT = 0, ;
TOP = 0, ;
WIDTH = 400, ;
NAME = "Grid1"
*************************
PROCEDURE createpropertycursor
*************************
CREATE CURSOR crsProps (PropName C(50), IDValue I)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsVer", 0x0000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLatitudeRef", 0x0001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLatitude", 0x0002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLongitudeRef", 0x0003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLongitude", 0x0004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsAltitudeRef", 0x0005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsAltitude", 0x0006)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsTime", 0x0007)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsSatellites", 0x0008)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsStatus", 0x0009)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsMeasureMode", 0x000A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsDop", 0x000B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsSpeedRef", 0x000C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsSpeed", 0x000D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsTrackRef", 0x000E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsTrack", 0x000F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsImgDirRef", 0x0010)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsImgDir", 0x0011)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsMapDatum", 0x0012)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLatRef", 0x0013)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLat", 0x0014)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLongRef", 0x0015)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLong", 0x0016)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestBearRef", 0x0017)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestBear", 0x0018)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestDistRef", 0x0019)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestDist", 0x001A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagNewSubfileType", 0x00FE)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSubfileType", 0x00FF)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageWidth", 0x0100)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageHeight", 0x0101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagBitsPerSample", 0x0102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCompression", 0x0103)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPhotometricInterp", 0x0106)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThreshHolding", 0x0107)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCellWidth", 0x0108)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCellHeight", 0x0109)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFillOrder", 0x010A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDocumentName", 0x010D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageDescription", 0x010E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagEquipMake", 0x010F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagEquipModel", 0x0110)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagStripOffsets", 0x0111)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagOrientation", 0x0112)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSamplesPerPixel", 0x0115)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagRowsPerStrip", 0x0116)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagStripBytesCount", 0x0117)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagMinSampleValue", 0x0118)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagMaxSampleValue", 0x0119)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagXResolution", 0x011A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYResolution", 0x011B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPlanarConfig", 0x011C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPageName", 0x011D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagXPosition", 0x011E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYPosition", 0x011F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFreeOffset", 0x0120)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFreeByteCounts", 0x0121)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGrayResponseUnit", 0x0122)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGrayResponseCurve", 0x0123)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagT4Option", 0x0124)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagT6Option", 0x0125)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionUnit", 0x0128)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPageNumber", 0x0129)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTransferFunction", 0x012D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSoftwareUsed", 0x0131)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDateTime", 0x0132)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagArtist", 0x013B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHostComputer", 0x013C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPredictor", 0x013D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagWhitePoint", 0x013E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrimaryChromaticities", 0x013F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagColorMap", 0x0140)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneHints", 0x0141)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileWidth", 0x0142)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileLength", 0x0143)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileOffset", 0x0144)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileByteCounts", 0x0145)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagInkSet", 0x014C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagInkNames", 0x014D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagNumberOfInks", 0x014E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDotRange", 0x0150)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTargetPrinter", 0x0151)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExtraSamples", 0x0152)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSampleFormat", 0x0153)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSMinSampleValue", 0x0154)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSMaxSampleValue", 0x0155)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTransferRange", 0x0156)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGProc", 0x0200)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGInterFormat", 0x0201)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGInterLength", 0x0202)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGRestartInterval", 0x0203)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGLosslessPredictors", 0x0205)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGPointTransforms", 0x0206)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGQTables", 0x0207)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGDCTables", 0x0208)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGACTables", 0x0209)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrCoefficients", 0x0211)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrSubsampling", 0x0212)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrPositioning", 0x0213)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagREFBlackWhite", 0x0214)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGamma", 0x0301)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagICCProfileDescriptor", 0x0302)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSRGBRenderingIntent", 0x0303)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageTitle", 0x0320)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionXUnit", 0x5001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionYUnit", 0x5002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionXLengthUnit", 0x5003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionYLengthUnit", 0x5004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlags", 0x5005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsVersion", 0x5006)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsCrop", 0x5007)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsBleedWidth", 0x5008)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsBleedWidthScale", 0x5009)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneLPI", 0x500A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneLPIUnit", 0x500B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneDegree", 0x500C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneShape", 0x500D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneMisc", 0x500E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneScreen", 0x500F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGQuality", 0x5010)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGridSize", 0x5011)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailFormat", 0x5012)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailWidth", 0x5013)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailHeight", 0x5014)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailColorDepth", 0x5015)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPlanes", 0x5016)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRawBytes", 0x5017)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSize", 0x5018)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCompressedSize", 0x5019)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagColorTransferFunction", 0x501A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailData", 0x501B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageWidth", 0x5020)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageHeight", 0x5021)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailBitsPerSample", 0x5022)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCompression", 0x5023)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPhotometricInterp", 0x5024)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageDescription", 0x5025)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailEquipMake", 0x5026)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailEquipModel", 0x5027)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailStripOffsets", 0x5028)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailOrientation", 0x5029)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSamplesPerPixel", 0x502A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRowsPerStrip", 0x502B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailStripBytesCount", 0x502C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionX", 0x502D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionY", 0x502E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPlanarConfig", 0x502F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionUnit", 0x5030)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailTransferFunction", 0x5031)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSoftwareUsed", 0x5032)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailDateTime", 0x5033)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailArtist", 0x5034)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailWhitePoint", 0x5035)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPrimaryChromaticities", 0x5036)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrCoefficients", 0x5037)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrSubsampling", 0x5038)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrPositioning", 0x5039)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRefBlackWhite", 0x503A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCopyRight", 0x503B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagLuminanceTable", 0x5090)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagChrominanceTable", 0x5091)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFrameDelay", 0x5100)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagLoopCount", 0x5101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGlobalPalette", 0x5102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagIndexBackground", 0x5103)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagIndexTransparent", 0x5104)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelUnit", 0x5110)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelPerUnitX", 0x5111)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelPerUnitY", 0x5112)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPaletteHistogram", 0x5113)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCopyright", 0x8298)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureTime", 0x829A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFNumber", 0x829D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifIFD", 0x8769)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagICCProfile", 0x8773)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureProg", 0x8822)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSpectralSense", 0x8824)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsIFD", 0x8825)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifISOSpeed", 0x8827)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifOECF", 0x8828)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifVer", 0x9000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTOrig", 0x9003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTDigitized", 0x9004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCompConfig", 0x9101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCompBPP", 0x9102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifShutterSpeed", 0x9201)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifAperture", 0x9202)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifBrightness", 0x9203)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureBias", 0x9204)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMaxAperture", 0x9205)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSubjectDist", 0x9206)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMeteringMode", 0x9207)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifLightSource", 0x9208)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFlash", 0x9209)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalLength", 0x920A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMakerNote", 0x927C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifUserComment", 0x9286)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTSubsec", 0x9290)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTOrigSS", 0x9291)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTDigSS", 0x9292)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFPXVer", 0xA000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifColorSpace", 0xA001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifPixXDim", 0xA002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifPixYDim", 0xA003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifRelatedWav", 0xA004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifInterop", 0xA005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFlashEnergy", 0xA20B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSpatialFR", 0xA20C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalXRes", 0xA20E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalYRes", 0xA20F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalResUnit", 0xA210)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSubjectLoc", 0xA214)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureIndex", 0xA215)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSensingMethod", 0xA217)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFileSource", 0xA300)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSceneType", 0xA301)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCfaPattern", 0xA302)
INDEX ON IDValue TO IDValue
ENDPROC
*************************
PROCEDURE retrievepropname
*************************
 
RE: VFP 6 - Getting at hidden picture information
Thanks for your continued interest.
I did have stringconvert() as a separate prg file.
I pasted your new code directly into a prg and ran it.
I got the
Program Error
Declare DLL caused an exception at the line
GdipLoadImageFromFile(THIS.a2u(m.tcFilename + CHR(0)), @m.lnHandle)
This is pretty much what I said before - there is no error number shown.
Regards
Eric
RE: VFP 6 - Getting at hidden picture information
All I can think of is that GDI+ is choking on the image you are trying to load. Try it with some other images, such as the ones that come with Visual FoxPro.
I'm not sure what you're running into here. The declare and what a2u return is correct, so the only thing I can guess is that GDI+ is unable to load the image and return an image handle for you.
I really don't have much else to offer in way of code or additional ways to fix this. If GDI+ is choking on your images then even upgrading to Visual FoxPro 9.0 wouldn't help you with this. The VFP code I have posted is now completely compatible with Visual FoxPro 6.0. Sorry, I'm out of ideas.
SweetPotato Software Website
My Blog
RE: VFP 6 - Getting at hidden picture information
As I had picked a particular image each time, I tried another from my recent photography but no luck - still the same error. I aslo tried fox.bmp.
Is this code completely stand alone? Is there anything else that you think I am doing and may not be?
Is registering the dll needed?
Thank you for all your help in this quest.
Regards
Eric
RE: VFP 6 - Getting at hidden picture information
Does anyone else (beside Eric) have a copy of VFP 6.0 still installed that they could run the above code with and report back if they are seeing the same problem as Eric? I'd appreciate it, thanks.
SweetPotato Software Website
My Blog
RE: VFP 6 - Getting at hidden picture information
What version of the GDIPlus.dll do you have on that system? Also, is the GDIPlus.dll somewhere along the PATH of your system so that VFP can find it? Lastly, just to answer one of your questions... neither GDIPlus.dll or Kernel32.dll need to be registered. They are C DLLs as opposed to COM DLLs.
SweetPotato Software Website
My Blog
RE: VFP 6 - Getting at hidden picture information
My GdiPluss.dll is Version 5.1.3102.2180 and I have a copy of it in the app Home folder. 4 Aug 2004 1,672 Kb
Regards
Eric
RE: VFP 6 - Getting at hidden picture information
Eric
RE: VFP 6 - Getting at hidden picture information
I like work. It fascinates me. I can sit and look at it for hours...
RE: VFP 6 - Getting at hidden picture information
SweetPotato Software Website
My Blog
RE: VFP 6 - Getting at hidden picture information
Relieved its not only my problem.
lcBuffer in a2u is a 'spaced out' filename - I guess this is unicode - but no little boxes shown.
'O F F I C E . J P G ' FOR EXAMPLE
Eric
RE: VFP 6 - Getting at hidden picture information
I like work. It fascinates me. I can sit and look at it for hours...
RE: VFP 6 - Getting at hidden picture information
Try this as a replacement of a2u():
CODE
#if Version(5) >= 700
Return Strconv(tcStr + Chr(0), 5)
#else
Local lnLen, lcWideStr
lnLen = 2 * (Len(tcStr) + 1)
lcWideStr = Replicate(Chr(0), lnLen)
MultiByteToWideChar(0, 0, @tcStr, Len(tcStr), @lcWideStr, lnLen)
Return lcWideStr
#endif
ENDFUNC
I think it's important to initialise the Unicodestring-Buffer with chr(0).
Bye, Olaf.
RE: VFP 6 - Getting at hidden picture information
please remove the PROTECTED keyword. this function was stolen fram a class...
Bye, Olaf.
RE: VFP 6 - Getting at hidden picture information
On my system it still has the same problem, spaced out return value and the same DLL error message.
Neil
I like work. It fascinates me. I can sit and look at it for hours...
RE: VFP 6 - Getting at hidden picture information
I found it: There is no GdiplusStartup (and Shutdown).
You need these 2 declares:
CODE
Long @ token, String @ input, Long @ output
Declare Long GdiplusShutdown in GdiPlus.dll ;
Long token
The class needs a gdiplusToken property and then use the Startup/Shutdown API calls this way:
CODE
Local gdiplusStartupInput, lcToken
* struct GdiplusStartupInput
* {
* UINT32 GdiplusVersion; // Must be 1
* DebugEventProc DebugEventCallback; // Ignored on free builds
* BOOL SuppressBackgroundThread; // FALSE unless you're prepared to call
* // the hook/unhook functions properly
* BOOL SuppressExternalCodecs; // FALSE unless you want GDI+ only to use
* // its internal image codecs.
* }
gdiplusStartupInput = Chr(1) + Replicate(Chr(0), 15) && GdiplusStartupInput structure (sizeof = 16)
* Initialize GDI+.
lcToken = 0
If GdiplusStartup(@lcToken, @gdiplusStartupInput, 0) != 0
Return .F.
EndIf
This.gdiplusToken = lcToken
ENDPROC
PROCEDURE GdipShutdown()
GdiplusShutdown(This.gdiplusToken)
ENDPROC
You can call GdipStartup() from class Init() and GdipShutdown() from Destroy.
The next call causing a problem for me is GdipGetPropertyCount. I haven't found out the reason yet.
Bye, Olaf.
RE: VFP 6 - Getting at hidden picture information
It works (in VFP7). I just needed to restart.
Here are the last changes:
CODE
PROCEDURE fillpropertygrid
*************************
WITH THIS
.createpropertycursor()
.getimageproperties()
.grid1.RECORDSOURCE = "crsEXIF"
.grid1.REFRESH()
* .grid1.AUTOFIT()
ENDWITH
ENDPROC
*************************
PROCEDURE INIT
*************************
LOCAL lcImageFile
lcImageFile = GETPICT()
IF EMPTY(lcImageFile)
RETURN .F.
ENDIF
THIS.DeclareAPIs()
IF This.GdipStartup()
THIS.gpImageHandle = THIS.GGetImageHandle(lcImageFile)
THIS.fillpropertygrid()
ELSE
RETURN .F.
ENDIF
ENDPROC
*************************
PROCEDURE DESTROY
*************************
This.GdipShutdown()
USE IN SELECT("crsProps")
USE IN SELECT("crsEXIF")
ENDPROC
And don't forget the token property:
CODE
gdiplusToken = ''
TOP = 0
LEFT = 17
* ...
Bye, Olaf.
RE: VFP 6 - Getting at hidden picture information
Seems like Eric has given up with this! Anyway, I have made the changes specified, and I no longer get the error, BUT nothing is appearing in the grid.
Just in case I have done something wrong, could you post the complete code please!
Neil
I like work. It fascinates me. I can sit and look at it for hours...
RE: VFP 6 - Getting at hidden picture information
I think everything's fine with the code. Only there are little Exif informations. I also get no records for the foxpro BMPs in the graphics folder. Download the upper left picture on www.universalthread.com (called top1.jpg), there many Exif properties are included.
Nevertheless, here my completed prg:
CODE
oform1=NEWOBJECT("form1")
oform1.SHOW
RETURN
DEFINE CLASS form1 AS FORM
gdiplusToken = '
TOP = 0
LEFT = 17
HEIGHT = 350
WIDTH = 400
DOCREATE = .T.
CAPTION = "Get Image Properties (EXIF)"
NAME = "Form1"
gpImageHandle = 0
ADD OBJECT grid1 AS GRID WITH ;
ANCHOR = 14, ;
HEIGHT = 351, ;
LEFT = 0, ;
TOP = 0, ;
WIDTH = 400, ;
NAME = "Grid1"
*************************
PROCEDURE createpropertycursor
*************************
CREATE CURSOR crsProps (PropName C(50), IDValue I)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsVer", 0x0000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLatitudeRef", 0x0001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLatitude", 0x0002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLongitudeRef", 0x0003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsLongitude", 0x0004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsAltitudeRef", 0x0005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsAltitude", 0x0006)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsTime", 0x0007)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsSatellites", 0x0008)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsStatus", 0x0009)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsMeasureMode", 0x000A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsGpsDop", 0x000B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsSpeedRef", 0x000C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsSpeed", 0x000D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsTrackRef", 0x000E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsTrack", 0x000F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsImgDirRef", 0x0010)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsImgDir", 0x0011)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsMapDatum", 0x0012)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLatRef", 0x0013)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLat", 0x0014)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLongRef", 0x0015)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestLong", 0x0016)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestBearRef", 0x0017)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestBear", 0x0018)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestDistRef", 0x0019)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsDestDist", 0x001A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagNewSubfileType", 0x00FE)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSubfileType", 0x00FF)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageWidth", 0x0100)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageHeight", 0x0101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagBitsPerSample", 0x0102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCompression", 0x0103)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPhotometricInterp", 0x0106)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThreshHolding", 0x0107)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCellWidth", 0x0108)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCellHeight", 0x0109)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFillOrder", 0x010A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDocumentName", 0x010D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageDescription", 0x010E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagEquipMake", 0x010F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagEquipModel", 0x0110)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagStripOffsets", 0x0111)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagOrientation", 0x0112)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSamplesPerPixel", 0x0115)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagRowsPerStrip", 0x0116)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagStripBytesCount", 0x0117)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagMinSampleValue", 0x0118)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagMaxSampleValue", 0x0119)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagXResolution", 0x011A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYResolution", 0x011B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPlanarConfig", 0x011C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPageName", 0x011D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagXPosition", 0x011E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYPosition", 0x011F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFreeOffset", 0x0120)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFreeByteCounts", 0x0121)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGrayResponseUnit", 0x0122)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGrayResponseCurve", 0x0123)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagT4Option", 0x0124)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagT6Option", 0x0125)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionUnit", 0x0128)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPageNumber", 0x0129)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTransferFunction", 0x012D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSoftwareUsed", 0x0131)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDateTime", 0x0132)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagArtist", 0x013B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHostComputer", 0x013C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPredictor", 0x013D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagWhitePoint", 0x013E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrimaryChromaticities", 0x013F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagColorMap", 0x0140)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneHints", 0x0141)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileWidth", 0x0142)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileLength", 0x0143)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileOffset", 0x0144)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTileByteCounts", 0x0145)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagInkSet", 0x014C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagInkNames", 0x014D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagNumberOfInks", 0x014E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagDotRange", 0x0150)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTargetPrinter", 0x0151)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExtraSamples", 0x0152)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSampleFormat", 0x0153)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSMinSampleValue", 0x0154)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSMaxSampleValue", 0x0155)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagTransferRange", 0x0156)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGProc", 0x0200)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGInterFormat", 0x0201)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGInterLength", 0x0202)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGRestartInterval", 0x0203)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGLosslessPredictors", 0x0205)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGPointTransforms", 0x0206)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGQTables", 0x0207)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGDCTables", 0x0208)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGACTables", 0x0209)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrCoefficients", 0x0211)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrSubsampling", 0x0212)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagYCbCrPositioning", 0x0213)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagREFBlackWhite", 0x0214)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGamma", 0x0301)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagICCProfileDescriptor", 0x0302)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagSRGBRenderingIntent", 0x0303)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagImageTitle", 0x0320)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionXUnit", 0x5001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionYUnit", 0x5002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionXLengthUnit", 0x5003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagResolutionYLengthUnit", 0x5004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlags", 0x5005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsVersion", 0x5006)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsCrop", 0x5007)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsBleedWidth", 0x5008)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPrintFlagsBleedWidthScale", 0x5009)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneLPI", 0x500A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneLPIUnit", 0x500B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneDegree", 0x500C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneShape", 0x500D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneMisc", 0x500E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagHalftoneScreen", 0x500F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagJPEGQuality", 0x5010)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGridSize", 0x5011)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailFormat", 0x5012)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailWidth", 0x5013)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailHeight", 0x5014)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailColorDepth", 0x5015)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPlanes", 0x5016)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRawBytes", 0x5017)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSize", 0x5018)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCompressedSize", 0x5019)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagColorTransferFunction", 0x501A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailData", 0x501B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageWidth", 0x5020)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageHeight", 0x5021)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailBitsPerSample", 0x5022)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCompression", 0x5023)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPhotometricInterp", 0x5024)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailImageDescription", 0x5025)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailEquipMake", 0x5026)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailEquipModel", 0x5027)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailStripOffsets", 0x5028)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailOrientation", 0x5029)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSamplesPerPixel", 0x502A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRowsPerStrip", 0x502B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailStripBytesCount", 0x502C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionX", 0x502D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionY", 0x502E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPlanarConfig", 0x502F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailResolutionUnit", 0x5030)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailTransferFunction", 0x5031)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailSoftwareUsed", 0x5032)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailDateTime", 0x5033)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailArtist", 0x5034)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailWhitePoint", 0x5035)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailPrimaryChromaticities", 0x5036)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrCoefficients", 0x5037)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrSubsampling", 0x5038)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailYCbCrPositioning", 0x5039)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailRefBlackWhite", 0x503A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagThumbnailCopyRight", 0x503B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagLuminanceTable", 0x5090)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagChrominanceTable", 0x5091)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagFrameDelay", 0x5100)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagLoopCount", 0x5101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGlobalPalette", 0x5102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagIndexBackground", 0x5103)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagIndexTransparent", 0x5104)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelUnit", 0x5110)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelPerUnitX", 0x5111)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPixelPerUnitY", 0x5112)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagPaletteHistogram", 0x5113)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagCopyright", 0x8298)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureTime", 0x829A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFNumber", 0x829D)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifIFD", 0x8769)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagICCProfile", 0x8773)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureProg", 0x8822)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSpectralSense", 0x8824)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagGpsIFD", 0x8825)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifISOSpeed", 0x8827)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifOECF", 0x8828)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifVer", 0x9000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTOrig", 0x9003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTDigitized", 0x9004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCompConfig", 0x9101)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCompBPP", 0x9102)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifShutterSpeed", 0x9201)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifAperture", 0x9202)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifBrightness", 0x9203)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureBias", 0x9204)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMaxAperture", 0x9205)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSubjectDist", 0x9206)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMeteringMode", 0x9207)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifLightSource", 0x9208)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFlash", 0x9209)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalLength", 0x920A)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifMakerNote", 0x927C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifUserComment", 0x9286)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTSubsec", 0x9290)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTOrigSS", 0x9291)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifDTDigSS", 0x9292)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFPXVer", 0xA000)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifColorSpace", 0xA001)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifPixXDim", 0xA002)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifPixYDim", 0xA003)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifRelatedWav", 0xA004)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifInterop", 0xA005)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFlashEnergy", 0xA20B)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSpatialFR", 0xA20C)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalXRes", 0xA20E)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalYRes", 0xA20F)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFocalResUnit", 0xA210)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSubjectLoc", 0xA214)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifExposureIndex", 0xA215)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSensingMethod", 0xA217)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifFileSource", 0xA300)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifSceneType", 0xA301)
INSERT INTO crsProps (PropName, IDValue) VALUES("PropertyTagExifCfaPattern", 0xA302)
INDEX ON IDValue TO IDValue
ENDPROC
*************************
PROCEDURE retrievepropname
*************************
LPARAMETERS tnPropertyID
RE: VFP 6 - Getting at hidden picture information
However(!!), STREXTRACT() function does not exist in VFP6 so I have an error a new error.
Neil
I like work. It fascinates me. I can sit and look at it for hours...
RE: VFP 6 - Getting at hidden picture information
There is only one occurance of STREXTRACT and it seems rather useless to me, as the GetMemString() Procedure already cares to get rid off and limit the string to the delimiter CHR(0)...
Simply search for "CASE 2 ==" and replace the CASE with:
CODE
lvReturn = THIS.GetMemString(m.lnValuePtr, m.lnValueLen)
It's located in the GGetPropertyItem Function.
Bye, Olaf.
RE: VFP 6 - Getting at hidden picture information
This should be turned into an FAQ methinks, as it could be a useful tool to some.
Eric, you sorted now?
I like work. It fascinates me. I can sit and look at it for hours...
RE: VFP 6 - Getting at hidden picture information
Thanks for jumping in and sorting out the remaining problems with this. Great job and Star for you.
SweetPotato Software Website
My Blog
RE: VFP 6 - Getting at hidden picture information
Jolly well done -I certainly haven't given up on it - its just that we sleep at different times downunder.
Thank you so much for all the effort - to see the final result after 6 months of trying after I first got the idea is truly something.
Stars to all who have helped me. This is the best return I've had amongst the 'hundreds' of questions I have asked in this forum.
And could someone please make a FAQ to help others.
Eric
RE: VFP 6 - Getting at hidden picture information
I want to control the width of the two columns in the grid .
Anyone help?
Thanks Eric
RE: VFP 6 - Getting at hidden picture information
CODE
PROCEDURE fillpropertygrid
*************************
WITH THIS
.createpropertycursor()
.getimageproperties()
.grid1.RECORDSOURCE = "crsEXIF"
WITH .grid1.Column1
.Header1.Caption= 'EXIF'
.Header1.Backcolor= RGB(255,255,255)
.Header1.Forecolor = RGB(255,0,0)
.Header1.FontBold = .t.
.ReadOnly = .t.
.Backcolor= RGB(255,255,255)
.Forecolor = RGB(255,0,0)
.Width = 300
.FontBold = .t.
ENDWITH
WITH .grid1.Column2
.Header1.Caption= 'DATA'
.ReadOnly = .t.
.Width = 300
ENDWITH
.grid1.REFRESH()
* .grid1.AUTOFIT()
ENDWITH
ENDPROC
Thanks again everyone.
Eric
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.
Click Here to join Tek-Tips and talk with other members! Already a Member? Login