-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add server-side crop a photo #305
Comments
@teolemon What is |
imgid you can find in the request, it's a unique id assigned to uploaded images, regardless of whether they are selected or not. You apply a rotation to a raw image id, and you place it in id like front_fr (which is a selection) https://world.openfoodfacts.org/product/3760284870115/tiramisu-patissier |
There's probably something wrong in
What's wrong? |
If you want to crop again an already cropped image like you do you need to start from the source image, get the current cropping coords if you want to expose them to the user, and apply the new crop coords to the original image (1.jpg) |
I've tried from scratch on an existing product that did not have a
Btw how would I get the current cropping coords? |
https://world.openfoodfacts.net/cgi/product_image_crop.pl?code=3017620422003&id=1&imgid=front_fr&imgid=108&x1=10&y1=10&x2=800&y2=500 |
Impacted files: * `api_addProductImage_test.dart`: added a test for `OpenFoodAPIClient.setProductImageCrop`; minor refactoring * `ImageHelper.dart`: added methods `getProductImageRootUrl` and `getProductImageFilename`; minor refactoring * `JsonHelper.dart`: populated crop fields of `ProductImage` for product `'images'`; minor refactoring * `openfoodfacts.dart`: added method `setProductImageCrop`; minor refactoring * `ProductHelper.dart`: minor refactoring * `ProductImage.dart`: added crop fields `coordinatesImageSize`, `x1`, `y1`, `x2` and `y2` to `ProductImage`
I found out what was missing: query parameter |
What
Part of
The text was updated successfully, but these errors were encountered: