Jump to content

UDF: ImageGetInfo


Lazycat
 Share

Recommended Posts

This UDF is compilation of my previous image UDF's. Regardless of this fact, it's faster because was fully rewrited using DllStruct functions (they are great!) and API read functions. UDF get most usefull information about graphic files - size, color depth, resolution etc. For JPEG files it also retreive various Exif info.

Changes from previous versions:

+ Faster

+ More info about other formats (instead only size).

+ Exif parser seems correct now, so it works fine with the edited images.

+ Much more Exif info retreived.

- Works only with Beta (DllStruct)

Probably it need more error checks, but I think it stable enough. Functionality enough for me and probably most folks, who want use it. Now I'm too bored and not plan make any serious changes until Autoit got native binary handling (if this sometime will be). But feel free to mention about bugs - they are here certainly.

Edit (2007-07-25): updated version to work with latest Autoit.

Edit (2009-01-12): updated attached file to 2.5 version.

Edit (2010-03-18): updated attached file to 2.6 version.

Edit (2010-04-29): updated attached file to 2.7 version.

Edit (2010-10-08): updated attached file to 2.8 version.

image_get_info.zip

image_get_info_30.zip

Edited by Lazycat
Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Neat.

The other info I would like is if the file is a paletted file (bit depth < 24) then retrieve the color palette table.

I wrote some code a little while back to do this for GIFs, I'll see if I can dig it up...

Link to comment
Share on other sites

Neat.

The other info I would like is if the file is a paletted file (bit depth < 24) then retrieve the color palette table.

I wrote some code a little while back to do this for GIFs, I'll see if I can dig it up...

<{POST_SNAPBACK}>

Found it:

http://www.autoitscript.com/forum/index.ph...color++palette#

Link to comment
Share on other sites

i get the following errors.

C:\ImageInfo\image_get_info.au3(48,109) : ERROR: DllStructGetPtr(): undefined function.

$t = DllStructCreate("int;int;short;short;dword;dword;dword;dword, DllStructGetPtr($p, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~^

C:\ImageInfo\image_get_info.au3(48,115) : ERROR: DllStructCreate(): undefined function.

$t = DllStructCreate("int;int;short;short;dword;dword;dword;dword, DllStructGetPtr($p, 1) + 18)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~^

C:\ImageInfo\image_get_info.au3(49,65) : ERROR: DllStructGetData(): undefined function.

_Add($sInfo, "Width, DllStructGetData($t, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\ImageInfo\image_get_info.au3(76,23) : ERROR: DllStructDelete(): undefined function.

DllStructDelete($p)

~~~~~~~~~~~~~~~~~~~~~~^

C:\ImageInfo\image_get_info.au3(133,31) : ERROR: DllStructGetSize(): undefined function.

If DllStructGetSize($t)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\ImageInfo\image_get_info_example.au3 - 5 error(s), 0 warning(s)

>AU3Check Ended.

Link to comment
Share on other sites

  • 7 months later...

Being fresh new to autoIt I encounter the same problem each time and can't figure out what I am doing wrong. Simply, demos and examples don't work for me and I get errors all the time. For example, I tried this "image_get_info_example.au3" (using Beta+XP) after puting a second copy of "image_get_info.au3" in "C:\Program Files\AutoIt3\beta\Include" and compiles it. I get error.

Please help

Thank you

Tuk

Edited by Tukata
Link to comment
Share on other sites

  • 1 month later...

This UDF is compilation of my previous image UDF's. Regardless of this fact, it's faster because was fully rewrited using DllStruct functions (they are great!) and API read functions. UDF get most usefull information about graphic files - size, color depth, resolution etc. For JPEG files it also retreive various Exif info.

Changes from previous versions:

+ Faster

+ More info about other formats (instead only size).

+ Exif parser seems correct now, so it works fine with the edited images.

+ Much more Exif info retreived.

- Works only with Beta (DllStruct)

Probably it need more error checks, but I think it stable enough. Functionality enough for me and probably most folks, who want use it. Now I'm too bored and not plan make any serious changes until Autoit got native binary handling (if this sometime will be). But feel free to mention about bugs - they are here certainly.

Hi,

jpg images are only returning x & Y resolution and resolution unit. Gif images are returning information fine. I downloaded the latest udf from the last link.

Any ideas?

[edit]

tif images are fine also

[/edit]

Edited by billmez
Link to comment
Share on other sites

wow, me likey.

It tells me all my cam stats cool

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...