I have loaded an image from database to a variable named $image.
How can I get the width of the image while it is stored in the variable?
元数据变量包含图像数据。 当我储存图像时,我刚刚从温带读到数据库。
The accepted answer fulfills this question.
However, I am doing some resizing on the $im variable, so I need to reconvert it to string data, that can be done with the imagepng
function.