Disabled cropping and page number cutting for blank pages (close #43)

This commit is contained in:
Paweł Jastrzębski committed 2013-05-28 12:07:45 +02:00
1 parent 28dcab8ee8
commit 0b90af77da
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -178,6 +178,7 @@ The app relies and includes the following scripts/binaries:
* Kindle Fire support (color ePub/Mobi)
* Panel View support for horizontal content
* Fixed panel order for horizontal pages when --rotate is enabled
* Disabled cropping and page number cutting for blank pages
## COPYRIGHT
+3 -1
View File
@@ -20,7 +20,7 @@ __copyright__ = '2012-2013, Ciro Mattia Gonano <ciromattia@gmail.com>'
__docformat__ = 'restructuredtext en'
import os
from PIL import Image, ImageOps, ImageStat
from PIL import Image, ImageOps, ImageStat, ImageChops
class ImageFlags:
@@ -237,6 +237,7 @@ class ComicPage:
return None
def cutPageNumber(self):
if ImageChops.invert(self.image).getbbox() is not None:
widthImg, heightImg = self.image.size
delta = 2
diff = delta
@@ -290,6 +291,7 @@ class ComicPage:
return self.image
def cropWhiteSpace(self, threshold):
if ImageChops.invert(self.image).getbbox() is not None:
widthImg, heightImg = self.image.size
delta = 10
diff = delta