Comments (14)
Hi,
Sorry, this is due to migration to the new resizing engine. We'll update the API ASAP
from pyuploadcare.
hey,
sorry for long delay.
you can add /stretch/off/ to cdn url now to turn off stretching.
i.e. https://ucarecdn.com/<uuid>/-/stretch/off/-/resize/500x300/
from pyuploadcare.
please close the ticket if it suits you
from pyuploadcare.
Yup. That did the trick. You should however alter the README "Using it..." sections or rewrite the resized
and cropped
functions. It's confusing when in README one can read "make your life easier..." by using those methods or template helpers and then realize that they're deprecated.
Cheers
from pyuploadcare.
Hi, yeah, we didn't make up our minds about these yet, thank you for reminding!
from pyuploadcare.
about disabling stretching... there's some inconsistent behavior with this option. It works for smaller images. But when my image is bigger doing a stretch/off doesn't seem to do anything.
So... having /-/stretch/off/-/resize/500x300/
for a bigger image (than 500x300) gives the same result as /-/resize/500x300/
. I've workaround this by doing this instead /-/stretch/off/-/resize/500x/-/resize/x300/
.
from pyuploadcare.
Wow, this is weird. Sorry, we'll investigate.
from pyuploadcare.
Hey, I'm trying to understand the issue you're talking about.
/stretch/ is just to disable stretching in case when the requested size is bigger than the actual one. Probably, you want an option to preserve proportions, do you? Or not? Can you give me example of what you want (even without image, just actual sizes and the sizes you want to get will suffice)?
from pyuploadcare.
sure. check out this image. It's 512 x 682. When You do /-/stretch/off/-/resize/500x300/
the picture actually gets... stretched ;). But you're right, the preserve proportions can be what I'm looking for. But the above workaround also works.
from pyuploadcare.
Oh, yes:
resize (/resize/:one_or_two_dimensions/): Resizes an images to the specified dimensions. If only one of them is specified, resizes proportionally to this one. Examples:
I should've probably stressed more that if you specify 2 dimensions it does not care about proportions.
Let's see. Maybe you want https://ucarecdn.com/b20e8a04-3574-49bb-a3e7-da0c38b96068/-/scale_crop/500x300/center/ ? Or you want an image which is not cropped, exactly or less than 500x300 and with original proportions?
from pyuploadcare.
Or you want an image which is not cropped, exactly or less than 500x300 and with original proportions?
Yes. That's exactly what I want.
from pyuploadcare.
Okay, probably we'll need another action for that, like -/fit/500x300/
.
from pyuploadcare.
@homm do we have already something for this?
from pyuploadcare.
/preview/500x300/
should be used for this.
https://ucarecdn.com/b20e8a04-3574-49bb-a3e7-da0c38b96068/-/preview/500x300/
from pyuploadcare.
Related Issues (20)
- Unable to make an image field optional HOT 5
- Change `private` key to the `secret` key
- delete filegroup HOT 3
- Delete file method should not only UUIDs, but the mix of UUIDs, CDN URLs and File instances HOT 1
- Consider a helper method, to remove all files in a group.
- Batch delete/store methods should work for arbitrary list sizes. HOT 1
- Enable adding metadata to uploads HOT 2
- Relax `pytz` dependency constraint HOT 2
- Update httpx dependency HOT 1
- AkamaiSecureUrlBuilder creates not working urls for files HOT 5
- File Uploader (beta) HOT 4
- Badges in readme should link to appropriate pages, not images) HOT 6
- Fix functional tests that rely on network and expect some files in the project
- save_URL_duplicates and check_URL_duplicates are not supported
- Bump httpx version HOT 1
- Fix broken test coverage check
- multipage conversion (save_in_group param in documentJobSubmitParameters) HOT 1
- Update webhooks API (event types and versioning) HOT 3
- Add AWS Rekognition Moderation
- Deprecate PUT /group/{uuid}/storage/ HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyuploadcare.