Re: [PHP] Imagejpeg and image size question

2004-02-12 Thread Tom Rogers
Hi,

Tuesday, February 10, 2004, 9:50:20 PM, you wrote:
J> Hi,
J> I am new to manipulating JPGs using PHP. But i managed to create an
J> application that displays an JPG image in the browser (see below).

J> I have boiled the code down to the most nesesary.

J> My problem is that when i load the file "c:\file.jpg" directly in the
J> IE browser (using ), and then get properties on the
J> image by
J> right clicking in the browser. the size is the same as it is on the HD
J> (83Kb).

J> However when i use the PHP code and get properties on the image by
J> right clicking in the browser. the image size is 264Kb.

J> How come the picture is bigger when loaded trough PHP as it is when
J> loaded trough the browser directly ?

J> best regards
J> John


J> <-generate_jpg_picture.php starts--->
J>   header("Content-type: image/jpeg", true);
J>  $path = $_GET['filepath'];
J>  $im = imagecreatefromjpeg($path);
J>  Imagejpeg($im, '', 100);
J>  ImageDestroy($im);
?>>
J> <-generate_jpg_picture.php ends--->
J> <-some_file.php starts--->
J> 
J> 
J> PHP Test
J> 
J> 
J>  
J>  
J> 
J> 
J> <-some_file.php ends--->


Because you are sending it at 100% quality which is no compression, try
backing it off to 30%. Probably the original was not at 100% quality
anyway.

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Imagejpeg and image size question

2004-02-12 Thread John
Hi,
I am new to manipulating JPGs using PHP. But i managed to create an
application that displays an JPG image in the browser (see below).

I have boiled the code down to the most nesesary.

My problem is that when i load the file "c:\file.jpg" directly in the
IE browser (using ), and then get properties on the
image by
right clicking in the browser. the size is the same as it is on the HD
(83Kb).

However when i use the PHP code and get properties on the image by
right clicking in the browser. the image size is 264Kb.

How come the picture is bigger when loaded trough PHP as it is when
loaded trough the browser directly ?

best regards
John


<-generate_jpg_picture.php starts--->

<-generate_jpg_picture.php ends--->
<-some_file.php starts--->


PHP Test


 
 


<-some_file.php ends--->

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php