Regrettably, we don't have any macro for returning the image size as we are using query string parameters to manipulate the images.
But you still have an option to create Custom macro in your transformation here.
Within the custom macro, you can query CMS_Attachment table and get AttachmentImageWidth and AttachmentImageHeight properties. and return then back, you could even separate them into two macro methods so you could do each individually