Dim image as new PdfBitmap("c:\temp\20180810.jpg")
Dim iwidth as Single = image.Width
Dim iheight as Single = image.Height
But the weird thing is I found it read the image width as the height and read the image height as the width, then when I draw the image on pdf, it rotate the image 90 degree. Not every image file it read like that, only a few jpg files cause this problem, but it is really annoying as clients complained why their image being rotated.
Please find the attachment is the that image file. Can you shed me a light?
KCKarthikeyan Chandrasekar Syncfusion Team November 26, 2018 06:55 AM
We have tried the sample to insert image into PDF with the provided image file. We were able to view the wrong image dimension. This behavior occurs because, some Bitmap objects does not take into account the EXIF Orientation tag. The EXIF (Exchangeable Image File Format) standard specifies some set of tags that can be embedded in images. One of these tags specifies the orientation of the image. If it does take into the account, the image get rotated. This behavior will be reproduced even in System.Diagram.Bitmap. However, we have created the sample to draw the image properly to PDF page without any rotation. Please find the sample for the same from below location,