rec / hardback

📓 Hardcopy backups of digital data 📓
MIT License
1 stars 0 forks source link

Cover image is missing on the demo document #3

Closed rec closed 5 years ago

rec commented 5 years ago

Reported by @bentoncbainbridge

Probably an easy fix, but why did it happen? Regressions (when a feature that used to work now fails) are the sign of poor automatic testing.

But there are no tests that go end-to-end on the entire epub, and it still seems somewhat daunting to attempt (i.e. a lot of work).

bentoncbainbridge commented 5 years ago

Could it be a simple issue of page numbering? is the cover Page 1, or Page 0?

Benton C Bainbridge | +1.646.338.9172 <(646)%20338-9172> http://bentoncbainbridge.com/rodriguez-gonzalez-bainbridge Rodriguez, Gonzalez, Bainbridge: Ezili Dantor, Freedom and the African Diaspora at Andrew Freedman Home | Friday, April 26, 7-9 PM http://bentoncbainbridge.com/rodriguez-gonzalez-bainbridge

On Sun, Apr 14, 2019 at 7:00 AM Tom Swirly notifications@github.com wrote:

Reported by @bentoncbainbridge https://github.com/bentoncbainbridge

Probably an easy fix, but why did it happen?

There are no tests that go end-to-end on the entire epub, and it still seems somewhat daunting to attempt.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rec/hardback/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/ALQTyZRicpG5_9EPM6Lux31BkF_6z5j8ks5vgwpfgaJpZM4cujMK .

rec commented 5 years ago

Nah. :-D

For one, other images work perfectly well. For another, the cover isn't a page itself - it's a separate thing. Indeed, epub or at least my library handles covers disappointingly badly - the cover must be a single image (JPEG, PNG or SVG), whereas pages can be any XHTML(*) you like.

(* - XHTML is basically HTML except that forgetting closing tags is an error, whereas HTML just ignores it.)

rec commented 5 years ago

I should also have said that I'm fairly sure I know at least part of what's going on - it's pixel transparency.

The image I used for the demo is a PNG I downloaded, and that is black, with a transparent background. My original sample document uses a screenshot I took, so all the pixels are "there", and it has no issues.

My plan is not to deal with it for the moment. :-) If it's an issue, then you can use a different PNG without transparency.

In the end game, I probably need the option to create my own full cover image within the program, and render both the book title and the desired cover image into it. Not too much work, but that will come later.

bentoncbainbridge commented 5 years ago

I've also noticed that 'Progressive' JPEGs can cause problems in some circumstances (I've been struggling with cheap media players recently). I'm not aware of any app that outputs a 'standard' JPEG from any given image file.

On Mon, Apr 15, 2019 at 3:34 AM Tom Swirly notifications@github.com wrote:

I should also have said that I'm fairly sure I know at least part of what's going on - it's pixel transparency.

The image I used for the demo is a PNG I downloaded, and that is black, with a transparent background. My original sample document uses a screenshot I took, so all the pixels are "there", and it has no issues.

My plan is not to deal with it for the moment. :-) If it's an issue, then you can use a different PNG without transparency.

In the end game, I probably need the option to create my own full cover image within the program, and render both the book title and the desired cover image into it. Not too much work, but that will come later.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rec/hardback/issues/3#issuecomment-483140497, or mute the thread https://github.com/notifications/unsubscribe-auth/ALQTycdACzlsJ6M7YqzFyBsXQU0bKBDoks5vhCuIgaJpZM4cujMK .

rec commented 5 years ago

Writing a tool to convert progressive JPEGs to not would be pretty easy... :-D How useful would this be to you?

It's a shame that until the next release of pyinstaller, "drag and drop" Python applications are hard to achieve on Mac OS.

On Mon, Apr 15, 2019 at 2:04 PM Benton C Bainbridge < notifications@github.com> wrote:

I've also noticed that 'Progressive' JPEGs can cause problems in some circumstances (I've been struggling with cheap media players recently). I'm not aware of any app that outputs a 'standard' JPEG from any given image file.

On Mon, Apr 15, 2019 at 3:34 AM Tom Swirly notifications@github.com wrote:

I should also have said that I'm fairly sure I know at least part of what's going on - it's pixel transparency.

The image I used for the demo is a PNG I downloaded, and that is black, with a transparent background. My original sample document uses a screenshot I took, so all the pixels are "there", and it has no issues.

My plan is not to deal with it for the moment. :-) If it's an issue, then you can use a different PNG without transparency.

In the end game, I probably need the option to create my own full cover image within the program, and render both the book title and the desired cover image into it. Not too much work, but that will come later.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rec/hardback/issues/3#issuecomment-483140497, or mute the thread < https://github.com/notifications/unsubscribe-auth/ALQTycdACzlsJ6M7YqzFyBsXQU0bKBDoks5vhCuIgaJpZM4cujMK

.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/rec/hardback/issues/3#issuecomment-483224049, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPdsjWQPUHuWr_PucVCxTdXhMekOPEfks5vhGrjgaJpZM4cujMK .

-- /t

PGP Key: https://flowcrypt.com/pub/tom.ritchford@gmail.com https://tom.ritchford.com https://tom.ritchford.com https://tom.swirly.com https://tom.swirly.com

bentoncbainbridge commented 5 years ago

Not critical for me! I can convert them easily... However, I am surprised that the online image compressors don't make jpegs non-progressive

On Mon, Apr 15, 2019, 8:17 AM Tom Swirly notifications@github.com wrote:

Writing a tool to convert progressive JPEGs to not would be pretty easy... :-D How useful would this be to you?

It's a shame that until the next release of pyinstaller, "drag and drop" Python applications are hard to achieve on Mac OS.

On Mon, Apr 15, 2019 at 2:04 PM Benton C Bainbridge < notifications@github.com> wrote:

I've also noticed that 'Progressive' JPEGs can cause problems in some circumstances (I've been struggling with cheap media players recently). I'm not aware of any app that outputs a 'standard' JPEG from any given image file.

On Mon, Apr 15, 2019 at 3:34 AM Tom Swirly notifications@github.com wrote:

I should also have said that I'm fairly sure I know at least part of what's going on - it's pixel transparency.

The image I used for the demo is a PNG I downloaded, and that is black, with a transparent background. My original sample document uses a screenshot I took, so all the pixels are "there", and it has no issues.

My plan is not to deal with it for the moment. :-) If it's an issue, then you can use a different PNG without transparency.

In the end game, I probably need the option to create my own full cover image within the program, and render both the book title and the desired cover image into it. Not too much work, but that will come later.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rec/hardback/issues/3#issuecomment-483140497, or mute the thread <

https://github.com/notifications/unsubscribe-auth/ALQTycdACzlsJ6M7YqzFyBsXQU0bKBDoks5vhCuIgaJpZM4cujMK

.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/rec/hardback/issues/3#issuecomment-483224049, or mute the thread < https://github.com/notifications/unsubscribe-auth/AAPdsjWQPUHuWr_PucVCxTdXhMekOPEfks5vhGrjgaJpZM4cujMK

.

-- /t

PGP Key: https://flowcrypt.com/pub/tom.ritchford@gmail.com https://tom.ritchford.com https://tom.ritchford.com https://tom.swirly.com https://tom.swirly.com

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rec/hardback/issues/3#issuecomment-483227982, or mute the thread https://github.com/notifications/unsubscribe-auth/ALQTyaIfj_eLSqgS4nBxhpJPp9MjX0q4ks5vhG3agaJpZM4cujMK .

rec commented 5 years ago

It is my belief that if I render the cover myself (#9), making sure that there are no transparent pixels, then this issue will go away...