Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

online reader forced double page view #78

Open
AnomalyFS2 opened this issue Dec 16, 2018 · 10 comments
Open

online reader forced double page view #78

AnomalyFS2 opened this issue Dec 16, 2018 · 10 comments

Comments

@AnomalyFS2
Copy link

AnomalyFS2 commented Dec 16, 2018

Whenever I download a comic, it's in double page view because the online reader forces that on you for Manga. Is there a workaround for that so it shows pages in single page mode when I download them?

@AnomalyFS2 AnomalyFS2 changed the title Comixology online reader forced double page view online reader forced double page view Dec 16, 2018
@sgbeal
Copy link

sgbeal commented Dec 16, 2018

This extension effectively takes a screenshot of whatever the reader shows, so if the reader forces two-page view for Mangas then that's all that this extension can do.

@AnomalyFS2
Copy link
Author

Figured that would be the case. That sucks, considering they have one page mode available on tablets.

@sgbeal
Copy link

sgbeal commented Dec 16, 2018

Their support has always been very responsive. i recommend passing on the request for single-page mode to them (just don't mention that you want it for this particular purpose, as we don't want their explicit attention ;)).

@sgbeal
Copy link

sgbeal commented Dec 16, 2018

Another option would be to post-process the saved file, using command-line tools to script the chopping-up of the double pages. The ImageMagick tools can slice up images that way, and a CBZ is just a zip file, so any zipping tool can unpack/re-pack it. It would require a one-time scripting investment, but shouldn't take more than an hour if you're halfway familiar with the various tools.

@AnomalyFS2
Copy link
Author

Not very familiar with those, unfortunately. Thanks for your help, appreciated.

@TBthegr81
Copy link

Also have this problem.
I have never tinkered with an Extension before but looking at the code that actually grabs the imagedata I can see it looping over every canvas element on the page and transfering its content to a single newly created canvas that then gets blobbed

Would this not be as easy as to create two canvas elements and read half the width of the source-canvases? And then run the same code to create a page as usual.
(Would probably be accessed thru some options like "do you wanna split double pages")
Something like:

if(w > h) {
	var outCanvas2 = document.createElement('canvas'),
	ctx2 = outCanvas2.getContext('2d');
	outCanvas.width = w/2;
	outCanvas2.width = w/2;
	outCanvas2.height = h;
}
if(w > h) {
	ctx.drawImage(canvas, 0, 0, w/2, h, 0, 0, w/2, h);
	ctx2.drawImage(canvas, w/2, 0 , w/2, h, 0, 0, w/2, h);
}
else {
	ctx.drawImage(canvas, parseInt(canvas.style.left) || 0, parseInt(canvas.style.top) || 0, parseInt(canvas.style.width) || 0, parseInt(canvas.style.height) || 0);
}

I tried this and I get the left side of each page, not sure how to save both canvases as separate images though.

Also not sure if checking width against height is good enuff for all comics/manga on the site, I suppose some series might have odd aspect-ratios and there could be some more effective way to check for double pages.

@Nosgoroth
Copy link

This would probably be a good idea, but in the meantime I'm going to go ahead and save everything I have as PNG, so that if I want to post-process it lately I can do it losslessly.

@sgbeal
Copy link

sgbeal commented Feb 21, 2019

Checking width against height isn't a solution - two-page spreads are quite common in non-manga books.

@TBthegr81
Copy link

I did finish what I was talking about and now I rip my manga so I can read it on my tablet.
Not sure what the procedure is here, should I make a issue-branch an' push it to github so others can look at it?

@sgbeal There is two-page spreads in the manga I wanted to save too, but it still a bad idea unless you can rotate the picture so it displays correctly on a tablet-screen. I would rather have a spread cut in half, being able to read the text without having to zoom and pan across the page.
I'm not familiar enuff with the site to know if you could detect two-page spreads and then apply different rules to them...
Right now the easiest would be to have an option if you wanna enable cutting of the page or not, and turn it off for comics where it doesn't work.

@sgbeal
Copy link

sgbeal commented Feb 21, 2019

Two-page views are the bane of e-comics :(. Because such spreads often (but not always) have to be read left to right, there's no way the reader can know whether splitting a given view makes sense. For one which is intended to be read left to right across the whole two pages, splitting would be a disaster. The final issue of Fables (number 150) is almost entirely two-page views, many of which would be ruined, both graphically and in terms of reading, by splitting them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants