This commit is contained in:
Celogeek 2024-09-13 08:42:24 +02:00
parent f33c095094
commit 0613bca3bc
Signed by: celogeek
GPG Key ID: 850295F3747870DD
3 changed files with 4 additions and 2 deletions

View File

@ -106,6 +106,10 @@ func (i EPUBImage) RelSize(viewWidth, viewHeight int) (relWidth, relHeight int)
w, h := viewWidth, viewHeight w, h := viewWidth, viewHeight
srcw, srch := i.Width, i.Height srcw, srch := i.Width, i.Height
if srcw < w && srch < h {
return srcw, srch
}
if w <= 0 || h <= 0 || srcw <= 0 || srch <= 0 { if w <= 0 || h <= 0 || srcw <= 0 || srch <= 0 {
return return
} }

View File

@ -5,7 +5,6 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link href="style.css" type="text/css" rel="stylesheet"/> <link href="style.css" type="text/css" rel="stylesheet"/>
<meta name="viewport" content="{{ .ViewPort }}"/>
</head> </head>
<body> <body>
</body> </body>

View File

@ -5,7 +5,6 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link href="style.css" type="text/css" rel="stylesheet"/> <link href="style.css" type="text/css" rel="stylesheet"/>
<meta name="viewport" content="{{ .ViewPort }}"/>
</head> </head>
<body> <body>
<img src="../{{ .ImagePath }}" alt="{{ .Title }}" style="{{ .ImageStyle }}"/> <img src="../{{ .ImagePath }}" alt="{{ .Title }}" style="{{ .ImageStyle }}"/>