Getting image properties


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Getting image properties
# 1  
Old 08-21-2006
Getting image properties

How can I get heigth and width of an image file?
It's possible to do without ImageMagick or other third libraries??

Thank you very much
# 2  
Old 08-21-2006
You will need to know the image file type, ie., jpeg or whatever.
Next, you need to find file format information on that file type over here:

http://www.wotsit.org

then develop code based on knowing the format to get the information you want.

IMO you are better off using a shared library that has already worked out all of the details, in this case, libjpeg.so.
# 3  
Old 08-21-2006
I built a program to do this once, which I called imgstat. It requires the SDL and SDL_image libraries, and supports whatever image types SDL_image is compiled with. If you're interested I can post the source.
# 4  
Old 08-21-2006
We are both sending you the same message: use libraries. Corona688 even has offered code - I'd go for it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

matching image files to create one image

Hi, I have two sets of image files. Both sets have names A to Z but set 1 ends with .cdt.png and set 2 ends with .matrix.png. I want set 1 to match with set 2 if the names match (i.e. A.cdt.png will match with A.matrix.png) and with the convert image tool (program for images), it will merge the... (6 Replies)
Discussion started by: kylle345
6 Replies

2. Shell Programming and Scripting

reading in properties file

Hi Am new to this scripting stuff so bear with me. I got a script made now that reads in a properties file. The properties file is in the following format: 256= Bos, Sea, FRa 128= HEL I want to be able to read in each line of the file and split out the letter fields by the numbered field. This... (2 Replies)
Discussion started by: vsekvsek
2 Replies

3. UNIX for Dummies Questions & Answers

File properties

Hi , I do have a line in my code as follows: if ] ; then ... else ... fi What does the -z does ? Similarly there is -s in some other part of the code. I guess there are many options like this.. Can anybody please tell what all options are available and what do they mean ? (2 Replies)
Discussion started by: risshanth
2 Replies

4. HP-UX

Depot file properties

Hi How can we identify the informations like Author, meta data, dependency and other information from a depot file? (1 Reply)
Discussion started by: sethumadhavan
1 Replies

5. Shell Programming and Scripting

Array Properties

Hi All, I have a code below but i have problems trying to execute "cat $jpg". Can anybody give me any advise? Is there something wrong with my syntax ? #!/bin/csh set qqq = 123 set www = 456 set jpg = ( $qqq $www ) cat $jpg Output: (2 Replies)
Discussion started by: Raynon
2 Replies

6. UNIX for Dummies Questions & Answers

properties for vi

Hi, I have a simple problem in vi of which I dont know the solution. I have a file of 2000 lines. But when I open the file in vi, it only displays 20 lines and I have to use ctrl-f to see next lines. How do change the screen settings in vi? I want to see screen full text. stty rows... (2 Replies)
Discussion started by: shriashishpatil
2 Replies

7. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

Hi, (HP-UX 11.11) I need to create a tape image of an igniteUX image created on our igniteUX server. That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies

8. UNIX for Dummies Questions & Answers

How do properties effect script?

Hi, I have noticed that rm -if will perform completely different to rm -fi. Whats the pattern of how I put my options to the script in relation to how it will act. i.e rm -fi treat the remove as interative but rm -if treats it as forced Thansk, Chris. (1 Reply)
Discussion started by: Chiefos
1 Replies

9. UNIX for Dummies Questions & Answers

Directory properties

I have set up php shop and it required command line access which i have I executed the install.pl script and everything went OK but when I tried to access the admin foler via the www @ www.helloni.co.uk/shophtml/admin/ i get a forbidden error. I know I have to change the attribs of the folder... (8 Replies)
Discussion started by: trekker
8 Replies
Login or Register to Ask a Question