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

数ピクセル削れている #24

Open
minahoku opened this issue Jun 16, 2022 · 4 comments
Open

数ピクセル削れている #24

minahoku opened this issue Jun 16, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@minahoku
Copy link

アップデートありがとうございます 試してみたところ前回より削られなくなりましたが数ピクセルだけ右と下が削られているようです
https://i.imgur.com/YCzpcSK.png
https://i.imgur.com/hWcWfg3.png
細かいところで申し訳ないですがよろしくお願いします

@eggplants eggplants added the bug Something isn't working label Jun 16, 2022
@eggplants
Copy link
Owner

getjump/getjump/getjump.py

Lines 200 to 201 in b247a98

fixed_width = math.floor(float(img_width) / (div * mul)) * mul
fixed_height = math.floor(float(img_height) / (div * mul)) * mul

このfloorの切り捨て分ですね

@eggplants
Copy link
Owner

eggplants commented Jun 17, 2022

Pillowは、Boxとしてtuple[int, int]もしくはtuple[int, int, int, int]しか持てず、floatで指定した座標に対しての切り出し/貼り付けには対応していません。この問題はOpenCVにも存在しています。
今のところは天使の取り分的な感じで目をつぶっていただけると…

@eggplants eggplants added wontfix This will not be worked on and removed bug Something isn't working labels Jun 17, 2022
@eggplants
Copy link
Owner

eggplants commented Jun 17, 2022

ref: python/typeshed#8090 (Pillow), opencv/opencv#15465 (OpenCV)

OpenCV 3.4.8.29からは可能かもしれないので要調査です。

@eggplants
Copy link
Owner

@eggplants eggplants reopened this Jan 6, 2023
@eggplants eggplants added bug Something isn't working and removed wontfix This will not be worked on labels Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants