image resolution

Find and share HowTos to various installations / configurations!
Search

Post Reply
7 posts • Page 1 of 1
User avatar
eMTy
Posts: 22
Joined: Wed Aug 17, 2011 3:33 pm

image resolution

Post by eMTy »

Hello guys,

are there any possiblities in WinCC OA, to get the resolution of an image? In particular JPGs and PNGs

kr
Michel

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: image resolution

Post by mkoller »

With resolution you mean the size (width x height) ?
If so, you can see this information in the preview tooltip when the image is hovered in the project tree in gedi.
If you mean from within CTRL, no, there's currently no function for that.
What's your usecase ?

User avatar
eMTy
Posts: 22
Joined: Wed Aug 17, 2011 3:33 pm

Re: image resolution

Post by eMTy »

Exactly, I mean the size. I would like to resize a panel and a rectangle to fit the size of the picture

User avatar
eMTy
Posts: 22
Joined: Wed Aug 17, 2011 3:33 pm

Re: image resolution

Post by eMTy »

Or is there a dll or something like that?

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: image resolution

Post by mkoller »

Do you know how to write and compile a Ctrl Extension ?
If so, download Qt4 opensource for your platform and use the QImage class, e.g.
QImage image(fileName);
image.width() and image.height() gives you the result.

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: image resolution

Post by mkoller »

Another idea: use ImageMagick's tool "identify" and call it via system() and parse the resulting output.
See http://www.imagemagick.org/script/identify.php

User avatar
eMTy
Posts: 22
Joined: Wed Aug 17, 2011 3:33 pm

Re: image resolution

Post by eMTy »

Thank you :)

Post Reply
7 posts • Page 1 of 1