|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
getting image attributes....
is there anyway to grab the HEIGHT and WIDTH attributes of an image? and dump them into a variable?
thanks! later |
|
#2
|
|||
|
|||
|
There is no way to do this natively in CF. However, there is the cfx_image tag which I believe does this, and is also free I believe. And if you are using CFMX, you can of course invoke any of the Java API classes for image manipulation.
|
|
#3
|
|||
|
|||
|
thanks alot, i'll look into the cfx tag.
later |
|
#4
|
|||
|
|||
|
hmm, i grabbed the tag, and i thought i installed it correctly, but when i run the page that i'm using the tag on, i get "Unable to load library". i'm running CF MX 6.1, on RedHat Linux 7.2. thanks people!!
later |
|
#5
|
|||
|
|||
|
Actually cfx_image may not work with CFMX. How about trying this tag, cfx_imageInfo:
http://www.cfmcentral.com/gallery/d...fm?script_ID=52 If you want to try, you can also do this through the Java Imaging API but it would take more work I think: http://www.macromedia.com/devnet/mx...jai_images.html |
|
#6
|
|||
|
|||
|
wow thanks, i'll check it out.
later |
|
#7
|
|||
|
|||
|
i still get "Unable to load library" with cfx_ImageInfo. what am i doing wrong here? thanks!
later |
|
#8
|
|||
|
|||
|
Honestly I'm not sure, I don't often use CFX tags, and have never messed with CFMX under Linux. Anyone else have any ideas?
One other option is that with one of the Macromedia Developer Resource Kits, they have created a CFC wrapper for calls to the Java Imaging API. I think it would cost about $50 or $100 to get it that way, but at least it should be guaranteed to work because it's directly using the Java API. |
|
#9
|
|||
|
|||
|
thanks alot for the help. i'll continue to look around for some info on how to install this tag.
later |
|
#10
|
|||
|
|||
|
- Did you register the tag in CF Administrator?
- Is ColdFusion allowed to access the directory where the image-info-library is installed?
__________________
** Don't expect me to code your needs, but if I am able to help, I'm willing. Shout, grab and use the hand! ** Man can no more own the land we walk upon, as they can lay claim on the air that we breath ** DeepDown I'm addicted to structures.... ohw and music ![]() ** Almost forgot I had an account here [*o*] |
|
#11
|
||||
|
||||
|
Quote:
yes, i did that. Quote:
i'm not sure. what/where is the image-info-library? i don't see why it wouldn't be able to access it. thanks! later |
|
#12
|
|||
|
|||
|
I don't know how this works on Linux though...
... but in Window it works like this: First of all: you should know where the library resides, since you registered the tag in CF-Administrator ... So you have an ImageInfo.dll (on linux it's probably ImageInfo.so) located somewhere on the server's filesystem, but if ColdFusion is not allowed to access the directory where that DLL (so) is located, the library will fail to load... I tend to put all the custom tags I use, under the <cf_root>/CustomTags to avoid these problems... Hope that helps you out! |
|
#13
|
|||
|
|||
|
so all you have to do is put your *.dll in a folder, then register it in cf admin? no other files need to be on the server, just the dll?
maybe i'll move the dll and re-regster it. thanks! later |
|
#14
|
|||
|
|||
|
Keep in mind that a DLL is a Windows Dynamic Link Library... But normally that's all you need to do...
|
|
#15
|
|||
|
|||
|
yeah, we just migrated to a new WinServer2K3 machine, i'll try this again in a few days probably.... i'll post the outcome.
thanks for all the help people. later |