Skip to content

How to preserve the DPI of cropped images? #971

Answered by fengyuanchen
IB21-A asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to print an image with 240x2400px (150DPI), you can crop an image with 500x500px (72 DPI):

const ratio = 150 / 72;
const targetSize = 240;
const sourceSize = targetSize * ratio; // 500

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IB21-A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants