I am trying to resize an image to the screen size reported in PHP as follows:
$this->Image1->Height = $height1;
$this->Image1->Width = $width1;
$this->Label1->Caption = 'H = '.$height1;
$this->Label2->Caption = 'W = '.$width1;
eg on an iphone it report H= 480 & W = 320. I would expect the image size to fill the screen but appears smaller. What am I doing wrong here please?
Cheers
SteveW
July 19, 2009 02:23
support
Handset Detection
Hi Steve,
Are you using HTML and changing the display size in an image tag ? Or are you using something like php-gd to resize the image and output an image of new size.
Either approach would probably work.Just not sure which way you're going from the above code snippet.
Cheers
r
July 20, 2009 10:54
support
Handset Detection
I am using delphi for PHP. You add an image component and set parameters.
www.iw50.com/dt.php is the link.
On Iphone the detected screen size is correct but the image is wrong (smaller).
On blackberry 8310 the detected screen size is correct but the image is not stretched.
On a few windows mobile devices smartphone & pdas it works okay.
So we know the detection is correct
Any ideas why the errors?
July 20, 2009 20:49
support
Handset Detection
You might have to use the display/max_image_height and display/max_image_width parameters.
Cheers
r
Comments