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

Accept a fieldname in get_original_value in our scaling code. #52

Merged
merged 6 commits into from
Jul 20, 2022

Conversation

mauritsvanrees
Copy link
Sponsor Member

Needed for recent plone.namedfile versions.

Needed for recent plone.namedfile versions.
Use the default plone.namedfile and plone.scale on Plone 6.
On Plone 5 use newer versions.
We had one test using the image as property, and one getting the image from data.
They both tested the tag and the scale methods.
I have now split those two.

And for the scale method we tried the 'mini' scale, which is the same size as the original image we use.
So use thumb instead. That should flush out some more problems.
And add tests calling scale with width=10.

I am getting an error in the combination of data and tag, and suspected data and scale would fail as well.
This would make that clearer.

Currently only `testImageScalingTagViaData` is failing.
In the tag we expect a width and height of 10, because we ask for this.
Instead we get 400 by 400.  Quite strange, since the original is 200 by 200...
Might need another fix in plone.namedfile or plone.scale.
@mauritsvanrees
Copy link
Sponsor Member Author

This needs plone/plone.scale#65 which itself needs more fixes.

Copy link
Member

@petschki petschki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mauritsvanrees mauritsvanrees merged commit 6218279 into master Jul 20, 2022
@mauritsvanrees mauritsvanrees deleted the maurits-original-value-fieldname branch July 20, 2022 10:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants