Skip to content
Snippets Groups Projects
Commit e77b9eaa authored by freedesktop.mrbax's avatar freedesktop.mrbax Committed by Albert Astals Cid
Browse files

pdfimages: Account for rotation in PPI calculation

parent cab25772
No related branches found
No related tags found
No related merge requests found
Pipeline #249739 passed
......@@ -227,10 +227,10 @@ void ImageOutputDev::listImage(GfxState *state, Object *ref, Stream *str, int wi
}
const double *mat = state->getCTM();
double width2 = mat[0] + mat[2];
double height2 = mat[1] + mat[3];
double xppi = fabs(width * 72.0 / width2) + 0.5;
double yppi = fabs(height * 72.0 / height2) + 0.5;
double width2 = sqrt(mat[0] * mat[0] + mat[1] * mat[1]);
double height2 = sqrt(mat[2] * mat[2] + mat[3] * mat[3]);
double xppi = fabs(width * 72.0 / width2);
double yppi = fabs(height * 72.0 / height2);
if (xppi < 1.0)
printf("%5.3f ", xppi);
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment