Skip to content

Commit 4934364

Browse files
committed
Fix more transparency issues
1 parent 9876414 commit 4934364

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ViewModels/Sources/PdfSourceViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ public override async Task<bool> FetchCover(Codex codex)
9494
await image.ReadAsync(codex.Sources.Path, ReadSettings);
9595
image.Format = MagickFormat.Png;
9696

97+
//some pdf's are transparent, expecting a white page underneath
98+
image.BackgroundColor = new MagickColor("#FFFFFF");
99+
image.Alpha(AlphaOption.Remove);
100+
97101
await image.WriteAsync(codex.CoverArt);
98102
CoverService.CreateThumbnail(codex, image);
99103
}

0 commit comments

Comments
 (0)