The title says it all. Basically, is there a simple way to get the height and width of an existing image?
MivaScript has gdImageSX and gdImageSY, but they don't work on saved image files; they only take the pointer to a new image being created.
Which means a bit of overhead:
1) Figure out what format the original image is in; JPG, GIF, PNG, etc
2) Call the correct gdImageCreateFrom*() using the filename as source
3) Do gdImageSY and SY on the new image and save the values
4) gdImageDestroy
Is there a more direct method?
MivaScript has gdImageSX and gdImageSY, but they don't work on saved image files; they only take the pointer to a new image being created.
Which means a bit of overhead:
1) Figure out what format the original image is in; JPG, GIF, PNG, etc
2) Call the correct gdImageCreateFrom*() using the filename as source
3) Do gdImageSY and SY on the new image and save the values
4) gdImageDestroy
Is there a more direct method?
Comment