Image dimensions help please

addaitecaddaitec Member ✭✭

I've been banging my head on the keyboard for long enough so I'm asking for some help. I have a XF app (iOS, android, and UWP) where the user takes some pictures or pick from the gallery and I store the full filepath locally. Then, I generate a word doc with OpenXML and include all the pictures. That part is all working. I used the code from Microsoft on inserting the image here: https://docs.microsoft.com/en-us/office/open-xml/how-to-insert-a-picture-into-a-word-processing-document . But, that sample hard codes the height and width, skewing my images. So I need to get the dimension of the original image and pass them in. This is seemingly way too difficult. I'm using FFImageLoading and Plugin.Media and have seen some others with similar issues, but none of those solutions seem to work for me. Anyone have a more straight forward way to get the height and width of an image starting from the full filepath? I'm still relatively new to XF development so i'm hoping I'm just missing some simple method call or something.

Sign In or Register to comment.