View Single Post
Old 01-03-2023, 05:09 AM   #2972
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 536
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Quote:
Originally Posted by shamanNS View Post
W
p.s. The image resolution is "hardcoded" to screen resolution of Kindle PW3 since that was the device I was using that KUAL extension
I found that part:

Code:
 if fix_thumb:
        #cover.thumbnail((283, 415), Image.ANTIALIAS)
        cover = cover.resize((1072, 1448), Image.ANTIALIAS)
    else:
        #cover.thumbnail((305, 470), Image.ANTIALIAS)
        cover = cover.resize((1072, 1448), Image.ANTIALIAS)
I think I will leave it in place, 'cause I own a PW4 whose resolution is as far as I know, the same (or at least not too different) than PW3, but...
What happens if I simply comment the whole 'if' out, so no resizing at all? Would it work anyway? Or is it necessary to have at least the "old" part, cover.thumbnail in place? I don't think so...

On the other hand, if one wanted to make it more general, I guess a new function would be needed to identify the kindle model, look its resolution in a hardcoded table maybe, and then give the specific WxH values to the cover.resize function right?
Not gonna ask YOU to do that, don't worry , I just wanted, out of curiosity, to understand if that would be the way to go.
If I recall correctly, identify the kindle model should be possible "from the inside" in some way...
Ruskie_it is offline   Reply With Quote