mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 08:12:36 +02:00
display palette level
This commit is contained in:
parent
2fbaedc3b9
commit
3e734866e5
50
README.md
50
README.md
@ -77,7 +77,7 @@ The ePub include as a first page:
|
|||||||
|
|
||||||
Usage of go-comic-converter:
|
Usage of go-comic-converter:
|
||||||
-algo string
|
-algo string
|
||||||
Algo for RGB to Grayscale: luster, default, mean, luma (default "default")
|
Algo for RGB to Grayscale: default, mean, luma, luster (default "default")
|
||||||
-author string
|
-author string
|
||||||
Author of the epub (default "GO Comic Converter")
|
Author of the epub (default "GO Comic Converter")
|
||||||
-input string
|
-input string
|
||||||
@ -90,30 +90,30 @@ Usage of go-comic-converter:
|
|||||||
Output of the epub (directory or epub): (default [INPUT].epub)
|
Output of the epub (directory or epub): (default [INPUT].epub)
|
||||||
-profile string
|
-profile string
|
||||||
Profile to use:
|
Profile to use:
|
||||||
- K1 ( 600x670 ) - Kindle 1
|
- K1 ( 600x670 ) - 4 levels of gray - Kindle 1
|
||||||
- K11 ( 1072x1448 ) - Kindle 11
|
- K11 ( 1072x1448 ) - 16 levels of gray - Kindle 11
|
||||||
- K2 ( 600x670 ) - Kindle 2
|
- K2 ( 600x670 ) - 15 levels of gray - Kindle 2
|
||||||
- K34 ( 600x800 ) - Kindle Keyboard/Touch
|
- K34 ( 600x800 ) - 16 levels of gray - Kindle Keyboard/Touch
|
||||||
- K578 ( 600x800 ) - Kindle
|
- K578 ( 600x800 ) - 16 levels of gray - Kindle
|
||||||
- KDX ( 824x1000 ) - Kindle DX/DXG
|
- KDX ( 824x1000 ) - 16 levels of gray - Kindle DX/DXG
|
||||||
- KPW ( 758x1024 ) - Kindle Paperwhite 1/2
|
- KPW ( 758x1024 ) - 16 levels of gray - Kindle Paperwhite 1/2
|
||||||
- KV ( 1072x1448 ) - Kindle Paperwhite 3/4/Voyage/Oasis
|
- KV ( 1072x1448 ) - 16 levels of gray - Kindle Paperwhite 3/4/Voyage/Oasis
|
||||||
- KPW5 ( 1236x1648 ) - Kindle Paperwhite 5/Signature Edition
|
- KPW5 ( 1236x1648 ) - 16 levels of gray - Kindle Paperwhite 5/Signature Edition
|
||||||
- KO ( 1264x1680 ) - Kindle Oasis 2/3
|
- KO ( 1264x1680 ) - 16 levels of gray - Kindle Oasis 2/3
|
||||||
- KS ( 1860x2480 ) - Kindle Scribe
|
- KS ( 1860x2480 ) - 16 levels of gray - Kindle Scribe
|
||||||
- KoMT ( 600x800 ) - Kobo Mini/Touch
|
- KoMT ( 600x800 ) - 16 levels of gray - Kobo Mini/Touch
|
||||||
- KoG ( 768x1024 ) - Kobo Glo
|
- KoG ( 768x1024 ) - 16 levels of gray - Kobo Glo
|
||||||
- KoGHD ( 1072x1448 ) - Kobo Glo HD
|
- KoGHD ( 1072x1448 ) - 16 levels of gray - Kobo Glo HD
|
||||||
- KoA ( 758x1024 ) - Kobo Aura
|
- KoA ( 758x1024 ) - 16 levels of gray - Kobo Aura
|
||||||
- KoAHD ( 1080x1440 ) - Kobo Aura HD
|
- KoAHD ( 1080x1440 ) - 16 levels of gray - Kobo Aura HD
|
||||||
- KoAH2O ( 1080x1430 ) - Kobo Aura H2O
|
- KoAH2O ( 1080x1430 ) - 16 levels of gray - Kobo Aura H2O
|
||||||
- KoAO ( 1404x1872 ) - Kobo Aura ONE
|
- KoAO ( 1404x1872 ) - 16 levels of gray - Kobo Aura ONE
|
||||||
- KoN ( 758x1024 ) - Kobo Nia
|
- KoN ( 758x1024 ) - 16 levels of gray - Kobo Nia
|
||||||
- KoC ( 1072x1448 ) - Kobo Clara HD/Kobo Clara 2E
|
- KoC ( 1072x1448 ) - 16 levels of gray - Kobo Clara HD/Kobo Clara 2E
|
||||||
- KoL ( 1264x1680 ) - Kobo Libra H2O/Kobo Libra 2
|
- KoL ( 1264x1680 ) - 16 levels of gray - Kobo Libra H2O/Kobo Libra 2
|
||||||
- KoF ( 1440x1920 ) - Kobo Forma
|
- KoF ( 1440x1920 ) - 16 levels of gray - Kobo Forma
|
||||||
- KoS ( 1440x1920 ) - Kobo Sage
|
- KoS ( 1440x1920 ) - 16 levels of gray - Kobo Sage
|
||||||
- KoE ( 1404x1872 ) - Kobo Elipsa
|
- KoE ( 1404x1872 ) - 16 levels of gray - Kobo Elipsa
|
||||||
-quality int
|
-quality int
|
||||||
Quality of the image (default 85)
|
Quality of the image (default 85)
|
||||||
-title string
|
-title string
|
||||||
|
13
main.go
13
main.go
@ -71,12 +71,13 @@ type Option struct {
|
|||||||
|
|
||||||
func (o *Option) String() string {
|
func (o *Option) String() string {
|
||||||
var desc string
|
var desc string
|
||||||
var width, height int
|
var width, height, level int
|
||||||
if i, ok := ProfilesIdx[o.Profile]; ok {
|
if i, ok := ProfilesIdx[o.Profile]; ok {
|
||||||
profile := Profiles[i]
|
profile := Profiles[i]
|
||||||
desc = profile.Description
|
desc = profile.Description
|
||||||
width = profile.Width
|
width = profile.Width
|
||||||
height = profile.Height
|
height = profile.Height
|
||||||
|
level = len(profile.Palette)
|
||||||
}
|
}
|
||||||
limitmb := "nolimit"
|
limitmb := "nolimit"
|
||||||
if o.LimitMb > 0 {
|
if o.LimitMb > 0 {
|
||||||
@ -88,7 +89,7 @@ func (o *Option) String() string {
|
|||||||
Options:
|
Options:
|
||||||
Input : %s
|
Input : %s
|
||||||
Output : %s
|
Output : %s
|
||||||
Profile : %s - %s - %dx%d
|
Profile : %s - %s - %dx%d - %d levels of gray
|
||||||
Author : %s
|
Author : %s
|
||||||
Title : %s
|
Title : %s
|
||||||
Quality : %d
|
Quality : %d
|
||||||
@ -98,10 +99,7 @@ Options:
|
|||||||
`,
|
`,
|
||||||
o.Input,
|
o.Input,
|
||||||
o.Output,
|
o.Output,
|
||||||
o.Profile,
|
o.Profile, desc, width, height, level,
|
||||||
desc,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
o.Author,
|
o.Author,
|
||||||
o.Title,
|
o.Title,
|
||||||
o.Quality,
|
o.Quality,
|
||||||
@ -115,9 +113,10 @@ func main() {
|
|||||||
availableProfiles := make([]string, 0)
|
availableProfiles := make([]string, 0)
|
||||||
for _, p := range Profiles {
|
for _, p := range Profiles {
|
||||||
availableProfiles = append(availableProfiles, fmt.Sprintf(
|
availableProfiles = append(availableProfiles, fmt.Sprintf(
|
||||||
" - %-7s ( %9s ) - %s",
|
" - %-7s ( %9s ) - %2d levels of gray - %s",
|
||||||
p.Code,
|
p.Code,
|
||||||
fmt.Sprintf("%dx%d", p.Width, p.Height),
|
fmt.Sprintf("%dx%d", p.Width, p.Height),
|
||||||
|
len(p.Palette),
|
||||||
p.Description,
|
p.Description,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user