You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Candidate._validate(self, plugin)
# returns only CANDIDATE_DOWNSIZE# and skips CANDIDATE_REFORMAT
the function can only perform one of the operations in the current scenario, and since downsizing is returned before reformatting, during .resize() only downsizing takes place. Which is its own separate bug since PIL can not downnsize PNG files.
make validate return a list of operations to perform instead of just one of them with priority: CANDIDATE_REFORMAT > CANDIDATE_DOWNSCALE > CANDIDATE_DOWNSIZE
not sure where CANDIDATE_DEINTERLACE would go
during .resize() pop each operation from the list and perform.
Note: however, before resizing a check should be placed since previous operation might have done the size reducing.
option to, recurse until _validate returns CANDIDATE_EXACT with above the above operation priority.
Note: can get stuck on resizing since PNG cannot be resized, so either validate or the function doing the recursion should move on to next operation of downsizing fails.
Consider a case where a coverart is of PNG format with size 15 MB. (happens sometimes with itunes coverart on musicbrainz).
Also consider the following fetchart config:
PIL is used as the image resizer
Problem
the function can only perform one of the operations in the current scenario, and since downsizing is returned before reformatting, during
.resize()
only downsizing takes place. Which is its own separate bug since PIL can not downnsize PNG files.Setup
The text was updated successfully, but these errors were encountered: