Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 6 IPTC Digital Labelling 2

Status
Not open for further replies.

button71

Programmer
Nov 8, 2006
69
AU
Having been rewarded with VFP ode to access EXIF info and having incorporated that into my application I am now being asked about IPTC Info ( Irfanview et al allows this data to be written to a jpg file.)

Is there any code snippet out there to access the IPTC data?

Thanks

William
 
Code:
IPTC(ADDBS(Sys(5)+SYS(2003))+"test.jpg")

PROCEDURE IPTC
LPARAMETERS tcPicFullPath

oShell = CreateObject("Shell.Application")
oFolder = oShell.Namespace(JUSTPATH(tcPicFullPath))

WITH oFolder
  FOR Each cFile IN oFolder.Items
		
    IF UPPER(cFile.Name) <> UPPER(JUSTFNAME(tcPicFullPath))
      LOOP 
    ENDIF 
	
    FOR i = 0 TO 34
      ?.GetDetailsOf(oFolder.Items, i) + ": " + ;
         .GetDetailsOf(cFile, i)
    ENDFOR
  ENDFOR
ENDWITH
 
Brian,

With the above code I get the same information as with the Exif code. I am not sure if Exif is the same as ITPC.

Wiki descriptions appear different.

In Irfanview they are different.

Using your Exif code I get

File: - I:\IMAGESTORE\_BRYAN\2006\Brisbane 1\Brisbane 1001.JPG

Make - PENTAX Corporation
Model - PENTAX Optio S5i
Orientation - Top left
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
Software - Optio S5i Ver 1.00
DateTime - 2006:11:17 05:07:15
YCbCrPositioning - Centered
ExifOffset - 280
ExposureTime - 1/60 seconds
FNumber - 3.50
ISOSpeedRatings - 200
ExifVersion - 0220
DateTimeOriginal - 2006:11:17 05:07:15
DateTimeDigitized - 2006:11:17 05:07:15
ComponentsConfiguration - YCbCr
CompressedBitsPerPixel - 2.83 (bits/pixel)
ExposureBiasValue - 0.00
MaxApertureValue - F 2.64
MeteringMode - Multi-segment
Flash - Flash fired, auto mode
FocalLength - 10.20 mm
FlashPixVersion - 0100
ColorSpace - sRGB
ExifImageWidth - 2560
ExifImageHeight - 1920
InteroperabilityOffset - 33546
CustomRendered - Normal process
ExposureMode - Auto
White Balance - Auto
DigitalZoomRatio - 0.00/0.00 x
FocalLengthIn35mmFilm - 62 mm
SceneCaptureType - Landscape
Contrast - Normal
Saturation - Normal
Sharpness - Hard
SubjectDistanceRange - Distant view

Maker Note (Vendor): -
Mode - Night-scene
Quality - Better
ISO - 200
White Balance - Auto

Thumbnail: -
Compression - 6 (JPG)
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
JpegIFOffset - 33670
JpegIFByteCount - 8314

Which is shown under the Exif button in Irfanview.

The IPTC screen in Irfanview allows writing of

Copyright
Caption
Headline
etc

Using IrfanView I made some entries using the IPTC button dialogues and see, in a text editor, these entries at the head of the file but not in the Exif data listing .



Regards

William

 
Brian,

many thanks for that very interesting article.

Am I correct in saying that the previous VFP code can be modified to encompass those other values as it stands or would a new different routine be required to cover all items?

I am not capable of recoding the VB code to VFP.

Regards

William
 
I don't know. I'm interested in the concepts as I've been thinking of creating my own photo management application for personal use but I haven't actually done anything with it yet. I'm just a business/data guy in 'real life'. [smile]

Some (photo) related blogs can be found at
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top