Code review comment for lp:~victor-mireyev/simple-scan/484616

Revision history for this message
Victor Mireyev (greymouse2005) wrote :

As you can see, there are three important changes:
1) optional density parameter is added
2) n_written parameter is removed as it's trivially obtained via jpeg_data.length
3) Quality and density code is added
92+ info.set_quality (90);
93 + if (density != null)
94 + {
95 + info.density_unit = 1;
96 + info.X_density = (uint16) density;
97 + info.Y_density = (uint16) density;
98 + }

There are two reason for existance of JpegWriter class.

1) JPEG compression code doesn't use any nonstatic methods or properties of the Book class.
2) As JPEG compression code is used in both Book and Page classes, it shouldn't be duplicated.

Do you propose make compress_jpeg method static?

« Back to merge proposal