JPEG QUALITY to Q=95 AND RES_CORRECTION#194
Open
titionex wants to merge 2 commits into
Open
Conversation
JPEG QUALITY to Q=95 AND RES_CORRECTION
Fix: move line to correct position
Contributor
|
Thanks for the PR. On the MPP point, the current implementation is correct when xres = 1.0 / (mpp * 1e-4)
yres = 1.0 / (mpp * 1e-4)Why:
So the correct conversion is: For example, if Using The JPEG quality change is a separate discussion, but the proposed MPP “fix” is not correct as written. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JPEG QUALITY to Q=95 AND RES_CORRECTION
This PR introduces two important fixes to the image conversion process in Converter.py:
JPEG Quality Enhancement: Forced JPEG compression quality to Q=95. The default behavior of 'tiffsave' uses Q=75, which can lead to excessive compression artifacts. Increasing this value ensures better image fidelity for large-scale processing.
Resolution Correction (MPP): Fixed a bug where the original MPP (Microns Per Pixel) was being incorrectly reduced by a factor of 10 (e.g., scaling
0.25
down to
0.025
). This fix ensures that the spatial metadata remains accurate and consistent with the original slide resolution.