RE: imagecopyresampled question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I understand your problem correctly, you want to make
a thumbnail out of a subpart of a picture? Is this correct? 

In the case you just want to create a thumbnail of a picture
you might like to have a look at these functions:

 * exif_thumbnail()
 * getimagesize();

If you want to create a thumbnail out of a subpart, then I am
(in my\ very limited knowledge) not aware of an extraction
function, you need to do that your self. If so, get the size
and location information from the picture open the picture and
read the data and spool the sub picture out to a new image file
(with a new apropriate header), and then aplay texif_thumbnail()
on that file - this is much easier said than done.

On how to read&write an image file, you might have alook at:

* http://netghost.narod.ru/gff/graphics/book/ch08_01.htm

to teach you some of the basic stuff, it is mainly aimed for
C-programmes (read: real programmers :), but a skilled php
programmer should not have that much of a trouble to be able
to convert the code examples into php.


-----Original Message-----
From: Bobo Wieland
To: php-windows@lists.php.net
Sent: 2003-12-26 20:33
Subject:  imagecopyresampled question

Hi all and merry christmas (and a happy new year)!

I use fixed values in this example, but of course it is variables in my
script...

Let's say I have an image uploaded to the server: 650x400px...
Now, I've selected a square out of this image using a flash app that
returns
the coordinates i've selected. The coordinates are:
start_x:    100px;
start_y:    120px;
end_x:     300px; (or width:200px;)
end_y:     350px; (or height:200px;)

No I need to use php to take this square out of the uploaded image and
make it a 50x50px thumbnail. How should it be done?


thanks for your help!

.bobo

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

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux