ailiboy / ebookdroid

Automatically exported from code.google.com/p/ebookdroid
0 stars 0 forks source link

Optimization for page crop #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, I got some optimization idea for page corp in ebookdroid.

As now, in ebookdroid, if a page need to be croped, the step is
1. decode this page
2. calculate the croppedBounds from the result of 1
3. use the calculated croppedBounds to decode this page again

So as we know, for every page, we need to decode twice.

Now I got a optimization idea is that

1. decode this page
2. calculate the croppedBounds 
3. use the CroppedBounds to drawBitmap directly, with setFilterBitmap to be 
true.

We will decrease the decode times for each page.

Original issue reported on code.google.com by coolspac...@gmail.com on 28 Jan 2012 at 4:23

GoogleCodeExporter commented 9 years ago
I tried this. Awful result. I prefer to wait one more second than read blurry 
image.

Original comment by Andrei.K...@gmail.com on 28 Jan 2012 at 5:42

GoogleCodeExporter commented 9 years ago
Have you tried to paint.setFilterBitmap(true)?

Original comment by coolspac...@gmail.com on 28 Jan 2012 at 5:52