LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-12-2005, 04:25 PM   #1
btb
LQ Newbie
 
Registered: Jun 2005
Posts: 20

Rep: Reputation: 0
getting image size (imagemagick)


hi all. I would like to get the dimensions (actually just width is good enough) for an image from the shell prompt.

"identify image.jpg" from imagemagick gives the critical information, but I want to write a batch script which is conditioned only on width. how can I find that out?

identify -size does'nt work for me either. :(

thanks for your help.
 
Old 08-12-2005, 05:09 PM   #2
btb
LQ Newbie
 
Registered: Jun 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Im sorry, I guess this should've gone in the newbie forum. I just can't figure out how to delete this post.
 
Old 08-12-2005, 05:55 PM   #3
jonthelam
Member
 
Registered: Jul 2004
Location: Southern California
Distribution: Slackware 10
Posts: 61

Rep: Reputation: 16
Try this:

Code:
identify -format "%f,%w,%h"
%f = filesize
%w = width
%h = height

There's more options if you need it. Find it here.

I think the ImageMagick forums might be a better place to post questions.
 
1 members found this post helpful.
Old 08-12-2005, 06:00 PM   #4
btb
LQ Newbie
 
Registered: Jun 2005
Posts: 20

Original Poster
Rep: Reputation: 0
thank you!
 
Old 10-15-2013, 01:32 PM   #5
m_pahlevanzadeh
Member
 
Registered: Sep 2002
Location: Iran/Tehran
Distribution: Debian
Posts: 94

Rep: Reputation: 28
You can use :
Code:
php -r "print_r(getimagesize('file:///archives/Picture/12 farvardin/20120331_013.jpg'));"
in command line,

Also you can replace
Code:
file://
with
Code:
http://
 
Old 10-15-2013, 01:44 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
m_pahlevanzadeh
you are aware that this thread is from 2005 .
right?
 
Old 10-15-2013, 02:39 PM   #7
m_pahlevanzadeh
Member
 
Registered: Sep 2002
Location: Iran/Tehran
Distribution: Debian
Posts: 94

Rep: Reputation: 28
Yes, i answered because when a person has this problem can solve from my solution.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Video 2 Image - ImageMagick For Videos ??? freebies Linux - Software 1 03-28-2005 03:17 PM
Resize Image using ImageMagick mddolloff Linux - Software 1 11-20-2004 05:07 PM
Centering text on an image using ImageMagick barisdemiray Linux - Software 2 09-20-2004 11:07 AM
Getting the fdisk size form an image maker3 Linux - General 2 12-03-2003 02:59 AM
Image size - when changing resolution Skyline Slackware 3 07-29-2003 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration