Variables for image width and height

can somebody please help me, I want to get the width and height from a image and then pass them to a variable like H and W, this is for a VBscript for a buttom, thanks in advanced!

Off the top of my head I don't know of an easy way to do this unless of course you want to use the width and height values in a renaming operation. What is it you are trying to do?

Hello HATEEYES.
It's a problem i have faced some times ago, like many.
To watch pictures, I use IrfanView. the info command in the command lines gives you all the informations you need.
Just extract the variables from there.

You could do this in Opus by "abusing" the Rename Script feature. Rename Scripts can be written in VBScript (and Perl, etc.) and can be passed information like the image width or height. A script can do whatever it likes with the information passed to it and can choose not to actually rename any of the files.

Maybe it's strange to use Rename command to do something that isn't renaming, but it will work. :slight_smile:

[quote="leo"]You could do this in Opus by "abusing" the Rename Script feature. Rename Scripts can be written in VBScript (and Perl, etc.) and can be passed information like the image width or height. A script can do whatever it likes with the information passed to it and can choose not to actually rename any of the files.

Maybe it's strange to use Rename command to do something that isn't renaming, but it will work. :slight_smile:[/quote]

I think of use it, the big problem is the extraction of the information, I dont no how to do it, can you tell me how do this, please!. thanks

[quote="flytox"]Hello HATEEYES.
It's a problem i have faced some times ago, like many.
To watch pictures, I use IrfanView. the info command in the command lines gives you all the informations you need.
Just extract the variables from there.[/quote]

thats what I want to lear, how to extract the variables, can you help me here?

[quote="leo"]You could do this in Opus by "abusing" the Rename Script feature. Rename Scripts can be written in VBScript (and Perl, etc.) and can be passed information like the image width or height. A script can do whatever it likes with the information passed to it and can choose not to actually rename any of the files.

Maybe it's strange to use Rename command to do something that isn't renaming, but it will work. :slight_smile:[/quote]

I've turned my idea into a real example:
Copy IMG links to Clipboard with Width and Height

I've also written a separate post which explains the technique in detail with a simplified example:
"Abusing" Rename Scripts to do other things with file info

Enjoy! :slight_smile:

[quote="leo"][quote="leo"]You could do this in Opus by "abusing" the Rename Script feature. Rename Scripts can be written in VBScript (and Perl, etc.) and can be passed information like the image width or height. A script can do whatever it likes with the information passed to it and can choose not to actually rename any of the files.

Maybe it's strange to use Rename command to do something that isn't renaming, but it will work. :slight_smile:[/quote]

I've turned my idea into a real example:
Copy IMG links to Clipboard with Width and Height

I've also written a separate post which explains the technique in detail with a simplified example:
"Abusing" Rename Scripts to do other things with file info

Enjoy! :slight_smile:[/quote]

what I want to do, is to get the variables for the hight and width of the image, and with that, I want to compare them, if the width is > to the hight then show the visualitacion panel in horizontal (Set VIEWPANE=horiz) and if the hight is > than the wight then show it vertical (Set VIEWPANE=vert).

but I cant get it done, is this posible?, "abusing" of the renaming script!
thanks

the info command in irfanview command lines generate the textfile you need.
it appears like that:

[Capture 01.jpg]
File name = Capture 01.jpg
Directory = C:\Documents and Settings\Fly\My documents\Règlages divers\Macros
Compression = JPEG
Resolution = 96 x 96 DPI
Image dimensions = 401 x 344 Pixels
Print size = 10.6 x 9.1 cm; 4.2 x 3.6 inches
Color depth = 16,7 Millions (24 BitsPerPixel)
Number of unique colors = 969
Disk size = 99.34 KB (101 722 Bytes)
Current memory size = 404.51 KB (414 216 Bytes)
File date/time = 29/04/2008 / 20:03:38

Just extract the dimensions from the line:
Image dimensions = 401 x 344 Pixels

ok?

[quote="HATEEYES"]what I want to do, is to get the variables for the hight and width of the image, and with that, I want to compare them, if the width is > to the hight then show the visualitacion panel in horizontal (Set VIEWPANE=horiz) and if the hight is > than the wight then show it vertical (Set VIEWPANE=vert).

but I cant get it done, is this posible?, "abusing" of the renaming script!
thanks[/quote]
Are you asking how to write a VBScript or how to get the information into a VBScript?