Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to get original image quality and resolution (e.g. no editing would give us output with W x H same as the original image) #84 #86

Open
ramtinq opened this issue Mar 9, 2023 · 2 comments

Comments

@ramtinq
Copy link

ramtinq commented Mar 9, 2023

I'm adding this again since it was relevant but just got closed without any answers.

I want to not lose image quality when cropping, so that, for example when someone selects the left half of the image as their crop area, and the original image was 3000x1000 pixels, they would get 1500x1000 pixels as their output, with same quality. Does correctly choosing pixelRatio do the job?

I have seen that one can raise pixelRatio as much as they want, and the output image could have more width and height than the original height.

regarding this:
#84 (comment)

I don't want to resize image! The package does it!

Just open an image with this package, do no editing at all, get the output from the controller.crop(pixelRatio: MediaQuery.of(context).devicePixelRatio), the original width and height are changed.

So, of course it depends on setting the right value for pixelRatio and I want to know how can it be calculated so there would be no resolution loss in the output if no cropping has happened (or, naturally, if the image is cropped with half width and full height, the output would have a width of originalImage.width / 2 pixels and the height of originalImage.height pixels.

This question is not unrelated at all!

@xclud
Copy link
Owner

xclud commented Mar 10, 2023

Please let me investigate this. I will write here.

@ramtinq
Copy link
Author

ramtinq commented Jul 10, 2023

Any update on this? @xclud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants