Hi, Sunday, April 6, 2003, 2:51:36 PM, you wrote: Dd> <snip from "Andrew Brampton" [EMAIL PROTECTED]> Dd> You can use getimagesize on a jpg file to read its size, so either Dd> save the jpg in MySQL to a file and then do a getImageSize, or before you place the jpg in to the database read its size and store its dimensions with it in the db. Dd> </>
Dd> I disagree with Andrew. In my humble opinion, I don't think you need to duplicate information. Before you decide, have a better viewing of the problem. Dd> Not a good solution for me. Dd> I know little about JPEG files, but I know they have a HEADER. This header may contain the value (binary, o' course) you need, and even more info than you think. :) So, search a for JPG file's Dd> spec before you continue. Very easy to find. Dd> After you know about the files you work with, you have to know how to tell PHP to do what you want to do. I am not a good person to tell you that, as I am such a newbie to PHP. I can only tell Dd> that this would be "pisso chocka cake" in assembly. (VERY VERY easy =) Dd> <snip from "Phil Schwarzmann" [EMAIL PROTECTED]> Dd> I have JPG files stored as binary in a MySQL database. I am Dd> displaying the JPGs on the screen and also want to know the height (in pixels) of the JPG. Dd> </> Dd> Another solution would be if PHP *already* has integrated processing of JPG files, wich maybe true, judging by the intricate relation of PHP and internet, and JPG being this commom. I think a Dd> file extension wouldn't stand in the way (wich I think is what you, Phil, meant by "stored as binary" - no extension) Just check that. Dd> Also, Phil, snipets of the code you use, help you and us much better. Dd> Regards, Dd> -- Dd> __________________________________________________________ Dd> Sign-up for your own FREE Personalized E-mail at Mail.com Dd> http://www.mail.com/?sr=signup You will find it much easier to store the size info at the time of upload than dicking around with binary files. In fact I would store the whole serialized array that is returned by getimagesize() so all info would be available later. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php