Getting the image size?

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Is there a way to get the size of an image in my folder? I need both the height & width in pixels.

Thanks.
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
786
Баллы
113
use imagemagic
convert infle -ping -format "%w" info:
or c#
var size = System.Drawing.Image.FromFile(filepath).Size;
 
  • Спасибо
Реакции: peter и shabbysquire

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Thank you LW. More tricks to get the job done!
 

qlwik

Client
Регистрация
03.04.2013
Сообщения
207
Благодарностей
5
Баллы
18
how can I put var size from c to zennoposter variable?
 

qlwik

Client
Регистрация
03.04.2013
Сообщения
207
Благодарностей
5
Баллы
18
ok got it just add in c code:
return size;
 
  • Спасибо
Реакции: rostonix

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)