mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When rescaling images, take margins into account, unless input document is a comic
This commit is contained in:
parent
8d3631fc5d
commit
2495b1cc62
@ -235,7 +235,7 @@ class SonyReaderOutput(OutputProfile):
|
|||||||
description = _('This profile is intended for the SONY PRS line. '
|
description = _('This profile is intended for the SONY PRS line. '
|
||||||
'The 500/505/600/700 etc.')
|
'The 500/505/600/700 etc.')
|
||||||
|
|
||||||
screen_size = (584, 775)
|
screen_size = (600, 775)
|
||||||
dpi = 168.451
|
dpi = 168.451
|
||||||
fbase = 12
|
fbase = 12
|
||||||
fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24]
|
fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24]
|
||||||
|
@ -786,6 +786,7 @@ OptionRecommendation(name='timestamp',
|
|||||||
self.oeb = create_oebbook(self.log, self.oeb, self.opts,
|
self.oeb = create_oebbook(self.log, self.oeb, self.opts,
|
||||||
self.input_plugin)
|
self.input_plugin)
|
||||||
self.input_plugin.postprocess_book(self.oeb, self.opts, self.log)
|
self.input_plugin.postprocess_book(self.oeb, self.opts, self.log)
|
||||||
|
self.opts.is_image_collection = self.input_plugin.is_image_collection
|
||||||
pr = CompositeProgressReporter(0.34, 0.67, self.ui_reporter)
|
pr = CompositeProgressReporter(0.34, 0.67, self.ui_reporter)
|
||||||
self.flush()
|
self.flush()
|
||||||
if self.opts.debug_pipeline is not None:
|
if self.opts.debug_pipeline is not None:
|
||||||
|
@ -29,6 +29,9 @@ class RescaleImages(object):
|
|||||||
|
|
||||||
|
|
||||||
page_width, page_height = self.opts.dest.width, self.opts.dest.height
|
page_width, page_height = self.opts.dest.width, self.opts.dest.height
|
||||||
|
if not self.opts.is_image_collection:
|
||||||
|
page_width -= (self.opts.margin_left + self.opts.margin_right) * self.opts.dest.dpi/72.
|
||||||
|
page_height -= (self.opts.margin_top + self.opts.margin_bottom) * self.opts.dest.dpi/72.
|
||||||
for item in self.oeb.manifest:
|
for item in self.oeb.manifest:
|
||||||
if item.media_type.startswith('image'):
|
if item.media_type.startswith('image'):
|
||||||
raw = item.data
|
raw = item.data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user