Copy link to clipboard
Copied
Hello,
Is there a way to get the image resolution or dpi?
I have tried something like this:
<cfimage action="read" source="files/HK1002010-0849.jpg" name="myImage" />
<cfset exif = ImageGetEXIFMetadata(myImage) />
<cfdump var="#exif#" label="Exif Metadata">
<cfdump var="#myImage#" label="Exif Metadata">
<hr />
<cfoutput>
#ImageGetEXIFTag(myImage, "X Resolution")#
</cfoutput>
but it's shows 72 at all times, so also when an image is 300dpi, it shows 72.
Can someone help me?
Thanks!
Copy link to clipboard
Copied
http://www.leavethatthingalone.com/blog/index.cfm/2007/7/18/ColdFusion8_Exif_and_IPTC
<cfimage action="read" source="IMG_2479.JPG" name="myImage" />
<cfset exif = ImageGetEXIFMetadata(myImage) />
<cfdump var="#exif#" label="Exif Metadata">
Ken Ford
Copy link to clipboard
Copied
Hi Ken,
Thanks for your reply. That script is not working completly. It alway returns 72DPI, also on a 300DPI picture. I have bought a cfx tag to accomplish this.
I do have an other question. I want to open the file in Photoshop, while photshop is not the default program for JPG files. I have something like this:
<cfheader name="Content-Type" value="unknown">
<cfheader name="Content-Disposition" value="attachment; filename=#URL.File2Download#">
<cfcontent type="Application/photoshop" file="#application.serverPath#\files\#URL.File2Download#" deletefile="No">
which is not working. Can someone help me on this one?
Thanks!