simon-knuth / scanner

An all-in-one scanner app built for the Universal Windows Platform

Home Page:https://simon-knuth.github.io/scanner/index

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regression? v3.0 produces huge JPG file again

EdiWang opened this issue · comments

Describe the bug
The JPG is incorrectly encoded result to huge file size.

To Reproduce

  1. Select "JPG" in "Save as"
  2. Scan a document
  3. Observe the file
  4. The file is incorrectly encoded

Expected behavior
The file should be small size with JPG encoding

Screenshots
image

image

It seems to be a regression bug that I've fixed in v2 via #39

The bug was because in v3.0, this code is forgetting apply the correct JPG encoder option

image

commented

Hi there, I'm sorry this bug made another appearance - thank you very much for fixing it once again! I've wrapped all BitmapEncoder.CreateAsync()s in a new function so this shouldn't ever happen again.

As a side effect files may be a little too compressed right now (e.g. when further editing an already compressed file), which I'll check later.