php & gd
- From: "ctclibby" <hogger@xxxxxxxxxxxxx>
- Date: 28 May 2006 16:12:31 -0700
Hi all
I seem to be having crainum gas and need some assistance.
PHP 5.0.5,
gd 2.0.33-2 ( rpm ),
In manipulating images, I allow authenticated users access to upload
images for later viewing. If you upload a 640x480, php creates a
thumbnail automatically ( 128x92 ) and saves in a suitable spot.
Now here is the problem: If before I upload an image I decide since it
was shot landscape and I rotate it 90 degrees then save it, when the
thumbnail is viewed on the web site, you see elongated image material.
If you view the image ( not the thumbnail ) everything is OkieDokie.
Thumbnail : http://www.wishingwellfarm.com/SearchPix.php?GoatID=10
click on the image to see the big version. This is a cropped image...
If you remember correctly, if an image is wider than tall, it is
considered 'landscape'. Ok, so I suppose that you *could* landscape
anything, but in this case:
if ( ( $width/$height) >= 1 ) {
# We are landscape, so image is ... normal
$ThumbWidth = 128;
$ThumbHeight = 92;
} else {
# We are portrait, make it taller than wider.
$ThumbWidth = 92;
$ThumbHeight = 128;
};
I guess that I am asking how to tell the difference between a rotated
original and a original original?
thanks
todh
.
- Prev by Date: Re: How do I download and edit a website?
- Next by Date: Re: PHP, sendmail, and mail() - VERY SLOW - please help
- Previous by thread: How do I download and edit a website?
- Next by thread: I need help deciding on what php forum software is best...
- Index(es):
Relevant Pages
|