#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13

    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. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,270
    Rep Power
    968
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    thanks alot, i'll look into the cfx tag.

    later
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    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
  8. #5
  9. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,270
    Rep Power
    968
    Actually cfx_image may not work with CFMX. How about trying this tag, cfx_imageInfo:

    http://www.cfmcentral.com/gallery/de...m?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/...ai_images.html
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    wow thanks, i'll check it out.

    later
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    i still get "Unable to load library" with cfx_ImageInfo. what am i doing wrong here? thanks!

    later
  14. #8
  15. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,270
    Rep Power
    968
    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.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    thanks alot for the help. i'll continue to look around for some info on how to install this tag.


    later
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Netherlands
    Posts
    99
    Rep Power
    12
    - 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*]
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    - Did you register the tag in CF Administrator?
    yes, i did that.

    - Is ColdFusion allowed to access the directory where the image-info-library is installed?
    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
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Netherlands
    Posts
    99
    Rep Power
    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!
    ** 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*]
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    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
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Netherlands
    Posts
    99
    Rep Power
    12
    Keep in mind that a DLL is a Windows Dynamic Link Library... But normally that's all you need to do...
    ** 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*]
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Summervile, SC
    Posts
    115
    Rep Power
    13
    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

IMN logo majestic logo threadwatch logo seochat tools logo