summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_editimg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_editimg.cpp')
-rw-r--r--fpdfsdk/fpdf_editimg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/fpdf_editimg.cpp b/fpdfsdk/fpdf_editimg.cpp
index a062990afe..04d7af0f41 100644
--- a/fpdfsdk/fpdf_editimg.cpp
+++ b/fpdfsdk/fpdf_editimg.cpp
@@ -298,8 +298,8 @@ FPDFImageObj_GetImageMetadata(FPDF_PAGEOBJECT image_object,
metadata->width = nPixelWidth;
metadata->height = nPixelHeight;
- const float nWidth = pObj->m_Right - pObj->m_Left;
- const float nHeight = pObj->m_Top - pObj->m_Bottom;
+ const float nWidth = pObj->GetRect().Width();
+ const float nHeight = pObj->GetRect().Height();
constexpr int nPointsPerInch = 72;
if (nWidth != 0 && nHeight != 0) {
metadata->horizontal_dpi = nPixelWidth / nWidth * nPointsPerInch;