Open bust4cap opened 1 year ago
Hi. I tested it and it appears to work as intended.
However, I don't really understand the use case for this. Resizing, whether called explicitly or by --profile, implies modifying the aspect ratio. Perhaps it's not clear by the comment, but what I mean by "preserve aspect ratio", is try to preserve the orientation of landscape images.
The fixed layout specification for ebooks says that content should fill the entire screen, so the current implementation is intentional. See this. Having images not be resized to the size the user specified seems counterintuitive to me, and the whole point a fixed layout ebook is that it should behave consistently regardless of what the input image was.
Most manga and comics don't follow exactly a 3:4 format, and will be stretched to some degree, but this is usually pretty minor. Tankobon published in the West typically follow a 130x190 aspect ratio, which appears to be very similar to western comics.
Though I can see why an option to preserve aspect ratio would be useful. The default method could be a problem when dealing with webcomics, cause there isn't really a standard size, and stretching a perfectly square image into a (generally) 3:4 screen would probably look really bad, so I might implement the thumbnail method there.
Thanks for the suggestion. I will try to add this in the next week.
For the time being, if you wanna preserve the aspect ratio, you can use --size 0x0 (or --noup and --nodown simultaneously, I think. Nvm I made them mutually exclusive a while ago).
it should fill as much of the viewport as possible, not distort images to fill every last pixel of it. no one does that, not the publishers, not online scanlations, not kindle comic converter. you could add an option to specifically not keep the correct aspect ratio, but keeping it in tact should ALWAYS be the standard. you wouldnt stretch an old 4:3 snes video game to 16:9 just because you have an hd tv now. that would look just as horrible as stretching a "nearly" 4:3 image to 4:3, no matter how "minor" it may seem.
Okay, you're right and I apologise, it seems I really misunderstood the spec.
I'll be at least a few weeks before I can work on this, I'm in the middle of moving. In the meantime, you can make it your patch into a full pull request if you want.
I tried to add this: https://github.com/avalonv/reCBZ/pull/20
images are resized to the exact output resolution without keeping their correct aspect ratio. ive attempted to fix this. ive tested with both up- and downscaling and it worked perfectly for me, but please test it for yourself first too. (i commented out the old method) archive.py starting at line 131: