All,
I have the following code that works good:

$contents = file_get_contents( $picbigid[$i] );
$bytesWritten = file_put_contents( $saveLocation . basename($picbigid[$i]) , $contents );

This gets the original image size of the image. Is there anyway to still use file_put_contents and just resize it to 100x100 without doing an imagecreatefromjpeg etc?

Thanks for the help in advance!

    treeleaf20;10935654 wrote:

    Is there anyway to still use file_put_contents and just resize it to 100x100 without doing an imagecreatefromjpeg etc?

    no.

      You have to use GD functions to get the image dimensions. The functions you use above only look at the filesize of a file, without understanding what is in the file. Just like you'd need to use a PDF library to determine the number of pages in a PDF file, you have to resort to graphics functions to determine the dimensions of an image. You could use GD, or exec out to the shell and use ImageMagick functions, but either way you have to use functions built specifically for this sort of thing.

        Write a Reply...