Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1564 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

How to read the firsts bytes of png,jpg and jpeg and get the height/width

Thread title: How to read the firsts bytes of png,jpg and jpeg and get the height/width
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
07-12-2010, 10:59 PM
#3
free-designer is offline free-designer
Status: Junior Member
Join date: Jun 2009
Location:
Expertise:
Software:
 
Posts: 98
iTrader: 0 / 0%
 

free-designer is on a distinguished road

  Old

Originally Posted by santa View Post
getimagesize() is probably the best way to go around finding an image's size.

You ever going to use this forum for anything OTHER than asking questions?
Thanks for you comment, but is there any law of talkfreelance sayting that i shouldn't always ask????

Originally Posted by Salathe View Post
To confirm santa's suggestion, getimagesize() does exactly what you're looking for and will likely be as fast as you can get for doing this task.

The underlying C code for the function (for the common image types) literally reads the first few bytes of the file for the required width/height information; you can't get much more streamlined than that.
well i guess it's true, thanks salathe.


MOD note: merged

Reply With Quote
     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed