Skip to content

NovelTool is a novel/ebook(Mainly Japanese novels) reading and conversion tool, written in .Net Framework 4.8, which can convert ebooks into image files in another font size.

Notifications You must be signed in to change notification settings

avan06/NovelTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NovelTool

NovelTool is a novel/ebook(Mainly Japanese novels) reading and conversion tool, written in .Net Framework 4.8, which can convert ebooks into image files in another font size.

Table of Contents

TOC generated by markdown-toc

Building

  • Open NovelTool.sln with Visual Studio(Community also available) and built with .Net Framework 4.8.

Supported file formats

  • Epub (*.epub)(Experimental feature)
    EPUB is an e-book file format that uses the ".epub" file extension. The term is short for electronic publication and is sometimes styled ePub.

  • Aozora (*.txt)(Experimental feature)
    Aozora Bunko (青空文庫, literally the "Blue Sky Library", also known as the "Open Air Library") is a Japanese digital library.

  • Text Image(*.bmp; *.jpg; *.gif; *.png)
    Novel eBook images or scanned image files.

Getting started

  1. Open the folder or zip(*zip; *.rar; .7z) of novel/eBook file(.epub; *.txt; *.bmp; *.jpg; *.gif; *.png;), analyze image content immediately, If you open the compressed format, it will be decompressed in the same directory.
  2. Wait for the analysis of the novel/eBook results to be completed.
  3. Maybe you need to change the option settings, when the analysis result is wrong. Re-analyze the novel/eBook file after changing settings.
  4. Now execute GenerateView from the toolbar to confirm the generated content.
  5. The size of the output text image can be changed.
  6. Execute save or save all to save the generated content as a new image file, and wait for a while depending on the number of pages generated.

NovelTool
GenerateView

Analysis Novel

  • Parse the novel/eBook image file sequentially from the vertical direction and detect the position of the text.
  • Analysis results can be viewed in the main window.
  • If there are analysis results in the illustration, you needs to be unchecked.

Generate View

  • In GenerateView, based on the analysis results, convert the image font size according to the specified output resolution.
  • Here are some built-in image filtering features, the more useful ones are Sharpen, the rest are just for testing.
  • Immediately view the results of changing image font size or filter options.
  • After confirming that the generation is correct, execute save (current page) or save all.

Option settings

Analysis

  1. AnalysisFactor

    • AnalysisTaskThreadLimit: Determines the maximum number of threads to perform analysis tasks (Default 2).
    • IgnoreMinDetectXSize: Decided to ignore left and right widths when detecting images (Default 3, if there is non-text content on the edge).
    • IgnoreMinDetectYSize: Decided to ignore top and bottom widths when detecting images (Default 3, if there is non-text content on the edge).
    • IgnoreBrightness: Determine the brightness value, when the brightness of the pixel exceeds this value, it is not detected, 1.0 represents white (Default 0.9).
    • IllustrationMinHeight: none
    • IllustrationMinWidth: none
  2. Rate

    • HeadMinRate: Determines the scale value of the header on the page from top to bottom (Default 0.1, Max 1).
    • FooterMinRate: Determines the scale value of the footer on the page from top to bottom (Default 0.95, Max 1).
    • IllustrationRate: none
    • EntityMinRate: Determines the scale value of the smallest text (rubi characters/ルビ) when the standard text scale is 1 (Default 0.6).
    • EntityMaxRate: Determines the scale value of the largest text (parsable as standard text) when the standard text scale is 1 (Default 1.2).
    • EntityAdjacentRate: Determines the minimum scale value that is immediately adjacent between two lines (Default 0.2, for example standard text and rubi characters).
    • EntityMergeTBMaxRate: Determines the scale value that can be merged into a one character, when a character is broken by wrong analysis (Default 1, for example 元, 二, 言...).
  3. Confirm

    • IllustrationMinColorsLevel: Determine the minimum number of colors for illustrations that can be detected as non-text (Default 2000, duplicate colors are not counted).
    • IllustrationMinNonWhiteLevel: Determine the minimum number of foreground colors for illustrations that can be detected as non-text (Default 800000).
    • WhiteLevel: Determines the color value detected as the background(white) color (Default 240).
    • HeadGap: Determines the minimum height of the top margin above the header (Default 15).
    • FooterGap: Determines the minimum height of the bottom margin below the footer (Default 15).
    • EntityHeadGap: This value is related to determining whether it is the first word of the line (Default 0).
    • EntityEndGap: This value is related to determining whether it is the end of the line (Default 0).

Rect View

  1. RectView

    • RectViewWidth: Determines the rendered Rect line width (Default 1).
  2. RectColor

    • RectHeadColor: Determines the rendered header Rect line color (Default DarkMagenta).
    • RectBodyColor: Determines the rendered body Rect line color (Default Coral).
    • RectFooterColor: Determines the rendered footer Rect line color (Default LightSkyBlue).
    • RectColumnColor: Determines the rendered column Rect line color (Default LightSkyBlue).
    • RectEntityBodyColor: Determines the rendered entity body Rect line color (Default Red).
    • RectColumnRubyColor: Determines the rendered column ruby Rect line color (Default MediumSpringGreen).
    • RectRubyColor: Determines the rendered ruby Rect line color (Default DarkGreen).
    • RectMergeTBColor: Determines the rendered mergeTB Rect line color (Default MediumOrchid).
    • RectMergeLRColor: Determines the rendered mergeLR Rect line color (Default Tomato).
    • RectSplitTopColor: Determines the rendered split top Rect line color (Default Gold).
    • RectSplitMiddleColor: Determines the rendered split middle Rect line color (Default RoyalBlue).
    • RectSplitBottomColor: Determines the rendered split bottom Rect line color (Default LightCoral).

Generate

  1. Output

    • OutputWidth: Determine the output width (Default 1200).
    • OutputHeight: Determine the output height (Default 1600).
    • OutputAdjustColorCheck: Determine whether to use ForeColorRate to adjust the contrast color when generating (Default false).
    • ForeColorRate: This value adjusts the contrast color when OutputAdjustColorCheck is enabled (Default 0.5, the range is 0~2).
    • OutputBackColor: Determines the output background color (Default White).
    • OutputForeColor: Determines the output foreground color (Default Black).
    • OutputImageType: Determine the output image type (Default Jpeg)(Jpeg, Png, Tiff, Bmp, Gif).
    • OutputPixelFormat: Determine the output Pixel format (Default DontCare)(DontCare, Indexed, Gdi, Alpha, PAlpha, Extended, Canonical, Format1bppIndexed, Format4bppIndexed, Format8bppIndexed, Format16bppGrayScale, Format16bppRgb555, Format16bppRgb565, Format16bppArgb1555, Format24bppRgb, Format32bppRgb, Format32bppArgb, Format32bppPArgb, Format48bppRgb, Format64bppArgb, Format64bppPArgb, Max).
    • OutputQuality: Determine the output image quality, A quality level of 0 corresponds to the greatest compression, and a quality level of 100 corresponds to the least compression (Default 90).
    • PagePositionType: Determine the page number position of the output image (Default None)(None, TopLeft, TopRight, BottomLeft, BottomRight).
    • PageSizeAffectByZoom: Determines whether the page number size is affected by the zoom feature (Default false).
  2. Body

    • MarginLeft: Determines the left margin width of the output image (Default 30).
    • MarginRight: Determines the width of the right margin of the output image (Default 30).
    • MarginTop: Determines the width of the top margin of the output image (Default 30).
    • MarginBottom: Determines the bottom margin width of the output image (Default 30).
    • Leading: Determine the output image line spacing width (Default 30).
  3. Head

    • HeadPositionType: Determine the header position of the output image (Default None)(None, TopLeft, TopRight, BottomLeft, BottomRight).
    • HeadSizeAffectByZoom: Determines whether the header size is affected by the zoom feature (Default false).
  4. Footer

    • FooterPositionType: Determine the footer position of the output image (Default None)(None, TopLeft, TopRight, BottomLeft, BottomRight).
    • FooterSizeAffectByZoom: Determines whether the footer size is affected by the zoom feature (Default false).

EpubAozora

  1. TextFont

    • TextFontSize: Determine the font size of Epub or Aozora eBooks displayed in GenerateView (Default 30).
    • TextFontName: Determine the font of Epub or Aozora eBooks displayed in GenerateView (Default "[FontFamily: Name=Microsoft Sans Serif]").
    • TextFontBold: Determines whether the font style of Epub or Aozora eBooks in GenerateView is bold (Default true).
    • TextFontItalic: Determines whether the font style of Epub or Aozora eBooks in GenerateView is italic (Default false).
  2. WebViewStyle

    • WebViewLineHeight: Determine the line-height style of Epub or Aozora eBooks in GenerateView's WebView (Default 200%).
    • WebViewFontSize: Determine the font-size style of Epub or Aozora eBooks in GenerateView's WebView (Default 140%).

About

NovelTool is a novel/ebook(Mainly Japanese novels) reading and conversion tool, written in .Net Framework 4.8, which can convert ebooks into image files in another font size.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages