I'm not too sure about the location of PHP's temp folder (if any), but perhaps this isn't something you really want to look for considering you have no control over what is potentially in there or not.
I'm assuming you want to resize them, and then later on (different script perhaps) manipulate them.
Instead, do something like I did. I have a photo gallary on my site with thumbnails. My original pictures are 1600x1200 so they are quite large and resize them is a cpu intensive process (when repeated 100 times anyhow).
So what I do is cache any images I've resized. So the next time a request is made I verify the cache first and if exists I read them from there rather than perform the resize operation a 2nd time.
# Check to see if resized picture already exists in cache
if (file_exists($cache_file_name))
{
# If in cache, create $pic directly from it
$pic= ImageCreateFromJPEG($cache_file_name);
} else {
# otherwise load and manipulate image here ($pic)
$pic = ImageCreateFromJPEG($original_file_name);
# This creates the cached file for later potential use
ImageJPEG($pic,$cache_file_name, $quality);
}
# Output same picture to browser
ImageJPEG($pic,"", $quality);
So the next time it's accessed it'll be picked up from the cache already modified which is considerably faster.
Let me know if I'm completly off 😃