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

Copy file if no cropping or rotation is required. #41

Merged
merged 1 commit into from
May 7, 2017

Conversation

arcmags
Copy link
Contributor

@arcmags arcmags commented May 7, 2017

Through testing it was discovered that jpegtran still modifies files when no cropping or rotation is given (0 pixels, 0 degrees). Using imagemagick to compare resulting reconstructed images pixel by pixel it was determined that no pixel values are actually changed by jpegtran in this case, however these images always grow in file size (minimally).

This commit fixes this by simply copying the target file if no cropping or rotating is required. I wasn't sure of the best way to implement this, but I think it makes sense output a file whenever a user clicks 'crop,' even if no crop pixels or rotation are given. If a user doesn't want to output a file, they can select 'skip,' instead.

@jepler jepler merged commit e8a88e5 into jepler:master May 7, 2017
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

Successfully merging this pull request may close these issues.

2 participants