Search:
Calendar:
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Subscribe:
Archives By Subject:
Adobe (33) [RSS]
AIR (7) [RSS]
Ajax (3) [RSS]
Buzzword (1) [RSS]
CFUG (42) [RSS]
ColdFusion (70) [RSS]
Flash (6) [RSS]
Flex (40) [RSS]
Frameworks (3) [RSS]
Free Software (2) [RSS]
FXUG (22) [RSS]
General (35) [RSS]
JpgMetadataReader (3) [RSS]
jQuery (1) [RSS]
Mac (2) [RSS]
Off Topic (13) [RSS]
OpenSource (14) [RSS]
PaperVision (10) [RSS]
Spry (2) [RSS]
Transfer (1) [RSS]
Tags:
Recent Entries:
Top Posts:
- [19131] Paper Vision 3D Sphere - Carousels on Steroids!
- [11223] Simple Dynamic Cursor Example in Flex2: With source code
- [10710] Simple PaperVision3D Blurring example : source code
- [10699] Simple PaperVision3D Blurring example
- [10535] PaperVision3D/Flex2 Carousel v0.2
- [10320] Carousel v0.2 - source code
- [10320] Saving images from Flex using ColdFusion: Simple Example with source code
- [9850] PaperVision Carousel0.3 - one step closer to the master plan!
- [8471] PaperVision3D is good for cubes! - a "geek" gift
- [7862] Simple Effects on a Form - Flex Example
Recent Comments:
- PaperVision3D/Flex2 Carousel v0.2
Arindam said: http://www.citroen.co.uk/... see the above links how can I create this kind of slider? If ... [More] - Paper Vision 3D Sphere - Carousels on Steroids!
Reflexion Graphic said: Nice job ! [More] - Getting Red from my color
David said: @Promethe: Thanks for the comment. Jason uses that way too in his example. working with number as n... [More] - Getting Red from my color
Promethe said: guys... seriously: var myColor : uint = 0xef556ef; var myRed : uint = (myColor >> 16) & ... [More] - Getting Red from my color
David said: @Jason: Thanks for the example! I never like working with numbers-to-strings-to-numbers. I'll pull y... [More]
Top Commenters:
- [8] Campbell
- [8] Ben Nadel
- [6] Mark Flewellen
- [6] Steve Bryant
- [4] Raymond Camden
- [4] barry.b
- [3] John Whish
- [3] Peter Bell
- [2] Cory
- [2] carlos
My Links:
RSS:
Introducing JpgMetadataReader.cfc V0.2
Just when you think you are being clever, you find there is someone who has already been cleverer (is that a word?) than you!
I asked Mr Google about ColdFusion and EXIF and he told me about this: http://www.leavethatthingalone.com/blog/index.cfm/2006/5/16/Using-ColdFusion-to-Read-EXIF-Information-from-JPEGs
The same Java class was being used, but the really clever thing here is that you don't need to add that class to the lib dir/class paths in CF.
After reading this, and thinking how I plan to use my JpgMetadataReader.cfc, I have made to following changes:
- the init function now has the optional argument "JpegMetadataReader", which is "An instantiated object of com.drew.imaging.jpeg.JpegMetadataReader" (that's the hint) If you do not pass this in, it will attempt to create the java object, and if it is located in the lib/class path, you'll be fine :-)
- added the functions "getITPCKeys" and "setITPCKeys". These functions are used to define a comma delimited list of keys that MUST be returned in the result struct. The struct keys are inited with a value of "" (empty string) The default list is "Caption/Abstract,Keywords,Credit,Copyright Notice,Object Name" and is dirived from http://www.controlledvocabulary.com/imagedatabases/iptc_naa.html#IPTCchart
- added the optional argument "type" to "getMetaDataStruct". This will return only the type of meta data you specify. eg:
So, enough info, now for some code:
...code here to create the java object...
eg:
MyJpegMetadataReaderJavaObject = loader.create("com.drew.imaging.jpeg.JpegMetadataReader");
...if you are using Mark Mandle's Java loader (http://javaloader.riaforge.org/)
--->
<cfset oMetaData = createObject("component","org.harris.JpgMetadataReader").init(MyJpegMetadataReaderJavaObject)>
<cfset stMetaData = oMetaData.getMetaDataStruct("c:\my\picture\here.jpg")>
<cfdump var="#stMetaData#">
The only difference here from the initial code snippet is that I have provided the Java class "com.drew.imaging.jpeg.JpegMetadataReader" in the variable "MyJpegMetadataReaderJavaObject"
What is really cool about the JavaLoader is that you can load ANY java class!
Enjoy!

There are no comments for this entry.
[Add Comment]